04-06-2021, 08:32 AM
Hi,
If I understand correctly what you are trying to do, this is not a capturing move, but just moving a piece in the farthest empty sites next to an enemy piece in the same direction.
In that case the correct description is
That's just the move you described inside a (do ...) ludeme checking if the piece after your move is an enemy piece.
Regards,
Eric
If I understand correctly what you are trying to do, this is not a capturing move, but just moving a piece in the farthest empty sites next to an enemy piece in the same direction.
In that case the correct description is
Code:
(do
(move
(from)
(to (sites LineOfSight Farthest at:(from)))
)
ifAfterwards:(is Enemy
(who
at:(ahead
(last To)
(directions Cell from:(from) to:(last To))
)
)
)
)
That's just the move you described inside a (do ...) ludeme checking if the piece after your move is an enemy piece.
Regards,
Eric