コード例 #1
0
ファイル: Program.cs プロジェクト: amartyaanand/TicTacToeGame
        static void Main(string[] args)
        {
            TicTacToeGame game = new TicTacToeGame();

            game.CreateBoard();
            char choice = game.Choice();

            game.ShowBoard();
            game.PlayerMovement(choice);
            game.Toss();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Mrunalk98/TicTacToeProblem
 static void Main(string[] args)
 {
     while (CONTINUE)
     {
         Console.WriteLine("\nWelcome to TicTacToe Game !");
         ticTacToe.CreateGameBoard();
         ticTacToe.ShowBoard();
         ticTacToe.ChooseInput();
         string firstMoveBy = ticTacToe.CheckWhoPlaysFirst();
         if (firstMoveBy == ticTacToe.player[1])
         {
             ticTacToe.ComputerMove();
         }
         else
         {
             ticTacToe.ChoosePositionOnBoard();
         }
         ticTacToe.ShowBoard();
         ticTacToe.PlayTillGameOver(firstMoveBy);
         playAgain();
     }
 }