Пример #1
0
        public void HandleUserInput(int Cell)
        {
            if (HasWinner || !IsUserTurn)
            {
                return;
            }

            if (Board[Cell] == TicTacToeCell.None)
            {
                Board[Cell] = TicTacToeCell.User;
            }
            else
            {
                return;
            }

            IsUserTurn = false;
            PrintBoard(Board);
            Round++;

            HandleWinScenario();

            if (Round == 9)
            {
                return;
            }


            HandleAIInput(AI.ComputeNextMove(Board));
        }