12-09-2020, 06:17 AM
The following extracted code in a script worked except that the pieces removed were not reflected in the scores on that turn.
The documentation implies and moves are sequential and remove defaults to immediate, so why wouldn't it reflect the change in piece count?
(define "UpdateScore"
(and
(set Score Mover (count Pieces Mover))
(set Score Next (count Pieces Next))
)
)
...
(play
(or
(move Pass)
(forEach Piece ... )
(then
(and
(forEach
Site
(sites Board)
(apply
if:(= 0
(count Sites
in:(intersection
(sites Empty)
(sites Around (site) includeSelf:true)
)
)
)
(remove (site))
)
)
("UpdateScore")
)
)
)
)
The documentation implies and moves are sequential and remove defaults to immediate, so why wouldn't it reflect the change in piece count?
(define "UpdateScore"
(and
(set Score Mover (count Pieces Mover))
(set Score Next (count Pieces Next))
)
)
...
(play
(or
(move Pass)
(forEach Piece ... )
(then
(and
(forEach
Site
(sites Board)
(apply
if:(= 0
(count Sites
in:(intersection
(sites Empty)
(sites Around (site) includeSelf:true)
)
)
)
(remove (site))
)
)
("UpdateScore")
)
)
)
)