(define "NumberOfDiscs" 10) (define "AllDiscsPlaced" (>= (count Turns) (- (* (count Players) ("NumberOfDiscs")) 1) ) ) (define "AddDisc" (move Add (piece (id "Disc" Mover)) (to (sites Occupied by:All component:"Ring") level:0 if:("IsSingletonStack" (to)) ) stack:True (then (moveAgain)) ) ) (define "MoveRing" (move (from (last To)) (to (sites Around (difference (sites Occupied by:All component:"Ring") (last To)) Orthogonal if:(is Empty (to)) ) ) ) ) (define "MoveDisc" (move (from (from) level:(level) ) (to (sites Occupied by:All component:"Ring") level:0 if:("IsSingletonStack" (to)) ) (then (moveAgain)) ) ) //------------------------------------------------------------------------------ (game "Ringo" (players 2) (equipment { (boardless Square) (piece "Disc" Each ("MoveDisc")) (piece "Ring" Each) }) (rules (start { (place "Ring1" (ahead (centrePoint) NE)) (place "Ring1" (ahead (centrePoint) SE)) (place "Ring1" (ahead (centrePoint) SW)) (place "Ring1" (ahead (centrePoint) NW)) (place "Ring2" (ahead (centrePoint) N)) (place "Ring2" (ahead (centrePoint) E)) (place "Ring2" (ahead (centrePoint) S)) (place "Ring2" (ahead (centrePoint) W)) }) phases:{ (phase "PlacePhase" (play (do (if ("NewTurn") ("AddDisc") ("MoveRing") ) ifAfterwards:(= 1 (count Groups)) ) ) (nextPhase Mover (and ("NewTurn") ("AllDiscsPlaced")) "MovePhase" ) ) (phase "MovePhase" (play (do (if ("NewTurn") (forEach Piece) ("MoveRing") ) ifAfterwards:(= 1 (count Groups)) ) ) ) } (end { (if (is Line 4 what:(id "Disc" P1)) (result P1 Win)) (if (is Line 4 what:(id "Ring" P1)) (result P1 Win)) (if (is Line 4 what:(id "Disc" P2)) (result P2 Win)) (if (is Line 4 what:(id "Ring" P2)) (result P2 Win)) }) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "An original n-in-row game with discs and rings.") (rules "Players complete two actions in turns: 1. Place a disc of their colour inside any ring. 2. Pick up the ring in which they placed their disc and move it somewhere else: – It must be placed horizontally or vertically adjacent to at least another ring. – It must be placed on an empty space (i.e. not over a disc or ring that was placed before). - If a player has used up his/her stock of discs, he/she continues by removing one of his/her discs from anywhere on the table and places it in a ring as usual. However rings and discs must always remain (orthogonally or diagonally) connected to form one unique group. The winner is the first player who succeeds in placing four of his/her discs or four of his/her rings in a horizontal, vertical or diagonal row. ") (id "676") (source "BGG") (version "1.3.14") (classification "board/space/line") (author "Julien Griffon") (publisher "Steffen-Spiele") (credit "Eric Piette and Cameron Browne.") (date "2018") } ) (graphics { (player Colour P1 (colour Red)) (player Colour P2 (colour Blue)) (piece Scale "Disc" 0.8) (piece Scale "Ring" 1.025) (stackType None) }) (ai "Ringo_ai" ) )