(define "CanMoveAnotherStone" (can Move (do (set Var #2) next:(forEach Site (difference (sites Occupied by:Mover) #1) (step (from (site)) (directions Cell from:#1 to:(var)) (to if:(and (is Empty (to)) (not (is In (to) (sites "RedDots"))) ) ) ) ) ) ) ) //------------------------------------------------------------------------------ (game "Tandems" (players 2) (equipment { (board (square 5)) (piece "Pawn" Each (move Step (to if:(and { (is Empty (to)) (not (is In (to) (sites "RedDots"))) ("CanMoveAnotherStone" (from) (to)) }) ) (then (moveAgain)) ) ) (regions "RedDots" (sites {"B2" "B4" "D2" "D4"})) }) (rules (start { (place "Pawn1" (sites Bottom)) (place "Pawn2" (sites Top)) }) (play (if ("SameTurn") (forEach Site (difference (sites Occupied by:Mover) (last To)) (move Step (from (site)) ("LastDirection" Cell) (to if:(and (is Empty (to)) (not (is In (to) (sites "RedDots"))) ) ) ) ) (forEach Piece) ) ) (end { (if (and (is Mover P1) (all Sites (sites Occupied by:P1) if:(is In (site) (sites Top)))) (result P1 Win)) (if (and (is Mover P2) (all Sites (sites Occupied by:P2) if:(is In (site) (sites Bottom)))) (result P2 Win)) }) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "This game is played on a 5x5 board. Game starts with an initial setup position.") (rules "On each turn, each player must move two friendly stones to adjacent (diagonal or orthogonal) empty cells, both in the same direction. Stones cannot move into the restricted points on the game board. The player that first moves 5 stones to the last row wins the game.") (id "1821") (source "BGG") (version "1.3.14") (classification "board/race/fill") (credit "Eric Piette") (date "2000") } ) (graphics { (player Colour P1 (colour Green)) (player Colour P2 (colour Red)) (board Colour Phase0 (colour White)) (board Colour OuterEdges (colour Blue)) (board Colour InnerEdges (colour Blue)) (show Symbol "square" (sites {"B2" "B4" "D2" "D4"}) fillColour:(colour Red) edgeColour:(colour Red) scale:1) }) (ai "Tandems_ai" ) )