Example #1
0
 public static void CheckVictory()
 {
     if (Lifes == 0)
     {
         Victory = -1;
     }
     else if (NewWord.Length == Word.Length)
     {
         Victory = 1;
     }
     if (Victory == 1)
     {
         Drower.DrowVictoryDefeat("Поздравляю, вы победили", ConsoleColor.Green);
     }
     else if (Victory == -1)
     {
         Drower.DrowVictoryDefeat("Сожалею, но вы повесились. Видимо, эта игра слишком сложная для вас, попробуйте лучше доту", ConsoleColor.Red);
     }
 }
Example #2
0
 static void Main()
 {
     Drower.Greetings();
     Console.SetCursorPosition(25, 5);
     Drower.DrowUnderscore(Game.Word);
     while (Game.Victory == 0)
     {
         Drower.DrowLifes();
         Console.SetCursorPosition(0, 1);
         Game.EnterLetter();
         Game.CheckSymbol();
         for (int i = 0; i < Game.Sym.Places.Count; i++)
         {
             Console.SetCursorPosition(Game.Sym.Places[i], 5);
             Drower.DrowWord();
         }
         Game.CheckVictory();
         Console.SetCursorPosition(0, 1);
         Console.WriteLine(new string(' ', 1));
     }
     Console.ReadLine();
 }