06-14-2022, 12:54 PM
Code:
for (int i = trial.numInitialPlacementMoves(); i < trial.numMoves(); i++)
{
Move move = trial.getMove(i);
system.out.println(move);
}
Should print all the moves after the moves used to setup the game.
Then, if you want to print the from and to of your move, this depends on what you are looking for.
If you look for, the from/to of the first decision action in the move, you have to use .from() and .to(). However, even if some actions have a value for the from and the to, this can be -1 (undefined) for each of them if the first decision action in the list of actions composing the move is not related to the board (for example if your decision action is to pass).
An alternative is to use .fromNonDecision() and .toNonDecision() if you want the from and to values associated with the move despite the first decision action in the list of actions.
To understand more about decision moves, I invite you to look at 4.3.1 in the Ludii Game Logic Guide.
Eric