11-26-2020, 06:58 PM
Here is a piece of feedback on the Language Reference:
The ludeme (apply) seems to have some hidden default "if"-condition condition which it would be nice if were made explicit. The language reference is usually very clear on such things, but in the case of this ludeme no default value is stated.
I figured this out when trying to remove a neutral piece at the (to)-location. In the attached .lud the neutral piece is not removed when making the following move:
But it works if I add "if:true" or "if:(= 0 (who at:(to)))" to (apply), like this:
The ludeme (apply) seems to have some hidden default "if"-condition condition which it would be nice if were made explicit. The language reference is usually very clear on such things, but in the case of this ludeme no default value is stated.
I figured this out when trying to remove a neutral piece at the (to)-location. In the attached .lud the neutral piece is not removed when making the following move:
Code:
(define "MoveOntoNeutral"
(move
(from)
(to
(sites Direction
from:(from)
)
(apply (remove (to)))
)
stack:true
)
)
Code:
(define "MoveOntoNeutral"
(move
(from)
(to
(sites Direction
from:(from)
)
(apply if:true (remove (to)))
)
stack:true
)
)