Ludii Forum
(count StepsOnTrack) will always return -1 when counting past a loop - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Grammar Problems (https://ludii.games/forums/forumdisplay.php?fid=24)
+--- Thread: (count StepsOnTrack) will always return -1 when counting past a loop (/showthread.php?tid=1252)



(count StepsOnTrack) will always return -1 when counting past a loop - fuerchter - 09-20-2022

Hi,
the title of this more or less explains itself. Using (count StepsOnTrack) with a first site that is shortly before the loop and a second site that is shortly after the loop (assuming loop:True in (track) of course) will always return -1 (Constants.OFF) via this line. Here is a .lud to demonstrate this. (trackSite Move) on the other hand seems to be working (has code that accounts for the loop correctly?). This occurs on the current version (Ludii 1.3.6) and affects me in a game I'm working on.


RE: (count StepsOnTrack) will always return -1 when counting past a loop - Eric Piette - 09-24-2022

Hi,

You are 100% right.
I just fixed this issue.
A huge thanks for this.

Regards,
Eric


RE: (count StepsOnTrack) will always return -1 when counting past a loop - fuerchter - 09-24-2022

Hi Eric,
I merged the changes from your fix into my (somewhat old) local repository. As far as I can tell, it's working now, thanks! I will probably check on this and the fix from my other thread again once a new release comes around.