static void Main(string[] args) { TicTacToe t = new TicTacToe(); t.DisplayTheBoard(); string inputPos; while (!t.GameOver) { Console.Write("Enter your position (X) To Exit:"); inputPos = Console.ReadLine(); if (inputPos.ToLower() == "x") { t.GameOver = true; break; } if (!t.PutMark(inputPos, 'X')) { Console.WriteLine(t.Message); } else { t.DisplayTheBoard(); } } }
static void Main(string[] args) { TicTacToe t = new TicTacToe(); t.DisplayTheBoard(); string inputPos; while (!t.GameOver) { Console.Write("Enter your position (X) To Exit:"); inputPos = Console.ReadLine(); if (inputPos.ToLower() == "x") { t.GameOver = true; break; } if (!t.PutMark(inputPos, 'X')) Console.WriteLine(t.Message); else { t.DisplayTheBoard(); } } }