10-28-2020, 03:33 PM
Hi Michael,
In the condition of your group you have "if:true" Consequently the empty sites, the sites occupied by P1 and the sites occupied by P2 all in the same group.
To do what you expect you need to call two times (forEach Group ...) in an (and ...) for each player.
Something like that should work in the last release version (1.1.0) released tomorrow.
In the version you are using now (8 or 9), you have to handle the (from) too (was in these versions the first site found in each group, but that's pointless, no need in the next version), so for the condition something like
Regards,
Eric
In the condition of your group you have "if:true" Consequently the empty sites, the sites occupied by P1 and the sites occupied by P2 all in the same group.
To do what you expect you need to call two times (forEach Group ...) in an (and ...) for each player.
Something like that should work in the last release version (1.1.0) released tomorrow.
Quote:(define "CalculateScore"
(and
(forEach Group Orthogonal if:(= (who at:(to)) P1)
(addScore P1
(*
(count Sites
in:(intersection (sites) (sites Occupied by:P1))
)
(count Sites
in:(intersection (sites) (sites Occupied by:P1))
)
)
)
)
(forEach Group Orthogonal if:(= (who at:(to)) P2)
(addScore P2
(*
(count Sites
in:(intersection (sites) (sites Occupied by:P2))
)
(count Sites
in:(intersection (sites) (sites Occupied by:P2))
)
)
)
)
)
)
In the version you are using now (8 or 9), you have to handle the (from) too (was in these versions the first site found in each group, but that's pointless, no need in the next version), so for the condition something like
Code:
(or
(= (who at:(from)) P1)
(= (who at:(to)) P1)
)
Regards,
Eric