コード例 #1
0
        //The following two methods are used to display end-game text for a win or a tie.
        static void EndGame(string str)
        {
            GameboardDisplay();
            Console.ForegroundColor = ConsoleColor.Cyan;
            //Console.WriteLine(" {0}'s Win!\n", xOrO);
            Console.WriteLine(str);
            Console.ForegroundColor = ConsoleColor.White;
            Console.Write(" Press any key to play again...");
            Console.ReadKey();
            gameBoard.GameboardReset();
            Console.Clear();
            xOrO = 'X';

            if (isFirstPlayer)
            {
                isUserTurn = true;
            }
            else
            {
                isUserTurn = false;
            }
        }