Exemple #1
0
        public bool ComputerTurn()
        {
            int bestComputerPosition = _inteligence.FindPosition(_computerBrain, _currentGame);

            _currentGame.Move(bestComputerPosition, _computerIcon);

            _currentGameHistory.Add(_currentGame);

            return(CheckWin(true));
        }
Exemple #2
0
        public void Deveria_retornar_melhor_posicao_com_base_no_historico()
        {
            var currentGame = new Layout();

            currentGame.Move(0, 'X');
            currentGame.Move(1, 'O');

            var position = _findBestMovement.FindPosition(_computerBrain, currentGame);

            position.Should().Be(4);
        }