11-10-2020, 01:17 PM
Hi,
Yes you have to check if the from location is not empty.
Here one way to do it:
Regards,
Eric
Yes you have to check if the from location is not empty.
Here one way to do it:
Code:
(game "Europa"
(players 2)
(equipment {
(board (hex 3))
(piece "Flag" Each)
(piece "HexA" Neutral)
(piece "HexB" Neutral)
(piece "HexC" Neutral)
(hand Shared size:3)
(hand Each size:1)
})
(rules
(start {
(place Stack "HexA0" (handSite Shared 0) count:6)
(place Stack "HexB0" (handSite Shared 1) count:6)
(place Stack "HexC0" (handSite Shared 2) count:6)
(place Stack "Flag1" (handSite P1 0) count:3)
(place Stack "Flag2" (handSite P2 0) count:3)
})
(play
(or
(forEach Site
(sites Hand Shared)
(if (!= 0 (count at:(site)))
(move
(from (site))
(to (sites Empty))
)
)
)
(forEach Site
(sites Hand Mover)
(if (!= 0 (count at:(site)))
(move
(from (site))
(to
(sites Board)
if:(= (size Stack at:(to)) 1)
)
)
)
)
)
)
(end (if (no Moves Next) (result Mover Win)))
)
)
Regards,
Eric