Exemple #1
0
        public void MakeAMove(int areaID)
        {
            _gameBoard.PlaceAToken(areaID, _playerController.GiveCurrentToken());
            _gameBoard.CheckGameBoardState();

            var isGameDecided = _gameBoard.IsPlayerXWinner || _gameBoard.IsPlayerOWinner || _gameBoard.IsGameTie;

            if (isGameDecided)
            {
                _playerController.SetWinner();
                _playerController.GivePoints();
            }
            else
            {
                _playerController.ChangePlayer();
            }
        }