Ludii Forum
Entangled problems with count, stack and or - 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: Entangled problems with count, stack and or (/showthread.php?tid=290)



Entangled problems with count, stack and or - Michael - 11-27-2020

In the attached .lud I am told that it is not legal to move a piece from the outer ring onto a site containing a neutral piece, but I cannot find anything wrong in the script. I have found many strange behaviors though:

1:
If I only replace
Code:
(or
    (forEach Piece ("MoveNeutralPiece") Neutral top:true)
    (forEach Piece ("MoveNonNeutralStack") Mover top:true)
)
in (play) with
Code:
(forEach Piece ("MoveNonNeutralStack") Mover top:true)
it works as expected.

2:
If I only remove "count:(size Stack at:(from))" from ("MoveNonNeutralStack"), it works as expected.

3:
If I only remove "stack:true" in ("MoveNonNeutralStack"), then, when I move a piece from the outer ring to a site occupied by a neutral piece, both pieces disappear.

4:
If I remove both "count:(size Stack at:(from))" and "stack:true" from ("MoveNonNeutralStack"), no piece is drawn and I get the following two error-messages:
VC_ERROR: Error detected when attempting to draw COMPONENTS
VC_ERROR: Error detected when attempting to draw POSSIBLEMOVES