I'm having two problems with a game I'm working on. I'll post them in separate posts. This is the strangest one.
In the attached .lud you are supposed to be able to move any neutral piece outward (so its distance to the center increases). But there are many places I am not allowed to move the neutrals on 21, 22, 29, 31, 38 and 39 to, even though they are further from the center. Try to move from 29 to 28, say.
The strange thing is: This only happens when I have the white piece on the center cell and have ("MoveZeroStack") inside (or) together with ("MoveWholeStack"). If I have simply (forEach Piece ("MoveZeroStack") Neutral top:true) in (play) and simply (place "Disc0" (sites Board)) in (start) this behavior goes away, even though nothing is changed in ("MoveZeroStack").
The other problem pertains to the same .lud:
I can't get (apply) to work in ("MoveWholeStack"). I have "(apply (remove (to) count:(size Stack at:(to))))". My thought was that this will remove all pieces in (to) before it moves the relevant stack there. For example: If I move the white piece in the center to 28 I want the neutral piece at 28 to be removed so the white piece does not land on top of it. This is not what happens, however. Nothing is removed, and the white piece ends up on top of the neutral piece.
What am I doing wrong?
In the attached .lud you are supposed to be able to move any neutral piece outward (so its distance to the center increases). But there are many places I am not allowed to move the neutrals on 21, 22, 29, 31, 38 and 39 to, even though they are further from the center. Try to move from 29 to 28, say.
The strange thing is: This only happens when I have the white piece on the center cell and have ("MoveZeroStack") inside (or) together with ("MoveWholeStack"). If I have simply (forEach Piece ("MoveZeroStack") Neutral top:true) in (play) and simply (place "Disc0" (sites Board)) in (start) this behavior goes away, even though nothing is changed in ("MoveZeroStack").
The other problem pertains to the same .lud:
I can't get (apply) to work in ("MoveWholeStack"). I have "(apply (remove (to) count:(size Stack at:(to))))". My thought was that this will remove all pieces in (to) before it moves the relevant stack there. For example: If I move the white piece in the center to 28 I want the neutral piece at 28 to be removed so the white piece does not land on top of it. This is not what happens, however. Nothing is removed, and the white piece ends up on top of the neutral piece.
What am I doing wrong?