08-11-2020, 10:41 AM
I don't want multiple hop sequences over single enemies, I want one hop over an unbroken line of enemies.
Here's an example: @ is the piece to move, e is empty, O is occupied.
@ e1 e2 O3 O4 O5 e6 e7 e8 O9
In this situation I want to allow either slide to e1 or e2, or a hop to e6. I naively tried to accomplish the latter with this formulation (since "between" takes a range between the before and after arguments, I assumed it would work).
(move Hop
(between
before:(count Rows)
(range 1 (count Rows))
after:0
if:(is Occupied (between))
(apply ...)
)
)
Here's an example: @ is the piece to move, e is empty, O is occupied.
@ e1 e2 O3 O4 O5 e6 e7 e8 O9
In this situation I want to allow either slide to e1 or e2, or a hop to e6. I naively tried to accomplish the latter with this formulation (since "between" takes a range between the before and after arguments, I assumed it would work).
(move Hop
(between
before:(count Rows)
(range 1 (count Rows))
after:0
if:(is Occupied (between))
(apply ...)
)
)