Sure! I tried also with "HandEmpty", but that doesn't do anything either :/
Note that I empty the hand before refilling it, because later I'll add the option to pass after placing a single stone. I'm just not there yet.
Code:
(define "Refill"
(remove (sites hand Mover)
(then
(add (piece (id "HexA" Mover)) (to (handSite Mover 0))
(then
(add (piece (id "HexB" Mover)) (to (handSite Mover 1)))
)
)
)
)
)
(game "Blooms"
(players 2)
(equipment {
(board (hex 5))
(piece "HexA" Each)
(piece "HexB" Each)
(hand Each size:2)
})
(rules
(start {
(place "HexA1" (handSite P1 0))
(place "HexB1" (handSite P1 1))
(place "HexA2" (handSite P2 0))
(place "HexB2" (handSite P2 1))
})
(play
(move
(from (sites Hand Mover))
(to (sites Empty))
(then
(if ("HandEmpty" Mover)
"Refill"
(moveAgain)
)
)
)
)
(end
(if
(>= (score Mover) 15)
(result Mover Win)
)
)
)
)
(metadata
(graphics {
(player Colour P1 (colour Blue))
(player Colour P2 (colour Red))
(piece Colour P1 "HexB" fillColour:(colour LightBlue) )
(piece Colour P2 "HexB" fillColour:(colour LightRed) )
})
)
Note that I empty the hand before refilling it, because later I'll add the option to pass after placing a single stone. I'm just not there yet.