예제 #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);
 }