Ludii Forum
(move Swap Piece) confusion - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Questions (https://ludii.games/forums/forumdisplay.php?fid=13)
+--- Forum: About Ludii (https://ludii.games/forums/forumdisplay.php?fid=14)
+--- Thread: (move Swap Piece) confusion (/showthread.php?tid=1058)



(move Swap Piece) confusion - dale walton - 07-10-2022

Since (move Swap Piece) takes integer arguments rather than (to) and (from), is there a way to specify/filter the level of the pieces to be swapped?

Since it doesn't take regions, does one need to use nested (forEach Site / (forEach Value statements to allow a choice on any location?

Also the swap doesn't seem to be taking the states of the pieces with it....


RE: (move Swap Piece) confusion - Eric Piette - 07-18-2022

Hi,

For the first question, that's true I do not think you can, this ludeme was designed for non stacking games. I assume I can update it, I will keep that in my todo.

For the second, yes, you will have to use a loop.

For the last one, I need an example .lud to test it. Could you send me one?

Regards,
Eric


RE: (move Swap Piece) confusion - dale walton - 07-19-2022

I think the third was due to the first to problems, and if I work around those, it may resolve itself.