Ludii Forum
(where ... ) - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Ludii Player Problems (https://ludii.games/forums/forumdisplay.php?fid=6)
+--- Thread: (where ... ) (/showthread.php?tid=413)



(where ... ) - slimy_asparagus - 02-03-2021

I have been trying to use the new (where Level ...) ludeme. I was running into difficulties so I started preparing a test game. Based on that I am finding more difficulties with (where....) than (where Level...).

In this game (attached) you have pieces A, B, C. As a move you can place them anywhere (including on top of another piece). Alternatively you can select a piece which (note)'s the (where) and (where Level) ludemes. It looks like, if the piece is not on the top of the the stack, the (where) ludeme will return -1. You can start with the attached trial.


RE: (where ... ) - Eric Piette - 02-05-2021

Hi,

Yes the (where ...) ludeme was not done to detect a piece at any level in a stack, but only for flat state (or top piece for stacks as you said).

I corrected that to do what you expect, that will be in the next release.
So to be clear, whatever the level, the (where ...) ludeme returns the first site in the board where a piece is found.
And then you will be able to use (where Level ...) to find the first level where that piece appears in that stack (from the top or the bottom).

Regards,
Eric


RE: (where ... ) - slimy_asparagus - 02-05-2021

Eric,

Thank you so much for the update.