03-23-2021, 02:20 PM
In the attached game there is an add-move. Here is the define:
Notice that the to-region is an intersection with (sites Empty). Therefore, it should only be possible to add to empty sites. However, while generating random trials to check the logic of the game, I came across several instances of pieces being added to nonempty sites. The very last move of the included trial is an example. I have no idea how this can have happened, and I have not been able to reproduce it in a simpler version of the game. Any ideas?
Code:
(define "Deploy"
(move Add (piece (id "Hex" Mover))
(to
(intersection
(sites Empty)
(union
(sites Mover)
(sites Around
(sites Occupied by:Mover component:"Hex")
)
)
)
)
(then
(add (piece (id "Disc" Mover))
(to (last To))
stack:true
)
)
)
)