Ludii Forum
component-parameter for (is Loop) - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Suggestions (https://ludii.games/forums/forumdisplay.php?fid=10)
+--- Forum: Ludii Features / Services (https://ludii.games/forums/forumdisplay.php?fid=11)
+--- Thread: component-parameter for (is Loop) (/showthread.php?tid=596)



component-parameter for (is Loop) - Michael - 06-06-2021

I can't see that there currently is a way of detecting loops of a specific component. That would be a nice feature. Say both players have two different pieces, Counters and DoubleCounters, say. It would be nice to be able to ask is Loop to only detect loops of DoubleCounters, for example. Is this possible?


RE: component-parameter for (is Loop) - Eric Piette - 06-07-2021

Hi,

No currently, the (is Loop ...) ludeme is looking only for loop of a specific player and not of a specific piece. But yes I should add a booleanFunction condition on each element of the loop to be more general. I add that to my TODO list.

Regards,
Eric


RE: component-parameter for (is Loop) - Michael - 06-07-2021

Thank you so much for all the help, Eric!

In the current version, what determines which component (is Loop) is looking for when the players have more than one kind of piece each? What, for example, determines that it detects the disc loop but not the doublecounter loop in the attached trial?


RE: component-parameter for (is Loop) - Eric Piette - 06-07-2021

Hi,

The code is looking apparently for only the first piece owned by each player, that's the similar issue of the other posts, I will improve it to be more general in the same time I will add the new entry (the booleanFunction). I will keep you inform when I will do it.

Regards,
Eric