11-17-2020, 08:54 PM
I have come upon some sort of scope confusion when I have several moves inside an (or) operator that have stack-parameters. An example:
As long as one of these has "stack:true" the pieces will stack whether I move from (sites Outer) or (sites Inner). This happens even when I explicitly set "stack" to false in one of them, as in the example. You can try for yourself in the attached .lud.
To be explicit: What I would have expected is that a piece that is moved from the outer ring of cells will stack on top of a piece if it is moved to an occupied cell, while a piece that is moved from the inner cells would replace a piece if moved to an occupied cell.
I first came upon this in the context of (add), but tried to replicate it with a different ludeme with a stack-parameter. This is the fruit of that attempt.
Code:
(or
(move
(from (sites Outer))
(to (sites Board))
stack:true
)
(move
(from (sites Inner))
(to (sites Board))
stack:false
)
)
To be explicit: What I would have expected is that a piece that is moved from the outer ring of cells will stack on top of a piece if it is moved to an occupied cell, while a piece that is moved from the inner cells would replace a piece if moved to an occupied cell.
I first came upon this in the context of (add), but tried to replicate it with a different ludeme with a stack-parameter. This is the fruit of that attempt.