public static void Dialogue() { for (var i = 0; i < int.MaxValue; i++) { Console.WriteLine(textsGM[(int)Str.Guess_Or_Conceive]); string answer = Console.ReadLine(); if (answer == textsGM[(int)Str.One] || answer == textsGM[(int)Str.One_Plus_Shift]) { Console.Clear(); GuessTheNumber.StartGame(); break; } else if (answer == textsGM[(int)Str.Two] || answer == textsGM[(int)Str.Two_Plus_Shift]) { Console.Clear(); ConceiveTheNumber.StartGame(); break; } else { Console.WriteLine(textsGM[(int)Str.Bad_Value]); System.Threading.Thread.Sleep(2000); Console.Clear(); continue; } } }
public static void GameInProgress(int cpuRange) { int cpuAttempts = GameLogic.NumOfAttempts(cpuRange); Print($"{texts[(int)Str.Num_of_attempts]} {cpuAttempts}"); Attempts(cpuRange, cpuAttempts); if (correctAnswer) { Print(texts[(int)Str.CPU_Win]); } if (!correctAnswer) { Print(texts[(int)Str.User_Win]); } GuessTheNumber.EndGame(); }