11-26-2020, 02:56 PM
(11-26-2020, 01:57 PM)Eric Piette Wrote: That's a bit hard for me to provide a complete useful answer to the first problem but that's seems to be due to your condition in "MoveZeroStack", that one:
if:(<
(count Steps (from) (centrePoint))
(count Steps (to) (centrePoint))
)
So as far I understand what you try to do, the legal moves seems "correct".
And if you remove the piece in the middle, the condition stop:(< 0 (who at:(to))) is never reached, so the if: is never checked, that's why that seems works in that special case.
I don't think I got across how weird the behavior is. Having or not having a piece in the cetrePoint doesn't make a difference in itself. So ("MoveZeroStack") seems to work fine. The trouble is when I have a piece there and the following in (play):
Code:
(or
(forEach Piece ("MoveWholeStack") Mover top:true)
(forEach Piece ("MoveZeroStack") Neutral top:true)
)
The (or) is causing trouble. If I instead only have
Code:
(forEach Piece ("MoveZeroStack") Neutral top:true)
How can the logic of ("MoveZeroStack") change just because it is inside (or) together with ("MoveWholeStack")?
Also: Site 28 is 2 steps away from the centrePoint, and site 29 is 1 step away from the centrePoint. 2 is greater than 1. It shouldn't matter what is at the centrePoint. So if 29 is (from) and 28 is (to) the condition
Code:
(<
(count Steps (from) (centrePoint))
(count Steps (to) (centrePoint))
)
In the picture I have clicked 29 and it shows me all the places that I should be able to go. Those dots are in the right places. But when I try to move to 28 I get a message saying it is not a legal move.