11-16-2020, 08:06 AM
Hi Quentin,
Yes that method is not used by our code, but in the code the next player has to be set to the mover and was not, I fixed it.
However, you can create yourself the method you need in your code. Here is the code:
Regards,
Eric
Yes that method is not used by our code, but in the code the next player has to be set to the mover and was not, I fixed it.
However, you can create yourself the method you need in your code. Here is the code:
Code:
/**
* @param mover The player who is expected to make this move.
* @param player1 The player 1 to swap.
* @param player2 The player 2 to swap.
* @return A new swap move.
*/
public static Move createSwapMove(final int mover, final int player1, final int player2)
{
final ActionSwap actionSwap = new ActionSwap(player1, player2);
actionSwap.setDecision(true);
final Move swapMove = new Move(actionSwap);
swapMove.actions().add(new ActionSetNextPlayer(mover));
swapMove.setMover(mover);
return swapMove;
}
Regards,
Eric