11-02-2020, 08:31 AM
Hi,
In your description you do not specify that's the enemy stack has to be removed but just the top enemy piece.
the "stack:true" in the (move Step ...) means that your stack can step on the top of the other stack.
And the (remove (to)) means you remove the top site of the stack of the (to) target site.
If you want to remove all the pieces in the stack before to move in it you have to add the count parameter to the (remove ...) ludeme to specify the number of pieces you want to remove before to move there.
So here for example
(remove (to) count:(size Stack at:(to)))
BUT, if you do not want to remove all the pieces in the stack but only one and be able to move that stack only if the top piece is owned by a specific player you can use
(forEach Piece top:true)
Regards,
Eric
In your description you do not specify that's the enemy stack has to be removed but just the top enemy piece.
the "stack:true" in the (move Step ...) means that your stack can step on the top of the other stack.
And the (remove (to)) means you remove the top site of the stack of the (to) target site.
If you want to remove all the pieces in the stack before to move in it you have to add the count parameter to the (remove ...) ludeme to specify the number of pieces you want to remove before to move there.
So here for example
(remove (to) count:(size Stack at:(to)))
BUT, if you do not want to remove all the pieces in the stack but only one and be able to move that stack only if the top piece is owned by a specific player you can use
(forEach Piece top:true)
Regards,
Eric