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();
 }
Beispiel #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]);
        }
Beispiel #3
0
        public Tuple <int, int> NextMove()
        {
            Tuple <int, int> bestMove = minimax.NextMove();

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

            return(bestMove);
        }
        public Tuple <int, int> NextMove()
        {
            Tuple <int, int> bestMove = alphabeta.NextMove();

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

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