Say I want a piece to be able to move to any site reachable by up to 3 steps onto empty cells. This can be done by letting it move to the following region:
But say I want to restrict movement to sites reachable by forwards steps onto empty cells. Then one might think the following would work:
It does not, however. My questions are: 1. Is this supposed to work. 2. If it is not supposed to work, what is the correct approach?
What happens, btw, is that the piece can only be moved 1 step forwards. And if I set the range to, say, (range 2 3), it can not move at all.
Hm.. I just noticed that this only lets me move to sites up to 2 steps away, as if (range 1 3) is not inclusive with regard to upper extent.. But it is supposed to be.
Code:
(define "Reachable1"
(sites Distance
(step
(to
if:(is Empty (to))
)
)
from:(from)
(range 1 3)
)
)
Code:
(define "Reachable2"
(sites Distance
(step
Forwards
(to
if:(is Empty (to))
)
)
from:(from)
(range 1 3)
)
)
What happens, btw, is that the piece can only be moved 1 step forwards. And if I set the range to, say, (range 2 3), it can not move at all.
Hm.. I just noticed that this only lets me move to sites up to 2 steps away, as if (range 1 3) is not inclusive with regard to upper extent.. But it is supposed to be.