Пример #1
0
        public int GetMove(TicTacToe.Game.TicTacToe game)
        {
            game.PrintBoard();
            var move = -1;

            while (!game.IsPossible(move))
            {
                try
                {
                    Console.WriteLine();
                    Console.WriteLine("Write a valid move: (0-9)");
                    move = int.Parse(Console.ReadLine());
                }
                catch (Exception)
                {
                    // yolo
                }
            }

            return(move);
        }
Пример #2
0
 public static void PrintGame(TicTacToe.Game.TicTacToe ticTacToe)
 {
     ticTacToe.PrintBoard();
 }