11-08-2020, 02:53 AM
Hi!
I could find no examples in the included lud files of how to use the "if" argument to (size Group ...) In fact there is little information on how groups are determined, appart from the direction argument. It seems that groups are determined by pieces that are exactly the same, but the group *size* includes also any pieces stacked on top of these?
I'm trying to model a game where you place tiles on the board to form regions by adjacency, and then claim these regions by placing other tokens (say flags) *on top* of these tiles. I would like to prevent a player from placing a flag in a region that already contains one.
I've also defined the tiles to be Neutral, but I don't understand how that interacts with "Occupied by" when using a stack.
Being a programmer, I thought I could write my game definition in a breeze, but it looks like the grammar is designed to be very concise for common operations, and makes more programatic ones less obvious.
I would appreciate the help a lot, as Ludii seems to be an amazing tool (especially with the built-in analysis, UI and AI).
Thanks in advance!
I could find no examples in the included lud files of how to use the "if" argument to (size Group ...) In fact there is little information on how groups are determined, appart from the direction argument. It seems that groups are determined by pieces that are exactly the same, but the group *size* includes also any pieces stacked on top of these?
I'm trying to model a game where you place tiles on the board to form regions by adjacency, and then claim these regions by placing other tokens (say flags) *on top* of these tiles. I would like to prevent a player from placing a flag in a region that already contains one.
I've also defined the tiles to be Neutral, but I don't understand how that interacts with "Occupied by" when using a stack.
Being a programmer, I thought I could write my game definition in a breeze, but it looks like the grammar is designed to be very concise for common operations, and makes more programatic ones less obvious.
I would appreciate the help a lot, as Ludii seems to be an amazing tool (especially with the built-in analysis, UI and AI).
Thanks in advance!