07-09-2021, 07:23 AM
Hi,
Ok, that's working but I had to add a new optional parameter newRotation to the ludeme (sites Distance ...) so that will be available with the next release.
This new parameter is a function that you have to write which is using the iterator (value) to correspond to the rotation of the previous step and the result of this function is the new rotation state of the site reached by this previous step. Example (adapted from your original file):
This example is stepping Forward according to the initial rotation of the piece and at each step, the rotation increases by 1.
So for an initial rotation of 3 and a facing direction NNE for the white piece, the legal moves of that piece are in red in the attachment file.
I assume that's all that you need for your request :)
All of that will be in the next release.
Regards,
Eric
Ok, that's working but I had to add a new optional parameter newRotation to the ludeme (sites Distance ...) so that will be available with the next release.
This new parameter is a function that you have to write which is using the iterator (value) to correspond to the rotation of the previous step and the result of this function is the new rotation state of the site reached by this previous step. Example (adapted from your original file):
Code:
(sites Distance
(step
Forward
(to if:(is Empty (to)))
)
newRotation:(+ (value) 1)
from:(from)
(range 1 Infinity)
)
This example is stepping Forward according to the initial rotation of the piece and at each step, the rotation increases by 1.
So for an initial rotation of 3 and a facing direction NNE for the white piece, the legal moves of that piece are in red in the attachment file.
I assume that's all that you need for your request :)
All of that will be in the next release.
Regards,
Eric