01-04-2021, 08:34 AM
(This post was last modified: 01-04-2021, 08:35 AM by Eric Piette.)
Hi,
Here what said the documentation is the Ludii Logic Guide:
(prev): Returns the index of the player who has played in the previous state.
So that ludeme returns the player who played in the previous move (not the previous turn).
I will check with the others to add a parameter to prev in order to return the mover of the previous turn.
Something like (prev turn:true)
For the comment about the documentation of the LLR of the Prev RoleType, I agree and I updated it.
-----------------------------------
For the comment about using roleType in the (pair ...) ludeme, that should work. We have many games using that. e.g. Halma.
However I can see in your code that you try to use (id ....) with a name and a IntFunction. But as you can see in the documentation, a RoleType is expected. To be clear, the ludeme (mapEntry ......) is returning an IntFunction corresponding to the id of the RoleType here.
Eric
Here what said the documentation is the Ludii Logic Guide:
(prev): Returns the index of the player who has played in the previous state.
So that ludeme returns the player who played in the previous move (not the previous turn).
I will check with the others to add a parameter to prev in order to return the mover of the previous turn.
Something like (prev turn:true)
For the comment about the documentation of the LLR of the Prev RoleType, I agree and I updated it.
-----------------------------------
For the comment about using roleType in the (pair ...) ludeme, that should work. We have many games using that. e.g. Halma.
However I can see in your code that you try to use (id ....) with a name and a IntFunction. But as you can see in the documentation, a RoleType is expected. To be clear, the ludeme (mapEntry ......) is returning an IntFunction corresponding to the id of the RoleType here.
Eric