(define "Size" ) (define "NonAdjacent" (not (is Within (id "Disc" P2) in:(sites Around (to)))) ) (define "WhiteVC" (is Full)) (define "BlackVC" (is Loop)) (define "HexCorners" (start { (place "Disc2" { 0 (- (/ (- (* {3 #1 #1}) #1) 2) 1) (+ 1 (- (* {3 #1 #1}) (* 4 #1))) } ) (place "Disc2" {(- #1 1) (+ 1 (/ (- (* {3 #1 #1}) (* 5 #1)) 2)) (- (* {3 #1 #1}) (* 3 #1)) } ) } )) (define "Skip" (move Set NextPlayer (player (next))) ) (define "LimpCorners" (start { (place "Disc2" { 0 (- (/ (+ (* {3 #1 #1}) #1) 2) 1) (- (* 3 (* #1 #1)) #1) } ) (place "Disc2" { #1 (/ (- (* {3 #1 #1}) (* 3 #1)) 2) (- (* 3 (* #1 #1)) 1) } ) } )) (define "IsPlayingPhase" (= 1 (var))) (game "Coil" (players 2) (equipment { (board (hex )) (piece "Disc" Each) }) (rules phases: { (phase "Opening" (play (or (or (move Add (piece (id "Disc" P2)) (to (sites Empty) if:"NonAdjacent") (then (if (< (count MovesThisTurn) 2) (moveAgain))) ) "Skip" ) (if (= (count MovesThisTurn) 0) (move Pass (then (if (is Mover P1) (swap Players P1 P2 (then (note "Player 1 is now Black. Player 2 is now White." to:All) ) ) (note "Player 1 remains White. Player 2 remains Black." to:All) (then (do (set NextPlayer (player 1)) next:(set Var 1) // (var) represents the phase here ) ) ) ) )) ) ) (nextPhase ("IsPlayingPhase") "Playing") ) (phase "Playing" (play (move Add (to (sites Empty))))) } (end (forEach Player if:(and {("IsPlayingPhase") (= (id Player) (mover)) ("BlackVC")}) (result Player Win) ) ) ) ) //------------------------------------------------------------------------------ (option "Board Shape" args: { } { (item "Hexhex-corners" <("HexCorners" "Size")> "Played on a Hexagonal Board, pre-filled corners.") (item "Limping-corners" <("LimpCorners" "Size")> "Played on a Hexagonal (N,N+1 edged) Board, pre-filled corners.") } ) (option "Board Size" args:{ } { (item "7" <7> "The game is played on a board with 7 hexes per side.")** (item "8" <8> "The game is played on a board with 8 hexes per side.") (item "9" <9> "The game is played on a board with 9 hexes per side.") (item "10" <10> "The game is played on a board with 10 hexes per side.") (item "11" <11> "The game is played on a board with 11 hexes per side.") (item "12" <12> "The game is played on a board with 12 hexes per side.") }) //------------------------------------------------------------------------------ (metadata (info { (description "Coil is an asymmetrical but balanced 2-player connection game on a hexhex7 (or larger) board, where one player tries to form a loop of stones in his color, and the other tries to stop him. There's a chicken ballot at the start to ensure that the two sides are balanced. Because loops come in a wide range of sizes and shapes, and have many degrees of freedom, the game has rich tactics and strategy. Small loops threats force players to focus on local battles while large loop threats force them to think globally, and to consider how the local battles fit into the global war. Wise stone placements can contribute to the creation of multiple loops or to defense against multiple loops, leading to layered, multi-dimensional consequences for each turn.") (rules "This game is played on a hexagonal board made up of hexagonal cells, usually 7 cells per side, although bigger sizes may also be used. Initially the board is empty except for the six corner cells, upon which black stones are placed. Then the players take it in turns to place 1-3 black stones each turn until one decides to pass; that player then becomes Black, and the other becomes White. After that, players take it in turns to place one stone of their colour on the board on any empty hex. If Black forms a continuous loop composed of their pieces, they win; if the board fills up with no loop of Black pieces being formed, White wins. During the initial chicken ballot phase, you may add stones by clicking on available spaces, or skip the rest of your placements (by choosing the Next Player action). Alternatively, you may Pass at the start of your turn to take Black. After that, you and your opponent will alternate playing one stone of your colour per turn, until the board is full or Black forms a loop.") (id "1390") (version "1.3.12") (classification "board/space/connection") (author "Nick Bentley (used with permission)") (credit "Eric Silverman") (date "2009") } ) (graphics { (board Colour Phase0 (colour 223 178 110)) (board Colour InnerEdges (colour Black)) (board Colour OuterEdges (colour Black)) }) (ai "Coil_ai" ) )