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(); }
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]); }
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); }
public void Player2Move(GameBoard problem, Tuple <int, int> move) { problem.Move(move.Item1, move.Item2, playerID); }
public void Player1Move(GameBoard problem, Tuple <int, int> move) { problem.Move(move.Item1, move.Item2, opponentID); }