Untitled
unknown
plain_text
7 months ago
2.1 kB
8
Indexable
Never
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { List<string> HANGMAN = new List<string> { @" +---+ | | | | | | =========", @" +---+ | | O | | | | =========", @" +---+ | | O | | | | | =========", @" +---+ | | O | /| | | | =========", @" +---+ | | O | /|\ | | | =========", @" +---+ | | O | /|\ | / | | =========", @" +---+ | | O | /|\ | / \ | | =========" }; int count_1 = HANGMAN.Count; int count_2 = 7; bool ison = true; string password = Console.ReadLine(); for (int i = 0; i < password.Length; i++) { //Console.WriteLine(password[i]); while (ison) { string alphavite = Console.ReadLine(); if (alphavite == password[i].ToString()) { Console.WriteLine("durus"); count_1++; break; } else { Console.WriteLine(HANGMAN[count_1 - count_2 - i]); count_2--; if (count_2 == 0) { Console.Write("Tы проиграл"); ison = false; } } } } if (ison) { Console.WriteLine("Ты победил"); } } }
Leave a Comment