(define "Nbors" (count Sites in:(intersection (sites Around #1) (sites Occupied by:All) ) ) ) (define "RegularRegions" (regions "Centre" (sites Centre)) (regions "CentreRing" (difference (expand (sites Centre)) (sites Centre))) (regions "OuterGoals" (expand (sites Corners))) ) (define "AlternateRegions" (regions "Centre" (sites Centre)) (regions "CentreRing" (difference (expand (sites Centre)) (sites Centre))) (regions "CornerSites" (sites {"B2" "J2" "R2" "B10" "R10" "B18" "J18" "R18"})) (regions "DotSites" (sites {"F6" "J6" "N6" "N10" "F10" "F14" "J14" "N14"})) (regions "OuterGoals" (difference (expand (sites "CornerSites")) (sites "CornerSites"))) ) //---------------------------------------------------------------- (game "Abak" (players ) (equipment { (board (square )) (piece "Disc" Each) }) (rules phases: { (phase "Placement" (play (move Add (to (intersection (sites "CentreRing") (sites Empty))))) (nextPhase (= (count Pieces All) ) "Movement") ) (phase "Movement" (play (move Add (to (difference (sites Playable) (sites Centre))) (then (forEach Site (sites Occupied by:All) (if (<= 4 ("Nbors" (to))) (remove (to)) ) (then (forEach Site (sites Occupied by:All) (if (= 0 ("Nbors" (to))) (remove (to)) ) ) ) ) ) ) ) ) } (end (if (is Connected {(sites "CentreRing") (sites "OuterGoals")}) (result Mover Win))) ) ) //------------------------------------------------------------------------------ (option "Board Size" args:{ } { (item "9x9" <9> <"RegularRegions"> "The game is played on a 9x9 board.") (item "11x11" <11> <"RegularRegions"> "The game is played on a 11x11 board.")** (item "15x15" <15> <"RegularRegions"> "The game is played on a 15x15 board.") (item "19x19" <19> <"AlternateRegions"> "The game is played on a 19x19 board.") }) (option "Players" args:{ } { (item "Two" <2> "Two players.")** (item "Three" <3> "Three players.") (item "Four" <4> "Four players.") (item "Five" <5> "Five players.") (item "Six" <6> "Six players.") }) //------------------------------------------------------------------------------ (metadata (info { (description "Abak is an abstract strategy game for 2 to 6 players and was invented in 2015 by the historian and chemist Prof. Dr. Luc Chanteloup.") (rules "The aim of Abak is to be the first player to connect one of the orange squares in the centre of the board to any one orange squares in the corners by forming a continuous row of counters of one colour. In the first phase, each player places one counter on one of the orange squares in the centre of the board. They continue to take turns to place their counters on a free adjacent square (squares are adjacent if they touch on the sides or diagonally by the points). The counter may be placed beside counters of any colour. Once placed, a counter may not be moved. During the game, if a counter is surrounded by more than 4 occupied squares, that counter is removed. Moreover, if then a counter becomes isolated, it is also removed from the board.") (id "784") (source "BGG") (version "1.3.14") (classification "board/space/connection") (author "Luc Chanteloup (used with permission)") (publisher "Lujees edition") (credit "Matthew Stephenson and Eric Piette") (origin "This game is from Le Mans (France), on 2015.") } ) (graphics { (region Colour "CentreRing" (colour 195 82 20)) (region Colour "OuterGoals" (colour 195 82 20)) (board Colour OuterEdges (colour Black)) (board Colour InnerEdges (colour Black)) (board Colour Phase0 (colour White)) (show Symbol "knotTriangle" "Centre") (show Symbol "dot" "DotSites" fillColour:(colour 195 82 20) edgeColour:(colour 195 82 20) scale:0.2) }) (ai "Abak_ai" ) )