Пример #1
0
 public void HumanPlayerNextMove(Tuple <int, int> move)
 {
     if (gameBoard.IsPlayer1Turn())
     {
         gameBoard.Move(move.Item1, move.Item2, player1.ID);
         lastMove = move;
     }
     else
     {
         gameBoard.Move(move.Item1, move.Item2, player2.ID);
         lastMove = move;
     }
     CheckWinner();
 }
Пример #2
0
        public Tuple <int, int> NextMove()
        {
            List <Tuple <int, int> > availableMoves = GetAvailableMoves();
            int move = random.Next(availableMoves.Count);

            gameBoard.Move(availableMoves[move].Item1, availableMoves[move].Item2, ID);
            return(availableMoves[move]);
        }
Пример #3
0
        public Tuple <int, int> NextMove()
        {
            Tuple <int, int> bestMove = minimax.NextMove();

            gameBoard.Move(bestMove.Item1, bestMove.Item2, ID);

            return(bestMove);
        }
Пример #4
0
        public Tuple <int, int> NextMove()
        {
            Tuple <int, int> bestMove = alphabeta.NextMove();

            gameBoard.Move(bestMove.Item1, bestMove.Item2, ID);
            LastMove = bestMove;

            return(bestMove);
        }
Пример #5
0
 public void Player2Move(GameBoard problem, Tuple <int, int> move)
 {
     problem.Move(move.Item1, move.Item2, playerID);
 }
Пример #6
0
 public void Player1Move(GameBoard problem, Tuple <int, int> move)
 {
     problem.Move(move.Item1, move.Item2, opponentID);
 }