text
stringlengths
218
3.08k
### PRE: (game "GAME_NAME" ### SUF: (equipment {(board (add (add (hole (merge (shift 0 8 (rectangle 4 20)) (shift 8 0 (rectangle 20 4))) (poly {{8 8} {8 11} {11 11} {11 8}})) cells:{{8 28 48 68 69 70 71 51 31 11 10 9}}) vertices:{{9.5 4} {15 4} {15 9.5} {15 15} {9.5 15} {4 15} {4 9.5} {4 4}}) {(track "Track" {144 145 146 147 148 149 150 151} loop:True)} use:Vertex) (dice d:2 from:0 num:7) (piece "PIECE_ALPHA" Each (move (from (from) level:(level)) (to (trackSite Move from:(from) "Track" steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (remove (to) level:(level)))))))) (hand Each) (map "Throw" {(pair 0 7) (pair 1 10) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 25) (pair 6 36) (pair 7 14)}) (map "Entry" {(pair P1 144) (pair P2 148)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:4) (place Stack "PIECE_ALPHA2" (handSite P2) count:4)}) (play (do (roll) next:(or (if (is Occupied (handSite Mover)) (move (from (handSite Mover)) (to (trackSite Move from:(mapEntry "Entry" Mover) "Track" steps:(- (mapEntry "ThrowDiceValue" (count Pips)) 1)) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (remove (to) level:(level)))))))) (forEach Piece)))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (players 2)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 7) {(track "HomeTrack1" "0,E,N1,W" P1 directed:True) (track "HomeTrack2" "27,W,S1,E" P2 directed:True) (track "MiddleTrack" "13,W,N1,E" loop:True) (track "EnemyTrack1" "14,E,N1,W,S1,E" P1 directed:True) (track "EnemyTrack2" "13,W,S1,E,N1,W" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:4) (map "Throw" {(pair 0 6) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) phases:{(phase "InitGame" (play (do (roll) next: ### SUF: (then (if (= 1 (mapEntry (count Pips))) (moveAgain))))) (nextPhase (= 1 (mapEntry (count Pips))) "Play")) (phase "Play" (play (do (roll) next:(forEach Site (sites Occupied by:Mover) (or {(if (is In (site) (sites Track Mover "HomeTrack")) (move (from (site)) (to (trackSite Move from:(site) "HomeTrack" steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) count:(count at:(to))))) count:(count at:(site)))) (if (is In (site) (sites Track Mover "MiddleTrack")) (move (from (site)) (to (trackSite Move from:(site) "MiddleTrack" steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) count:(count at:(to))))) count:(count at:(site)))) (if (is In (site) (sites Track Mover "EnemyTrack")) (if (if (is In (site) (sites Next "Home")) True (and (!= 0 (count Pieces Next in:(sites Next "Home"))) (= 0 (state at:(site))))) (move (from (site)) (to (trackSite Move from:(site) "EnemyTrack" steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) count:(count at:(to))))) count:(count at:(site)) (then (if (and (is In (last To) (sites Next "Home")) (= 0 (state at:(last To)))) (set State at:(last To) 1))))))})) (then (if (is In (mapEntry (count Pips)) (sites {1 4 6})) (moveAgain))))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (move Pass)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 3)) (piece "PIECE_ALPHA" P1) ### SUF: }) (rules (play (move Add (to (sites Empty)))) (end (if (is Line 3) (result Mover Win))))) ### MID: (piece "PIECE_BETA" P2)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (tiling T3464 1) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" ### SUF: ) (place "PIECE_ALPHA1" Cell 1) (place "PIECE_ALPHA1" Edge (sites {0 3 4 9})) (place "PIECE_ALPHA2" (sites {16 17 12 13})) (place "PIECE_ALPHA2" Cell 11) (place "PIECE_ALPHA2" Edge (sites {25 29 26 20}))}) (play (if (is Prev Mover) (move (from Cell (last To)) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Cell at:(from))) if:(and (= 1 (count Sites in:(intersection {(sites Empty Edge) (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))}))) (!= (last From) (to))))) (or {(forEach Piece on:Vertex (or (move Step (from Vertex) (to if:(is Empty Vertex (to))) (then (forEach Site (intersection (sites Incident Edge of:Vertex at:(last From)) (sites Incident Edge of:Vertex at:(last To))) (if (is Enemy (who Edge at:(site))) (remove Edge (site)))))) (move (from Vertex) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Vertex at:(from))))))) (forEach Piece on:Edge (or (move Step (from Edge) (to if:(is Empty Edge (to))) (then (forEach Site (intersection (sites Incident Vertex of:Edge at:(last From)) (sites Incident Vertex of:Edge at:(last To))) (if (is Enemy (who Vertex at:(site))) (remove Vertex (site)))))) (move (from Edge) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Edge at:(from))))))) (forEach Piece on:Cell (or {(move (from Cell) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Cell at:(from)))) (then (forEach Site (intersection (sites Incident Edge of:Cell at:(last From)) (sites Incident Edge of:Cell at:(last To))) (if (is Enemy (who Edge at:(site))) (remove Edge (site)))))) (move (from Cell) (to Cell (sites Incident Cell of:Cell at:(from)) if:(and (is Enemy (who Cell at:(to))) (= 1 (count Sites in:(intersection {(sites Empty Edge) (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))})))) (apply (remove Cell (to)))) (then (moveAgain))) (move (from Cell) (to Cell (forEach (sites Empty Cell) if:(= 1 (count Sites in:(intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(site))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who Vertex at:(site))) (remove Vertex (site)))))) (move (from Cell) (to Edge (intersection (sites Empty Edge) (sites Incident Edge of:Cell at:(from))))) (move (from Cell) (to Vertex (intersection (sites Empty Vertex) (sites Incident Vertex of:Cell at:(from)))))}))}))) (end (if (>= 1 (+ {(count Pieces Vertex Next) (count Pieces Edge Next) (count Pieces Cell Next)})) (result Mover Win))))) ### MID: (sites {4 5 0 1})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (meta (swap)) (play (or (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty))) ifAfterwards:(or (not (all Sites (sites Around (last To) Enemy Orthogonal) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Next (who at:(to)))))))) (not (all Sites (sites Around (last To) Own Orthogonal) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))))))) (then (and (forEach Site (sites Around (last To) Enemy Orthogonal) (if (= 0 (count Liberties at:(site) Orthogonal if:(is Next (who at:(to))))) (remove (sites Group at: ### SUF: Orthogonal if:(is Next (who at:(to))))))) (forEach Site (sites Around (last To) Own Orthogonal) (if (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))) (remove (sites Group at:(site) Orthogonal if:(is Mover (who at:(to)))))))))) (do (move Add (to (sites Empty))) ifAfterwards:(not (or (not (all Sites (sites Around (last To) Enemy Orthogonal) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Next (who at:(to)))))))) (not (all Sites (sites Around (last To) Own Orthogonal includeSelf:True) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))))))))))) (end {(if (and (> (count Moves) 2) (no Pieces Next)) (result Next Loss)) (if (and {(> (count Moves) 2) (no Pieces Mover) (not (no Pieces Next))}) (result Mover Loss))}))) ### MID: (site)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 6 10)) (tile "Z" Shared {F R F F L F}) (tile "Y" Shared {F R F R R F R F F}) (tile "X" Shared {F L F L L F F L L F R F}) (tile "W" Shared {F L F R F L F}) (tile "V" Shared {F F R F F}) (tile "U" Shared {F L F F L F}) (tile "T" Shared {F F R F R R F F}) (tile "P" Shared {F F R F R F}) (tile "N" Shared {F R F L F F}) (tile "L" Shared {F R F F F}) ### SUF: (tile "F" Shared {F L F L L F L F R F}) (hand Shared size:12)}) (rules (start {(place "F" (handSite Shared 0)) (place "I" (handSite Shared 1)) (place "L" (handSite Shared 2)) (place "N" (handSite Shared 3)) (place "P" (handSite Shared 4)) (place "T" (handSite Shared 5)) (place "U" (handSite Shared 6)) (place "V" (handSite Shared 7)) (place "W" (handSite Shared 8)) (place "X" (handSite Shared 9)) (place "Y" (handSite Shared 10)) (place "Z" (handSite Shared 11))}) (play (move (from (sites Hand Shared)) (to (sites Empty)))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (tile "I" Shared {F F F F})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 8) {(track "Track1" "0,E,N1,W,N1,E,S1,W" loop:True P1) (track "Track2" "23,W,S1,E,S1,W,N1,E" loop:True P2)}) (dice d:2 from:0 num:4) (piece "PIECE_ALPHA" Each (if (and {(if (!= 0 (state at:(from))) True (= 1 (count Pips)))}) (if (and (not (is Friend (who at:(trackSite Move steps:(count Pips))))) (if (not (is In (from) (sites Mover "Home"))) True (if (is In (trackSite Move steps:(count Pips)) (sites Mover "Home")) True (= (count Pieces Mover in:(difference (sites Board) (sites Mover "Home"))) 0)))) (move (from) ### SUF: (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (count Pips))) (set State at:(last To) 1))))))) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (roll) next:(if (= 1 (count Pips)) (priority {(forEach Piece (if (and {(if (!= 0 (state at:(from))) True (= 1 (count Pips))) (is In (from) (sites Mover "Home"))}) (if (and (not (is Friend (who at:(trackSite Move steps:(count Pips))))) (if (not (is In (from) (sites Mover "Home"))) True (if (is In (trackSite Move steps:(count Pips)) (sites Mover "Home")) True (= (count Pieces Mover in:(difference (sites Board) (sites Mover "Home"))) 0)))) (move (from) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to)))) (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (count Pips))) (set State at:(last To) 1))))))) (forEach Piece)}) (forEach Piece)) (then (if (= 1 (count Pips)) (moveAgain))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (keep (square 8) (poly {{-3 4} {4 -3} {11 4} {4 11}}))) (piece "PIECE_ALPHA" P1 N (or (move Slide (between (max 2) trail:(id "PIECE_BETA0"))) (move Hop (between if:(= (what at:(between)) (id "PIECE_BETA0" Neutral))) (to if:(is Empty (to))) (then (add (piece "PIECE_BETA0") (to (last From))))))) (piece "PIECE_GAMMA" P2 (or {(move Slide (between (max 2) trail:(id "PIECE_BETA0"))) (move Hop (between if:(= (what at:(between)) (id "PIECE_BETA0" Neutral))) (to if:(is Empty (to))) (then (add (piece "PIECE_BETA0") (to (last From))))) (move Step (to if:(= (what at:(to)) (id "PIECE_ALPHA1" P1)) (apply (remove (to)))) (then (and (remove (last To)) (add (piece "PIECE_BETA0") (to (last From))))))})) (piece "PIECE_BETA" Neutral)}) (rules (start {(place "PIECE_GAMMA2" {"G2" "G7"}) (place "PIECE_ALPHA1" {"B2" "B7"})}) (play (forEach Piece)) (end {(if (= (count Sites in:(sites Occupied by:All)) 0) (result P2 Win)) (if (and (no Moves P1) (not (can Move (forEach Piece "PIECE_GAMMA" (step (to if:(= (what at:(to)) ### SUF: ))))))) (result P1 Win)) (if (all Passed) (result P1 Win))}))) ### MID: (id "PIECE_ALPHA1" P1)
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (concentric {4 4 4 4 4 4 4 4}) {(track "Track1" {28 24 20 16 12 8 4 0} P1 directed:True) (track "Track2" {29 25 21 17 13 9 5 1} P2 directed:True) (track "Track3" {30 26 22 18 14 10 6 2} P3 directed:True) (track "Track4" {31 27 23 19 15 11 7 3} P4 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Shared) (hand Each size:2)}) (rules (start {(place "PIECE_ALPHA1" 28) (place "PIECE_ALPHA2" 29) (place "PIECE_ALPHA3" 30) (place "PIECE_ALPHA4" 31)}) phases:{(phase "Hiding" (play (move Add (piece (id "PIECE_BETA" Shared)) (to Cell (sites Hand Mover)) (then (set Hidden Cell at:(last To) to:Next)))) (nextPhase "Guessing")) (phase "Guessing" (play (move Select (from Cell (sites Hand Prev)) (then (and (if (is Empty (last To)) (and (fromTo (from (where "PIECE_ALPHA" Prev)) (to (if (is Prev P1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track1" steps:1) (if (is Prev P2) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track2" steps:1) (if (is Prev P3) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track3" steps:1) (trackSite Move from: ### SUF: "Track4" steps:1)))))) (if (not (is In (if (is Prev P1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track1" steps:1) (if (is Prev P2) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track2" steps:1) (if (is Prev P3) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track3" steps:1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track4" steps:1)))) (sites Centre))) (set NextPlayer (player (prev))))) (and {(moveAgain) (fromTo (from (where "PIECE_ALPHA" Mover)) (to (trackSite Move from:(where "PIECE_ALPHA" Mover) steps:1)))})) (remove Cell (sites Hand Prev)))))) (nextPhase "Hiding"))} (end (if (!= (- (count Players) (count Active)) (count Sites in:(forEach (sites Centre) if:(is Occupied (site))))) {(if (and (is Active P1) (is In (where "PIECE_ALPHA" P1) (sites Centre))) (result P1 Win)) (if (and (is Active P2) (is In (where "PIECE_ALPHA" P2) (sites Centre))) (result P2 Win)) (if (and (is Active P3) (is In (where "PIECE_ALPHA" P3) (sites Centre))) (result P3 Win)) (if (and (is Active P4) (is In (where "PIECE_ALPHA" P4) (sites Centre))) (result P4 Win))})))) ### MID: (where "PIECE_ALPHA" Prev)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (piece "PIECE_ALPHA" Each (or (move Slide) (move Slide Diagonal (between if:(is Empty (between))) (to if:(and (is Empty (to)) (= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site)))))) (apply if:(or (= (between) (to)) (!= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site))))))))) (then (moveAgain)))) (piece "PIECE_BETA" Neutral)}) (rules (start {(place "PIECE_ALPHA1" {"B2" "G2" "E5" "B7"}) (place "PIECE_ALPHA2" {"L12" "G12" "L7" "I9"})}) phases:{(phase "Opening" P1 (play (forEach Piece (or (move Slide) (move Slide Diagonal (between if:(is Empty (between))) (to if:(and ### SUF: (= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site)))))) (apply if:(or (= (between) (to)) (!= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site)))))))))))) (nextPhase Mover "Playing")) (phase "Playing" (play (if (is Prev Mover) (or (move Shoot (piece "PIECE_BETA0")) (move Shoot (piece "PIECE_BETA0") Diagonal (between if:(is Empty (between))) (to if:(and (is Empty (to)) (!= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site))))))))) (forEach Piece))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (is Empty (to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 2 (square 5 diagonals:Alternating)) (wedge 3)) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove ### SUF: ))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (difference (expand (sites Top) steps:2) (sites {"C5"}))) (place "PIECE_ALPHA1" coord:"C5")}) (play (forEach Piece)) (end {(if (no Moves Next) (result Next Loss)) (if (<= (count Pieces P2) 0) (result P2 Loss))}))) ### MID: (between)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (renumber (splitCrossings (add (regular Star 6) edges:{{0 5} {1 4} {2 3}}))) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (regions "Palace1" P1 (sites {"E7"})) (regions "Palace2" P2 (sites {"E1"}))}) (rules (start {(place "PIECE_ALPHA1" (sites {"E1" "A2" "D2" "E2" "F2" "I2"})) (place "PIECE_ALPHA2" (sites {"E7" "A6" "D6" "E6" "F6" "I6"}))}) (play ### SUF: ) (end {(if (no Moves Next) (result Mover Win)) (if (and {(= 1 (count Pieces P1)) (= 1 (count Pieces P2)) (= 1 (count Pieces P1 "PIECE_BETA")) (= 1 (count Pieces P2 "PIECE_BETA"))}) (result Mover Draw))}))) ### MID: (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (directions {Forwards Rightward Leftward} bySite:True) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Mover)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forwards Rightward Leftward} bySite:True) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Mover)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step (to if:(is Empty (to))))))})
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (from (from) level:(level)) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_BETA" Each (move Slide (from (from) level:(level)) Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_GAMMA" Each (move Hop (from (from) level:(level)) Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_DELTA" Each (move Leap (from (from) level:(level)) {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_EPSILON" Each (move Step (from (from) level:(level)) Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_ZETA" Each (or (move Step (from (from) level:(level)) Forward (to if: ### SUF: )) (move Step (from (from) level:(level)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (forEach Level (to) (remove (to) level:(level)))))) (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (id "PIECE_EPSILON" Mover))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_GAMMA1" (sites {"C1" "F1"})) (place "PIECE_BETA1" (sites {"C2" "F2"})) (place "PIECE_DELTA1" (sites {"D2" "E2"})) (place "PIECE_ALPHA1" coord:"E1") (place Stack "PIECE_ZETA1" (sites Row 2)) (place Stack "PIECE_EPSILON1" (sites {"D3"})) (place "PIECE_GAMMA2" (sites {"C8" "F8"})) (place "PIECE_BETA2" (sites {"C7" "F7"})) (place "PIECE_DELTA2" (sites {"D7" "E7"})) (place "PIECE_ALPHA2" coord:"E8") (place Stack "PIECE_ZETA2" (sites Row 5)) (place Stack "PIECE_EPSILON2" (sites {"D6"}))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win))}))) ### MID: (is Empty (to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5) use:Vertex) (piece "PIECE_ALPHA" Each) (regions P1 {(sites Top) (sites Bottom)}) (regions P2 {(sites Left) (sites Right)})}) (rules phases:{(phase "Opening" (play (move Add (to (intersection (sites Top) (sites Left))))) (nextPhase "Main")) (phase "Main" (play (if (is Mover P1) (move Select (from (sites Top) if:(not (is In (column of:(from)) (sites Pending)))) (then (and {(if (is Enemy (who at:(coord row:0 column:(column of:(last From))))) (set Pending (row of:(coord row:0 column:(column of:(last From)))))) (push (from (last To)) S) (add (piece (id "PIECE_ALPHA" Mover)) (to (last To)))}))) (move Select (from (sites Left) if:(not (is In (row of:(from)) (sites Pending)))) (then (and {(if (is Enemy (who at:(coord row:(row of:(last From)) column:(- (count Columns) 1)))) (set Pending (column of:(coord row:(row of:(last From)) column:(- (count Columns) 1))))) (push (from (last To)) E) (add (piece (id "PIECE_ALPHA" Mover)) (to (last To)))}))))))} (end {(if (!= 0 (count Sites in:(forEach (sites Occupied by:P1) if:(is Connected at:(site) All P1)))) (result P1 Win)) (if (!= 0 (count Sites in:(forEach (sites Occupied by:P2) if:(is Connected at:(site) All P2)))) ### SUF: )}))) ### MID: (result P2 Win)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 13) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "51,W,S1,E,S1,W,S1,E" P2 directed:True)}) (dice d:2 from:0 num:4) (map {(pair 0 6) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (piece "PIECE_ALPHA" Each (if (or (= (state at:(from)) 0) (and (= 1 (mapEntry (count Pips))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry (count Pips))) -1) (if (or (not (is In (from) (sites Next))) (and (is In (from) (sites Next)) (= (count Sites in:(intersection (sites Occupied by:Next) (sites Next))) 0))) (if (or (is In (trackSite Move steps:(mapEntry (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry (count Pips)))))) (or (if (= (+ (mapEntry (count Pips)) 1) (count at:(from))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) count:(mapEntry (count Pips)))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) count:(count at:(from)))) (if (and (is In (trackSite Move steps:(mapEntry (count Pips))) (sites "CentralRows")) (is Friend (who at:(trackSite Move steps:(mapEntry (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips)))))))) (then (set State at:(last To) 0))))) (regions "AnotherThrow" (sites {1 4 6})) (regions "CentralRows" (union (sites Row 1) (sites Row 2))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" ### SUF: state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (is In (mapEntry (count Pips)) (sites "AnotherThrow")) (moveAgain)))) (move Pass (then (if (is In (mapEntry (count Pips)) (sites "AnotherThrow")) (moveAgain))))))) (end (if (or (and (= (count Sites in:(difference (sites Occupied by:P1) (sites P2))) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites P1))) 0)) (no Pieces Mover)) (byScore))))) ### MID: (sites Bottom)
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (if (= 3 (count Pieces Mover)) (move (from (from)) (to (sites Empty))) (move Step (to if:(is Empty (to)))) (then (if (is Line 3 Orthogonal) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (forEach Piece))))} (end (forEach NonMover if:(= 2 (count Pieces Player)) (result Player Loss)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (scale 2 (square 5 diagonals:Alternating)) (graph vertices:{{4 8} {3 9} {4 9} {5 9} {2 10} {3 10} {4 10} {5 10} {6 10} {1 11} {3 11} {4 11} {5 11} {7 11}} edges:{{0 1} {0 2} {0 3} {1 4} {1 5} {1 2} {2 6} {2 3} {3 7} {3 8} {4 9} {4 5} {5 10} {5 6} {6 11} {6 7} {7 12} {7 8} {8 13} {9 10} {10 11} {11 12} {12 13}})) use:Vertex) (piece "PIECE_ALPHA" P1 (if (is Prev Mover) (or (move Pass) (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and ### SUF: (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))) (piece "PIECE_BETA" P2 N (move Step Forwards (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (union (expand (sites Bottom)) (sites {"A3" "I3"}))) (place "PIECE_ALPHA1" (coord "E7"))}) (play (forEach Piece)) (end {(if (no Pieces P2) (result P1 Win)) (if (no Moves P1) (result P2 Win)) (if (no Moves P2) (result Mover Draw))}))) ### MID: (not (is In (between) (sites ToClear)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {0 1 2 3 4 5 7 8 9 10 11 12 25 24 23 22 21 20 18 17 16 15 14 13 -2} P1 directed:True) (track "Track2" {25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12 -2} P2 directed:True)} use:Vertex) (dice num:2) (regions "Home" P1 {20 21 22 23 24 25}) (regions "Home" P2 {7 8 9 10 11 12}) (regions "Side" P1 {0 1 2 3 4 5 6 7 8 9 10 11 12}) (regions "Side" P2 {13 14 15 16 17 18 19 20 21 22 23 24 25}) (map {(pair 1 0) (pair 2 25)}) (piece "PIECE_ALPHA" Each (forEach Die replayDouble:True if:(and {(!= (pips) 0) (!= (trackSite Move from:(from) steps:(pips)) -1) (!= (trackSite Move from:(from) steps:(pips)) -2)}) (if (or {(not (= (from) (mapEntry (mover)))) (and (= ### SUF: (mapEntry (mover))) (!= (topLevel at:(from)) 13)) (not (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "Side"))))}) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(not (is Enemy (who at:(to)))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 0 count:15) (place Stack "PIECE_ALPHA2" 25 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "Home"))) (forEach Die replayDouble:True if:(!= (pips) 0) (forEach Site (sites Occupied by:Mover) (if (and (is Occupied (site)) (!= (trackSite Move from:(site) steps:(pips)) -1)) (if (= (trackSite Move from:(site) steps:(pips)) -2) (move Remove (site)) (move (from (site)) (to (trackSite Move from:(site) steps:(pips)) if:(not (is Enemy (who at:(to)))))))) noMoveYet:(firstMoveOnTrack "Track" Mover (if (and (is Friend (who at:(site))) (< (trackSite Move from:(site) steps:(pips)) 0)) (move Remove (site)))) (then (if (not (all DiceUsed)) (moveAgain))))) (max Distance "Track" Mover (forEach Piece top:True (then (if (not (all DiceUsed)) (moveAgain)))))))) (end (if (no Pieces Mover) (byScore {(score P1 (if (is Mover P1) (if (= (size Stack in:(sites Occupied by:P2)) 15) 2 1) 0)) (score P2 (if (is Mover P2) (if (= (size Stack in:(sites Occupied by:P1)) 15) 2 1) 0))}))))) ### MID: (from)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:5)) phases:{(phase "Placement" (play (move (from (handSite Mover)) ### SUF: )) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (is Line 5) (result Mover Win))))) ### MID: (to (sites Empty))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "PIECE_BETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_DELTA" Each (move Slide Diagonal ### SUF: )) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "PIECE_ZETA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 2)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 0))}) (rules (start {(place "PIECE_ALPHA1" coord:"B2") (place "PIECE_GAMMA1" coord:"B1") (place "PIECE_DELTA1" coord:"A1") (place "PIECE_EPSILON1" coord:"A2") (place "PIECE_ALPHA2" coord:"F6") (place "PIECE_GAMMA2" coord:"F7") (place "PIECE_DELTA2" coord:"G7") (place "PIECE_EPSILON2" coord:"G6") (place "PIECE_ZETA1" {"A3" "B3" "C3" "C2" "C1"}) (place "PIECE_ZETA2" {"E7" "E6" "E5" "F5" "G5"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"PIECE_GAMMA" "PIECE_DELTA" "PIECE_EPSILON"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))})) ### MID: (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter)))))
### PRE: (game "GAME_NAME" (players 6) (equipment {(board (add (remove (concentric {44}) vertices:{43 21 0 22}) edges:{{20 18} {0 1} {19 21} {38 39}}) {(track "TrackCW" {39 35 33 31 29 27 25 23 21 19 38 17 15 13 11 9 7 5 3 1 37 0 2 4 6 8 10 12 14 16 36 18 20 22 24 26 28 30 32 34} loop:True) (track "TrackCCW" {39 34 32 30 28 26 24 22 20 18 36 16 14 12 10 8 6 4 2 0 37 1 3 5 7 9 11 13 15 17 38 19 21 23 25 27 29 31 33 35} loop:True)} use:Edge) (regions "AllSites" (sites Board)) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2) (dice d:2 from:0 num:3) (hand Each) (map "Throw" {(pair 0 5) (pair 1 3) (pair 2 2) (pair 3 10)})}) (rules (start {(place Stack "PIECE_ALPHA1" Edge 36 count:2) (place Stack "PIECE_ALPHA2" Edge 38 count:2) (set Team 1 {P1 P3 P5}) (set Team 2 {P2 P4 P6})}) (play (do (roll) next:(if (is In (mover) (players Team1)) (move (from (sites Occupied by:Team1)) (to (trackSite Move "TrackCW" steps:(mapEntry "Throw" (count Pips))) if:(not (is Enemy (who at:(to)))))) (move (from (sites Occupied by:Team2)) (to (trackSite Move "TrackCCW" steps:(mapEntry "Throw" (count Pips))) if:(not (is Enemy (who at:(to))))))) (then (if (= 10 (mapEntry "Throw" (count Pips))) (moveAgain))))) (end {(if (and {(is In (mover) (players Team1)) (= 1 (count Sites in:(sites Occupied by:Team1))) (= 36 (where "PIECE_ALPHA" Team1))}) ### SUF: ) (if (and {(is In (mover) (players Team2)) (= 1 (count Sites in:(sites Occupied by:Team2))) (= 38 (where "PIECE_ALPHA" Team2))}) (result Team2 Win))}))) ### MID: (result Team1 Win)
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Neutral)}) (rules (start {(place "PIECE_ALPHA0" coord:"D5" state:1) (place "PIECE_ALPHA0" coord:"E5" state:2) (place "PIECE_ALPHA0" coord:"E4" state:3) ### SUF: }) (play (priority (forEach Site (sites Empty) (append (custodial (from (site)) (between if:(is Enemy (state at:(between))) (apply (allCombinations (add (piece "PIECE_ALPHA0" state:(mover)) (to (site))) (set State at:(between) (mover))))) (to if:(is Friend (state at:(to))))))) (move Add (piece "PIECE_ALPHA0" state:(mover)) (to (sites Around (sites Occupied by:Neutral) Empty))) (then (forEach Player (set Score Player (count Sites in:(sites State (player)))))))) (end (if (all Passed) (byScore))))) ### MID: (place "PIECE_ALPHA0" coord:"D4" state:4)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 9 9 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Board) if:(< (site) (centrePoint)))) (place "PIECE_ALPHA2" (forEach (sites Board) if:(> (site) (centrePoint))))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if: ### SUF: ) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (forEach Player if:(no Pieces Player) (result Player Loss))))) ### MID: (and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge (rectangle 3 6) (shift 7 0 (rectangle 3 6))) edges:{{5 18} {11 24} {17 30}}) {(track "Track1" "36,6,E,N1,W,0,E,End" P1 directed:True) (track "Track2" "38,6,E,S1,W,12,E,End" P2 directed:True)} use:Vertex) (dice num:3) (hand Each size:2) (piece "PIECE_ALPHA" Each (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(from) steps:(pips)) -1)) (if (= (trackSite Move from:(from) steps:(pips)) -2) (move Select (from (from)) (then (if (= (count at:(last To)) 1) (remove (last To)) (set Count at:(last To) (- (count at:(last To)) 1))))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(not (and (is Enemy (who at:(to))) (> (count at:(to)) 1))) (apply if:(and (is Enemy (who at:(to))) (= (count at:(to)) 1)) (fromTo (from (to)) (to (handSite Next 1)))))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:15) (place "PIECE_ALPHA2" (handSite P2) count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (!= (what at:(handSite Mover 1)) 0) (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(handSite Mover) steps:(pips)) -1)) (if (= (trackSite Move from:(handSite Mover) steps:(pips)) -2) (move Select (from (handSite Mover 1)) (then (if (= (count at:(last To)) 1) (remove (last To)) (set Count at:(last To) (- (count at:(last To)) 1))))) (move (from (handSite Mover 1)) (to (trackSite Move from:(handSite Mover) steps:(pips)) if:(not (and (is Enemy (who at:(to))) (> (count at:(to)) 1))) (apply if:(and (is Enemy (who at:(to))) (= (count at:(to)) 1)) (fromTo (from (to)) (to (handSite Next 1)))))))) (or (forEach Piece) (forEach Piece container:(mover))) (then (if (can Move (if (!= (what at:(handSite Mover 1)) 0) (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(handSite Mover) steps:(pips)) -1)) ### SUF: ) (or (forEach Piece) (forEach Piece container:(mover))))) (moveAgain)))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (if (= (trackSite Move from:(handSite Mover) steps:(pips)) -2) (move Select (from (handSite Mover 1)) (then (if (= (count at:(last To)) 1) (remove (last To)) (set Count at:(last To) (- (count at:(last To)) 1))))) (move (from (handSite Mover 1)) (to (trackSite Move from:(handSite Mover) steps:(pips)) if:(not (and (is Enemy (who at:(to))) (> (count at:(to)) 1))) (apply if:(and (is Enemy (who at:(to))) (= (count at:(to)) 1)) (fromTo (from (to)) (to (handSite Next 1)))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 10)) (hand Each) (piece "PIECE_ALPHA" Each (or {(move Step (to if:(is Empty (to))) (then (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain))))) (move Select (from) (to (intersection (sites Occupied by:Enemy container:"Board") (sites Distance from:(from) (range 1 (state at:(from)))))) (then (and (if (= (value Piece at:(last To)) 1) (remove (last To)) (set Value at:(last To) (- (value Piece at:(last To)) 1))) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain)))))) (move Select (from) (to (intersection (sites Occupied by:Enemy container:"Board") (sites Distance from:(from) (range 1 (state at:(from)))))) (then (and (addScore (player (who at:(last To))) 1) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain)))))) (move Select (from) (to) (then (and (if (< (state at:(last To)) 100) (set State at:(last To) (+ 1 (state at:(last To))))) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain))))))}) maxState:100)}) (rules (meta (passEnd NoEnd)) (start {(set Score Each 1) (place "PIECE_ALPHA1" (handSite P1) state:2 value:3) (place "PIECE_ALPHA2" (handSite P2) state:2 value:3)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) ### SUF: ) (phase "Movement" (play (or (forEach Piece) (move Pass (then (addScore Mover 1))))))} (end (forEach NonMover if:(no Pieces Player) (result Player Loss))))) ### MID: (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union (sites Row 1) (sites Row 2))) (place "PIECE_ALPHA2" (union (sites Row 5) (sites Row 6)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from ### SUF: ) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 180 (merge (shift 0 2 (square 5 diagonals:Alternating)) (wedge 3))) use:Vertex) (piece "PIECE_ALPHA" P1 ### SUF: ) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" coord:"C6") (place "PIECE_BETA2" (expand (sites Bottom) steps:2))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P1 Loss)) (if (<= (count Pieces P2) 6) (result P1 Win))}))) ### MID: (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (piece "PIECE_GAMMA" Neutral) (hand Each)}) (rules (start (place "PIECE_GAMMA0" (sites Board))) (play (if (is Prev Mover) (or {(move Select (from (difference (intersection (sites Left) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) E) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Right) (sites Row (row of:(last To)))) (sites {(last To)}))) (then ### SUF: )) (move Select (from (difference (intersection (sites Bottom) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) N) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})))}) (move Select (from (sites Outer)) (then (and (fromTo (from (last To)) (to (handSite (mover)))) (moveAgain)))))) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (and {(push (from (last To)) W) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (hand P1) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_BETA2" (sites Corners)) (place "PIECE_ALPHA1" (handSite P1) count:20)}) phases:{ ### SUF: (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves Next) (result Next Loss)) (if (<= (count Pieces P1) 0) (result P1 Loss))}))) ### MID: (phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (tri {3 5 3 5 3}) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start (set Score Each 0)) (play (if (is Prev Mover) (if (= 0 (size Array (values Remembered))) (forEach Piece (move Hop (from if:(!= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece (id "PIECE_ALPHA" Mover)) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty (to)))))) (moveAgain))})))))) (forEach Piece (move Hop (from if:(= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece (id "PIECE_ALPHA" Mover)) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty (to)))))) (moveAgain))}))))))) (do (forget Value All) next:(move Add (piece (id "PIECE_ALPHA" Mover)) (to (sites Empty)) (then (if (can Move (forEach Piece (move Hop (from if:(!= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece ### SUF: ) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty (to)))))) (moveAgain))}))))))) (moveAgain))))) (then (and (set Score Mover (count Pieces Mover)) (set Score Next (count Pieces Next)))))) (end {(if (and (or {(no Moves Next) (all Passed)}) (= (score Mover) (score Next))) (result Mover Win)) (if (and (or {(no Moves Next) (all Passed)}) (!= (score Mover) (score Next))) (byScore))}))) ### MID: (id "PIECE_ALPHA" Mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end { ### SUF: (if (is Line 3 P2) (result P2 Win))}))) ### MID: (if (no Moves P2) (result P1 Win))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(shift 1 0 (rectangle 4 2)) (shift 0 1 (rectangle 2 4))}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(and (= 0 (state at:(to))) (if (< (count MovesThisTurn) 2) (is Empty (to)) (is In (to) (union (sites Occupied by:Next) (sites Empty))))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (= 2 (count Sites in:(forEach (sites Board) if:(= 1 (state at:(site)))))) (forEach Site (sites Board) (if (= 1 (state at:(site))) (set State at:(site) 0))) (and (set State at:(last From) 1) (moveAgain))))))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (if (is Prev Mover) (move Step (from (last To)) (to if: ### SUF: (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (= 2 (count Sites in:(forEach (sites Board) if:(= 1 (state at:(site)))))) (forEach Site (sites Board) (if (= 1 (state at:(site))) (set State at:(site) 0))) (and (set State at:(last From) 1) (moveAgain))))) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (and (= 0 (state at:(to))) (if (< (count MovesThisTurn) 2) (is Empty (to)) (is In (to) (union (sites Occupied by:Next) (sites Empty)))))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))) (then (set Value Mover 1))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_BETA" Each (or (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (set Value Mover 0))) (move Slide (then (set Value Mover 1))))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (or ### SUF: (do (set Pending (sites From (or (forEach Piece "PIECE_ALPHA" (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))))) next:(forEach Piece)))) (end (if (no Pieces Mover) (result Mover Loss))))) ### MID: (if (= (value Player Prev) 1) (or (if (and (is In (last From) (sites Pending)) (is In (last From) (sites Empty))) (move Select (from (last To) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))) (move Select (from (sites Pending) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- (* 3 3) 3) 2) (rectangle 3 (* 3 3))) (shift (/ (- (* 3 3) 3) 2) 0 (rectangle (* 3 3) 3))) use:Cell) (hand Each) (piece "PIECE_ALPHA" Each (or (move Step Orthogonal ### SUF: ) (move Hop Orthogonal (between (range 1 6) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:6)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (expand (sites Centre) steps:(- (/ 3 2) (if (is Even 3) 1 0))))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to if:(is Empty (to)))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if ### SUF: (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (is In (last To) (sites Next))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 7) {(track "HomeTrack1" "0,E,N1,W" P1 directed:True) (track "HomeTrack2" "27,W,S1,E" P2 directed:True) (track "MiddleTrack" "13,W,N1,E" loop:True) (track "EnemyTrack1" "14,E,N1,W,S1,E" P1 directed:True) (track "EnemyTrack2" "13,W,S1,E,N1,W" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:4) (map "Throw" {(pair 0 6) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) phases:{(phase "InitGame" (play (do (roll) next:(move Pass) (then (if (= 1 (mapEntry (count Pips))) (moveAgain))))) (nextPhase (= 1 (mapEntry (count Pips))) "Play")) (phase "Play" (play (do (roll) next:(forEach Site (sites Occupied by:Mover) (or {(if (is In (site) (sites Track Mover "HomeTrack")) (move (from (site)) (to (trackSite Move from:(site) "HomeTrack" steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) count:(count at:(to))))) count:(count at:(site)))) (if (is In (site) (sites Track Mover "MiddleTrack")) (move ### SUF: (to (trackSite Move from:(site) "MiddleTrack" steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) count:(count at:(to))))) count:(count at:(site)))) (if (is In (site) (sites Track Mover "EnemyTrack")) (if (if (is In (site) (sites Next "Home")) True (and (!= 0 (count Pieces Next in:(sites Next "Home"))) (= 0 (state at:(site))))) (move (from (site)) (to (trackSite Move from:(site) "EnemyTrack" steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) count:(count at:(to))))) count:(count at:(site)) (then (if (and (is In (last To) (sites Next "Home")) (= 0 (state at:(last To)))) (set State at:(last To) 1))))))})) (then (if (is In (mapEntry (count Pips)) (sites {1 4 6})) (moveAgain))))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (from (site))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (hand Each) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove ### SUF: ))) (to if:(is Friend (who at:(to))))))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (centrePoint))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (between)
### PRE: (game "GAME_NAME" (players 2) (equipment {(boardless Square) (piece "PIECE_ALPHA" Each (move (from (from) level:(level)) (to (sites Occupied by:All component:"PIECE_BETA") level:0 if:(= 1 (size Stack at:(to)))) (then (moveAgain)))) (piece "PIECE_BETA" Each)}) (rules (start {(place "PIECE_BETA1" (ahead (centrePoint) NE)) (place "PIECE_BETA1" (ahead (centrePoint) SE)) ### SUF: (place "PIECE_BETA1" (ahead (centrePoint) NW)) (place "PIECE_BETA2" (ahead (centrePoint) N)) (place "PIECE_BETA2" (ahead (centrePoint) E)) (place "PIECE_BETA2" (ahead (centrePoint) S)) (place "PIECE_BETA2" (ahead (centrePoint) W))}) phases:{(phase "PlacePhase" (play (do (if (not (is Prev Mover)) (move Add (piece (id "PIECE_ALPHA" Mover)) (to (sites Occupied by:All component:"PIECE_BETA") level:0 if:(= 1 (size Stack at:(to)))) stack:True (then (moveAgain))) (move (from (last To)) (to (sites Around (difference (sites Occupied by:All component:"PIECE_BETA") (last To)) Orthogonal if:(is Empty (to)))))) ifAfterwards:(= 1 (count Groups)))) (nextPhase Mover (and (not (is Prev Mover)) (>= (count Turns) (- (* (count Players) 10) 1))) "MovePhase")) (phase "MovePhase" (play (do (if (not (is Prev Mover)) (forEach Piece) (move (from (last To)) (to (sites Around (difference (sites Occupied by:All component:"PIECE_BETA") (last To)) Orthogonal if:(is Empty (to)))))) ifAfterwards:(= 1 (count Groups)))))} (end {(if (is Line 4 what:(id "PIECE_ALPHA" P1)) (result P1 Win)) (if (is Line 4 what:(id "PIECE_BETA" P1)) (result P1 Win)) (if (is Line 4 what:(id "PIECE_ALPHA" P2)) (result P2 Win)) (if (is Line 4 what:(id "PIECE_BETA" P2)) (result P2 Win))}))) ### MID: (place "PIECE_BETA1" (ahead (centrePoint) SW))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each (move Slide Orthogonal (then (custodial (from (last To)) Orthogonal (between (max 1) if: ### SUF: (apply (remove (between)))) (to if:(is Friend (who at:(to)))))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:24)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Board) (centrePoint)) if:(is Empty (to))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Capture")) (phase "Capture" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (is Enemy (who at:(between)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,23,E,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23" loop:True P1) (track "Track2" "47,W,S1,E,S1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24" loop:True P2)} use:Vertex) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "PIECE_BETA" P2 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" ### SUF: )) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (map "ThrowDiceValue" {(pair 0 6) (pair 1 5) (pair 2 0) (pair 3 3) (pair 4 0) (pair 5 5) (pair 6 6)}) (map "Sir" {(pair 1 1) (pair 2 5)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_BETA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain)))) (move Pass (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (count Pips)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "PIECE_BETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_DELTA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "PIECE_ZETA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 2)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 0))}) (rules (start {(place "PIECE_ALPHA1" coord:"B2") (place "PIECE_GAMMA1" coord:"B1") (place "PIECE_DELTA1" coord:"A1") (place "PIECE_EPSILON1" coord:"A2") (place "PIECE_ALPHA2" coord:"F6") (place "PIECE_GAMMA2" coord:"F7") (place "PIECE_DELTA2" coord:"G7") (place "PIECE_EPSILON2" coord:"G6") (place "PIECE_ZETA1" {"A3" "B3" "C3" "C2" "C1"}) (place "PIECE_ZETA2" {"E7" "E6" "E5" "F5" "G5"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"PIECE_GAMMA" "PIECE_DELTA" "PIECE_EPSILON"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do ### SUF: ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))})) ### MID: (forEach Piece Next)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 5 3) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Step (directions {Forward FR FL}) (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) ### SUF: ) ### MID: (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {7 8 9 10 11 12} P1 directed:True) (track "Track2" {18 17 16 15 14 13} P2 directed:True)} use:Vertex) (dice d:6 num:2) ### SUF: (map "StartTrack" {(pair P1 7) (pair P2 18)})}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {7 8 9 10 11 12}) count:2) (place Stack "PIECE_ALPHA2" (sites {13 14 15 16 17 18}) count:2)}) phases:{(phase "UnStacking" (play (do (if (or (is Pending) (not (is Prev Mover))) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 0) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 1)) (if (not (all DiceUsed)) (moveAgain))))))) (then (if (all DiceEqual) (and (set Pending) (moveAgain)))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(site)) 0))) "Stacking")) (phase "Stacking" (play (do (if (or (is Pending) (not (is Prev Mover))) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 1) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 0)) (if (not (all DiceUsed)) (moveAgain))))))) (then (if (all DiceEqual) (and (set Pending) (moveAgain)))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(site)) 1))) "BearingOff")) (phase "BearingOff" (play (do (if (or (all DiceEqual) (not (is Prev Mover))) (roll)) next:(forEach Piece top:True) (then (if (or (not (all DiceUsed)) (all DiceEqual)) (moveAgain))))) (end (if (no Pieces Mover) (result Mover Win))))})) ### MID: (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (move (from) (to (trackSite Move steps:(pips)))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each)}) (rules (play (move Add (to (sites Empty)))) (end ### SUF: ))) ### MID: (if (is Full) (byScore {(score P1 (* (max (sizes Group P1)) (max (difference (sizes Group P1) (max (sizes Group P1)))))) (score P2 (* (max (sizes Group P2)) (max (difference (sizes Group P2) (max (sizes Group P2))))))}))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (square 7) edges:{{16 24} {24 32} {30 24} {24 18}}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (> (count Sites in:(forEach (sites Around (last To)) if:(if (is Empty (site)) (or (and {(is In (last To) (sites {(ahead (site) N) (ahead (site) S) (ahead (site) W) (ahead (site) E)})) (is Mover (who at:(ahead (site) N))) (is Mover (who at:(ahead (site) S))) (is Mover (who at:(ahead (site) W))) (is Mover (who at:(ahead (site) E)))}) (and {(is In (last To) (sites {(ahead (site) NE) (ahead (site) SE) (ahead (site) SW) (ahead (site) NW)})) (is Mover (who at:(ahead (site) NE))) (is Mover (who at:(ahead (site) SE))) (is Mover (who at:(ahead (site) SW))) (is Mover (who at:(ahead (site) NW)))}))))) 0) (and (set Value Mover (count Sites in:(forEach (sites Around (last To)) if:(if (is Empty (site)) (or (and {(is In (last To) (sites {(ahead (site) N) (ahead (site) S) (ahead (site) W) (ahead (site) E)})) (is Mover (who at:(ahead (site) N))) (is Mover (who at:(ahead (site) S))) (is Mover (who at:(ahead (site) W))) (is Mover (who at:(ahead (site) E)))}) (and {(is In (last To) (sites {(ahead (site) NE) (ahead (site) SE) (ahead (site) SW) (ahead (site) NW)})) (is Mover (who at:(ahead (site) NE))) (is Mover (who at:(ahead (site) SE))) (is Mover (who at:(ahead (site) SW))) (is Mover (who at:(ahead (site) NW)))})))))) (moveAgain)))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:24)) phases:{(phase "FirstPlacement" P1 (play (move (from (handSite Mover)) ### SUF: )) (nextPhase "Placement")) (phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Remove (sites Occupied by:Next) (then (if (> (value Player Mover) 1) (and (moveAgain) (set Value Mover (- (value Player Mover) 1))) (set Value Mover 0)))) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to (sites Centre))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) (then (if (can Move (step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))))) (moveAgain))))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (if (= 0 (count Pieces Mover in:(sites Board))) (forEach (sites Around (centrePoint) Orthogonal) if:(is Empty (site))) (difference (sites Board) (centrePoint))) if:(is Empty (to))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Capture")) ### SUF: } (end (if (no Moves Next) (result Mover Win))))) ### MID: (phase "Capture" (play (if (is Prev Mover) (or (move Step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) (then (if (can Move (step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))))) (moveAgain)))))) (move Pass)) (forEach Piece))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (tri Limping (- 4 1)) use:Vertex) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2)}) (rules (start (set Score Each 0)) (play (move Add (piece (mover)) ### SUF: (then (if (not (all Sites (sites Occupied by:Mover) if:(can Move (step (from (site)) Orthogonal (to if:(is Empty (to))))))) (trigger "End" Mover) (if (not (all Sites (sites Occupied by:Next) if:(can Move (step (from (site)) Orthogonal (to if:(is Empty (to))))))) (trigger "End" Next)))))) (end (if (or (is Triggered "End" Mover) (is Triggered "End" Next)) (if (is Triggered "End" Mover) (result Mover Loss)) (result Mover Win))))) ### MID: (to (sites Empty) if:(<= 0 (- (count Pieces Next in:(sites Around (to) Orthogonal)) (count Pieces Mover in:(sites Around (to) Orthogonal)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Board) if:(< (site) (centrePoint)))) (place "PIECE_ALPHA2" (forEach (sites Board) if:(> (site) (centrePoint))))}) (play (if (is Prev Mover) (max Moves (move Hop (from (last To)) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) ### SUF: )))) (priority {(max Moves (forEach Piece (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece)}))) (end (if (or (no Pieces Next) (and (= 1 (count Pieces Mover)) (= (centrePoint) (where "PIECE_ALPHA" Mover)))) (result Mover Win))))) ### MID: (moveAgain)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (piece "PIECE_GAMMA" Neutral) (hand Each)}) (rules (start (place "PIECE_GAMMA0" (sites Board))) (play (if (is Prev Mover) (or {(move Select (from (difference (intersection (sites Left) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) E) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Right) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) W) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Bottom) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) N) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) ### SUF: )) (remove (handSite (mover)))})))}) (move Select (from (sites Outer)) (then (and (fromTo (from (last To)) (to (handSite (mover)))) (moveAgain)))))) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (to (last To))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (or {(move Step (to if:(is Empty (to)))) ### SUF: })) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (expand (sites Centre))) (place "PIECE_BETA2" (handSite P2) count:15) (place "PIECE_ALPHA1" (handSite P1))}) phases:{(phase "PlacementTiger" P1 (play (move (from (handSite P1)) (to (sites {"C3" "C7"})) (then (moveAgain)))) (nextPhase Mover "MoveHuman")) (phase "MoveHuman" P1 (play (move (from (intersection (expand (sites Centre)) (sites Occupied by:Next))) (to (difference (sites Empty) (expand (sites Centre)))) (then (if (< 6 (count Sites in:(intersection (expand (sites Centre)) (sites Occupied by:Next)))) (moveAgain))))) (nextPhase Mover (= 6 (count Sites in:(intersection (expand (sites Centre)) (sites Occupied by:Next)))) "Movement")) (phase "PlacementHuman" P2 (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))})) ### MID: (move Hop (between (range 1 9) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(and (is Empty (to)) (is Even (count Steps (from) (to))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union (sites Row 1) (sites Row 2))) (place "PIECE_ALPHA2" (union (sites Row 5) (sites Row 6)))}) (play (if (is Prev Mover) (or (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or {(forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In ### SUF: (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"E8") (place "PIECE_GAMMA2" coord:"D8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards: ### SUF: )))) (result Mover Win)) (if (no Moves Mover) (result Mover Win)) (if (<= (count Pieces Next) 1) (result Next Loss))}))) ### MID: (not (is Threatened (id "PIECE_GAMMA" Next)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {6 12 11 10 9 8 7 5 4 3 2 1 0 13 14 15 16 17 18 20 21 22 23 24 25 -2} P1 directed:True) (track "Track2" {19 25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12 -2} P2 directed:True)} use:Vertex) (dice d:6 num:2) (map "Bar" {(pair P1 6) (pair P2 19)}) (regions "FinalQuadrant" P1 (sites {20 21 22 23 24 25})) (regions "FinalQuadrant" P2 (sites {7 8 9 10 11 12})) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move from:(from) steps:(pips)) -2) (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "FinalQuadrant"))) (move Remove (from))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Bar" Next))))))) (then (if ### SUF: (moveAgain)))))}) (rules (start {(place Stack "PIECE_ALPHA1" 7 count:5) (place Stack "PIECE_ALPHA1" 4 count:3) (place Stack "PIECE_ALPHA1" 13 count:5) (place Stack "PIECE_ALPHA1" 25 count:2) (place Stack "PIECE_ALPHA2" 20 count:5) (place Stack "PIECE_ALPHA2" 17 count:3) (place Stack "PIECE_ALPHA2" 0 count:5) (place Stack "PIECE_ALPHA2" 12 count:2)}) (play (do (if (not (is Prev Mover)) (roll)) next:(priority {(if (is Occupied (mapEntry "Bar" Mover)) (forEach Die if:(!= (pips) 0) (move (from (mapEntry "Bar" Mover)) (to (trackSite Move from:(mapEntry "Bar" Mover) steps:(pips)) if:(< (size Stack at:(to)) 2) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Bar" Next)))))) (then (if (not (all DiceUsed)) (moveAgain))))) (if (is Empty (mapEntry "Bar" Mover)) (max Distance (forEach Piece top:True)))}) (then (if (no Pieces Mover) (if (no Pieces Enemy in:(sites Mover "FinalQuadrant")) (addScore Mover 1) (addScore Mover 2)))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (not (all DiceUsed))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (splitCrossings (regular Star 5)) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) ### SUF: )) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:1) (place "PIECE_ALPHA2" (handSite P2) count:7)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))})) ### MID: (sites ToClear)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) (shift 0 6 (rectangle 1 6)) (shift 7 6 (rectangle 1 6))}) {(track "Track1" {24 11 10 9 8 7 6 5 4 3 2 1 0 12 13 14 15 16 17 18 19 20 21 22 23 -2} P1 directed:True) (track "Track2" {25 23 22 21 20 19 18 17 16 15 14 13 12 0 1 2 3 4 5 6 7 8 9 10 11 -2} P2 directed:True)} use:Vertex) ### SUF: (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move from:(from) steps:(pips)) -2) (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "FinalQuadrant"))) (move Remove (from))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next))))))) (then (if (not (all DiceUsed)) (moveAgain))))) (hand Each) (regions "FinalQuadrant" P1 (sites {18 19 20 21 22 23})) (regions "FinalQuadrant" P2 (sites {6 7 8 9 10 11}))}) (rules (start {(place Stack "PIECE_ALPHA1" 6 count:5) (place Stack "PIECE_ALPHA1" 4 count:3) (place Stack "PIECE_ALPHA1" 12 count:5) (place Stack "PIECE_ALPHA1" 23 count:2) (place Stack "PIECE_ALPHA2" 18 count:5) (place Stack "PIECE_ALPHA2" 16 count:3) (place Stack "PIECE_ALPHA2" 0 count:5) (place Stack "PIECE_ALPHA2" 11 count:2)}) (play (do (if (not (is Prev Mover)) (roll)) next:(priority {(if (is Occupied (handSite Mover)) (forEach Die if:(!= (pips) 0) (move (from (handSite Mover)) (to (trackSite Move from:(handSite Mover) steps:(pips)) if:(< (size Stack at:(to)) 2) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next)))))) (then (if (not (all DiceUsed)) (moveAgain))))) (if (is Empty (handSite Mover)) (max Distance (forEach Piece top:True)))}))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (dice d:6 num:2)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) (shift 0 6 (rectangle 1 6)) (shift 7 6 (rectangle 1 6))}) {(track "Track1" {24 0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12} P1 directed:True) (track "Track2" {25 12 13 14 15 16 17 18 19 20 21 22 23 11 10 9 8 7 6 5 4 3 2 1 0} P2 directed:True)} use:Vertex) (dice d:6 num:2) (hand Each) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (if (or (not (is Enemy (who at:(trackSite Move steps:(pips))))) (= 1 (size Stack at:(trackSite Move steps:(pips))))) (move (from) (to (trackSite Move steps:(pips)) (apply if:(is Enemy ### SUF: ) (fromTo (from (to)) (to (handSite Next))))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 0 count:15) (place Stack "PIECE_ALPHA2" 12 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(or (forEach Piece top:True) (forEach Piece container:(mover) top:True) (then (if (not (all DiceUsed)) (moveAgain)))))) (end {(if (no Pieces Mover) (result Mover Win)) (if (and (no Moves P1) (no Moves P2)) (result Mover Draw))}))) ### MID: (who at:(to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (piece "PIECE_ALPHA" Each)}) (rules (play (or (move Add (to (sites Empty) if:(= 0 (count Sites in:(sites Around (to) Own))))) (do (move Add (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own))))) ifAfterwards:(and (all Sites (sites Around (sites Group at:(last To)) Enemy) if:(> (size Group at:(last To)) (size Group at:(site)))) ### SUF: ) (then (and (forEach Site (sites Around (sites Group at:(last To)) Enemy) (remove (sites Group at:(site)))) (moveAgain)))))) (end (if (and (< 2 (count Moves)) (= 0 (count Sites in:(sites Occupied by:Enemy)))) (result Mover Win))))) ### MID: (< 0 (count Sites in:(sites Around (sites Group at:(last To)) Enemy)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:2) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:2) (sites Phase 1)))}) (play (priority (forEach Piece "PIECE_ALPHA" (move (from if:(= (* (from) (if (< 0 ### SUF: ) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (sites Direction from:(from) Diagonal distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))}) (apply (remember Value (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to)))))))) count:(size Stack at:(from)) stack:True (then (if (can Move (move (from (last To)) (to (sites Direction from:(from) (difference Diagonal (directions Cell from:(last To) to:(last From))) distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))})))) (moveAgain) (do (forEach Site (sites (values Remembered)) (remove (site) count:(size Stack at:(site)))) next:(and (if (or (and (is Odd (size Stack at:(last To))) (is In (last To) (sites (player (+ 1 (% (mover) 2)))))) (and (is Even (size Stack at:(last To))) (is In (last To) (sites (player (mover)))))) (add (to (last To)) stack:True)) (forget Value All)))))) top:True) (forEach Piece "PIECE_ALPHA" (move Step (from) (if (is Odd (size Stack at:(from))) (directions {FL FR}) (directions {BL BR})) (to if:(is Empty (to))) stack:True (then (if (or (and (is Odd (size Stack at:(last To))) (is In (last To) (sites (player (+ 1 (% (mover) 2)))))) (and (is Even (size Stack at:(last To))) (is In (last To) (sites (player (mover)))))) (add (to (last To)) stack:True)))) top:True))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (count MovesThisTurn)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- 7 3) 2) (rectangle 3 7 diagonals:Alternating)) ### SUF: ) use:Vertex) (hand P1) (piece "PIECE_ALPHA" P1 S (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 N (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (centrePoint)) (place "PIECE_BETA2" (union {(expand (sites Bottom)) (sites Row 2) (sites {"A4" "G4" "A5" "G5"})}))}) phases:{(phase "FoxPhase" P1 (play (do (set Pending (sites To (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))) next:(forEach Piece (then (if (and (is Pending) (not (is In (last To) (sites Pending)))) (if (< (value Player Mover) 0) (set Value Mover 1) (set Value Mover (+ 1 (value Player Mover)))))))))) (phase "HenPhase" P2 (play (if (and (> (value Player Prev) 0) (!= 0 (count Sites in:(intersection (sites Empty) (sites Bottom))))) (move Add (to (intersection (sites Empty) (sites Bottom))) (then (and (set Value Prev (- (value Player Prev) 1)) (moveAgain)))) (forEach Piece))))} (end {(if (no Moves P1) (result P1 Loss)) (if (or (is In (where "PIECE_ALPHA" P1) (sites Bottom)) (no Pieces P2)) (result P1 Win))}))) ### MID: (shift (/ (- 7 3) 2) 0 (rectangle 7 3 diagonals:Alternating))
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (add (remove (concentric {44}) vertices:{43 21 0 22}) edges:{{20 18} {0 1} {19 21} {38 39}}) {(track "TrackCW" {39 35 33 31 29 27 25 23 21 19 38 17 15 13 11 9 7 5 3 1 37 0 2 4 6 8 10 12 14 16 36 18 20 22 24 26 28 30 32 34} loop:True) (track "TrackCCW" {39 34 32 30 28 26 24 22 20 18 36 16 14 12 10 8 6 4 2 0 37 1 3 5 7 9 11 13 15 17 38 19 21 23 25 27 29 31 33 35} loop:True)} use:Edge) (map "Throw" {(pair 0 10) (pair 1 3) (pair 2 2) (pair 3 5)}) (map "Start" {(pair 1 39) (pair 2 36) (pair 3 37) ### SUF: }) (regions "AllSites" (sites Board Vertex)) (piece "PIECE_ALPHA" Each) (dice d:2 from:0 num:3) (hand Each)}) (rules (start {(place "PIECE_ALPHA1" Edge (mapEntry "Start" P1)) (place "PIECE_ALPHA2" Edge (mapEntry "Start" P2)) (place "PIECE_ALPHA3" Edge (mapEntry "Start" P3)) (place "PIECE_ALPHA4" Edge (mapEntry "Start" P4))}) (play (do (roll) next:(if (or (is Mover P1) (is Mover P2)) (forEach Piece (move (from (from) level:(level)) (to (trackSite Move "TrackCCW" steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Start" (who at:(to))))))))) (forEach Piece (move (from (from) level:(level)) (to (trackSite Move "TrackCW" steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Start" (who at:(to)))))))))) (then (do (if (if (or (is Mover P1) (is Mover P2)) (is In (mapEntry "Start" Mover) (sites Track "TrackCCW" from:(trackSite Move from:(last From) "TrackCCW" steps:1) to:(last To))) (is In (mapEntry "Start" Mover) (sites Track "TrackCW" from:(trackSite Move from:(last From) "TrackCW" steps:1) to:(last To)))) (addScore Mover 1) (then (if (= (score Mover) 4) (remove (last To))))) next:(if (and (!= 4 (score Mover)) (= 10 (mapEntry "Throw" (count Pips)))) (moveAgain)))))) (end (if (>= (score Mover) 4) (result Mover Win))))) ### MID: (pair 4 38)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (piece "PIECE_GAMMA" Neutral) (hand Each)}) (rules (start (place "PIECE_GAMMA0" (sites Board))) (play ### SUF: ) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (if (is Prev Mover) (or {(move Select (from (difference (intersection (sites Left) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) E) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Right) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) W) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Bottom) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) N) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})))}) (move Select (from (sites Outer) if:(or (is Mover (who at:(from))) (= (who at:(from)) 0))) (then (and (fromTo (from (last To)) (to (handSite (mover)))) (moveAgain)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) ### SUF: ) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union (expand (sites Bottom)) (sites {"D3" "E3"}))) (place "PIECE_ALPHA2" (union (expand (sites Top)) (sites {"A3" "B3"})))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (and (no Moves Next) (>= 1 (count Pieces Next))) (result Mover Win))))) ### MID: (apply (remove (between)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4 pyramidal:True) use:Vertex) (piece "PIECE_ALPHA" Each) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:15)) (play (if (is Prev Mover) (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= ### SUF: (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (handSite Mover)) (then (if (= (var) 1) (and (set Var 0) (moveAgain))))) (or (do (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (sites Empty) if:(and (is Flat) (< (layer of:(from)) (layer of:(to)))))) ifAfterwards:(is Flat (last To))) (move (from (sites Occupied by:Mover container:(mover))) (to (sites Empty) if:(is Flat))) (then (if (is Pattern {F R F R F} whats:{(id "PIECE_ALPHA" Mover)}) (and (set Var 1) (moveAgain))))))) (end (if (= (layer of:(last To)) 3) (result Mover Win))))) ### MID: (from)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" P1 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) (piece "PIECE_ALPHA" P2 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and {(surround (from (last To)) Orthogonal (between if:(and {(= (between) (centrePoint)) (= (what at:(between)) (id "PIECE_BETA" P1)) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:3) (surround (from (last To)) Orthogonal (between if: ### SUF: (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))})))) (piece "PIECE_BETA" P1 (move Step (to if:(is Empty (to))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) (regions "Fortresses" (sites Corners))}) (rules (start {(place "PIECE_BETA1" (centrePoint)) (place "PIECE_ALPHA2" (sites "Fortresses")) (place "PIECE_ALPHA1" {"D3" "C4" "E5"})}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA1") in:(sites "Fortresses")) (result P1 Win)) (if (= (where "PIECE_BETA" P1) -1) (result P2 Win))}))) ### MID: (and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Hop (between if:(is Occupied (between))) (to if:(is Empty (to)) (apply (and {(if (is Enemy (who at:(between))) (remove (between))) (remember Value (from)) (remember Value (to))}))) (then (if (can Move (hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is In (to) (values Remembered))))))) (moveAgain) (forget Value All)))))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (if (is Prev Mover) (or (move Pass (then (forget Value All))) (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is In (to) (values Remembered)))) (apply (and (if (is Enemy (who at: ### SUF: )) (remove (between))) (remember Value (to))))) (then (if (can Move (hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is In (to) (values Remembered))))))) (moveAgain) (forget Value All))))) (forEach Piece))) (end (if (no Moves Next) (byScore {(score P1 (count Pieces P1)) (score P2 (count Pieces P2))}))))) ### MID: (between)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom) steps:(- (/ 8 2) 2))) (place "PIECE_ALPHA2" (expand (sites Top) steps:(- (/ 8 2) 2)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step ### SUF: (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (directions Forwards)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- 7 3) 2) (rectangle 3 7 diagonals:Alternating)) (shift (/ (- 7 3) 2) 0 (rectangle 7 3 diagonals:Alternating))) use:Vertex) (hand P1) (piece "PIECE_ALPHA" P1 S (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 N (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (centrePoint)) (place "PIECE_BETA2" (union {(expand (sites Bottom)) ### SUF: (sites {"A4" "G4" "A5" "G5"})}))}) phases:{(phase "FoxPhase" P1 (play (do (set Pending (sites To (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))) next:(forEach Piece (then (if (and (is Pending) (not (is In (last To) (sites Pending)))) (if (< (value Player Mover) 0) (set Value Mover 1) (set Value Mover (+ 1 (value Player Mover)))))))))) (phase "HenPhase" P2 (play (if (and (> (value Player Prev) 0) (!= 0 (count Sites in:(intersection (sites Empty) (sites Bottom))))) (move Add (to (intersection (sites Empty) (sites Bottom))) (then (and (set Value Prev (- (value Player Prev) 1)) (moveAgain)))) (forEach Piece))))} (end {(if (no Moves P1) (result P1 Loss)) (if (or (is In (where "PIECE_ALPHA" P1) (sites Bottom)) (no Pieces P2)) (result P1 Win))}))) ### MID: (sites Row 2)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (if (is Prev Mover) (move Pass) (move Step (to if:(is Empty (to)))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand ### SUF: ) (sites {"A3" "E3"})})) (place "PIECE_BETA2" (centrePoint))}) (play (forEach Piece)) (end {(if (no Moves Next) (result Next Loss)) (if (<= (count Pieces P1) 9) (result P1 Loss))}))) ### MID: (sites Bottom)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) (shift 0 6 (rectangle 1 6)) (shift 7 6 (rectangle 1 6))}) {(track "Track1" {24 0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12} P1 directed:True) (track "Track2" {25 12 13 14 15 16 17 18 19 20 21 22 23 11 10 9 8 7 6 5 4 3 2 1 0} P2 directed:True)} use:Vertex) (dice d:6 num:3) (hand Each) (regions "StartingQuadrant" P1 (sites {0 1 2 3 4 5})) (regions "StartingQuadrant" P2 (sites {12 13 14 15 16 17})) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (if (or {(is Empty (trackSite Move steps:(pips))) (and (is Friend (who at:(trackSite Move steps:(pips)))) (if (is In (to) (sites Mover "StartingQuadrant")) (not (= 1 (size Stack at:(trackSite Move steps:(pips))))) True)) (and (is Enemy (who at:(trackSite Move steps:(pips)))) (= 1 (size Stack at:(trackSite Move steps:(pips)))))}) (move (from) (to (trackSite Move steps:(pips)) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to))))))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 0 count:15) (place Stack "PIECE_ALPHA2" 12 count:15)}) ### SUF: (end {(if (no Pieces Mover) (result Mover Win)) (if (and (no Moves P1) (no Moves P2)) (result Mover Draw))}))) ### MID: (play (do (if (not (is Prev Mover)) (roll)) next:(or (forEach Piece top:True) (forEach Piece container:(mover) top:True) (then (if (not (all DiceUsed)) (moveAgain))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3 if:(= 1 (size Stack at:(to)))) (moveAgain)))))}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:12) (place Stack "PIECE_ALPHA2" (handSite P2) count:12)}) phases:{(phase "Placement" (play (if (is Prev Mover) (move (from (handSite Mover)) (to (forEach (sites Occupied by:Next container:"Board") if:(= (size Stack at:(site)) 1)))) (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 if:(= 1 (size Stack at:(to)))) (moveAgain))))) (then (if (and (not (is Next Mover)) (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))))) (and (forEach Site (forEach (sites Occupied by:P1 container:"Board") if:(= (size Stack at:(site)) 2)) (and {(remove (site)) (remove (site)) (add (piece (id "PIECE_ALPHA" P1)) (to (site)))})) (forEach Site (forEach (sites Occupied by:P2 container:"Board") if:(= (size Stack at:(site)) 2)) (and {(remove (site)) (remove (site)) (add (piece (id "PIECE_ALPHA" P2)) (to (site)))}))))))) (nextPhase (and (not (is Next Mover)) (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (if (> (count Pieces Mover) 3) (forEach Piece) (move (from (sites Occupied by:Mover)) (to (sites Empty)))))) (end (if ### SUF: (result Mover Win))))})) ### MID: (no Moves Next)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (piece "PIECE_GAMMA" Neutral) (hand Each)}) (rules (start (place "PIECE_GAMMA0" (sites Board))) (play (if (is Prev Mover) (or {(move Select (from (difference (intersection (sites Left) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) E) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Right) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) W) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Bottom) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) N) (if ### SUF: (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})))}) (move Select (from (sites Outer) if:(or (is Mover (who at:(from))) (= (who at:(from)) 0))) (then (and (fromTo (from (last To)) (to (handSite (mover)))) (moveAgain)))))) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (piece "PIECE_GAMMA" Neutral) (hand Each)}) (rules (start (place "PIECE_GAMMA0" (sites Board))) (play (if (is Prev Mover) (or {(move Select (from (difference (intersection (sites Left) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) E) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Right) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from ### SUF: ) W) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Bottom) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) N) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})))}) (move Select (from (sites Outer) if:(or (is Mover (who at:(from))) (= (who at:(from)) 0))) (then (and (fromTo (from (last To)) (to (handSite (mover)))) (moveAgain)))))) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 12)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))})) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ETA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_THETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 10)) (place "PIECE_BETA1" {"A1" "L1"}) (place "PIECE_ETA1" {"B1" "K1"}) ### SUF: (place "PIECE_DELTA1" {"D1" "I1"}) (place "PIECE_ZETA1" {"E1" "H1"}) (place "PIECE_THETA1" coord:"F1") (place "PIECE_EPSILON1" coord:"G1") (place "PIECE_BETA2" {"A12" "L12"}) (place "PIECE_ETA2" {"B12" "K12"}) (place "PIECE_GAMMA2" {"C12" "J12"}) (place "PIECE_DELTA2" {"D12" "I12"}) (place "PIECE_ZETA2" {"E12" "H12"}) (place "PIECE_THETA2" coord:"G12") (place "PIECE_EPSILON2" coord:"F12")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_EPSILON" Mover))))) (end (if (and (is Threatened (id "PIECE_EPSILON" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_EPSILON" Next))))))) (result Mover Win))))) ### MID: (place "PIECE_GAMMA1" {"C1" "J1"})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,23,E,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23" loop:True P1) (track "Track2" "47,W,S1,E,S1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24" loop:True P2)} use:Vertex) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "PIECE_BETA" P2 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if ### SUF: (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (map "ThrowDiceValue" {(pair 0 6) (pair 1 5) (pair 2 0) (pair 3 3) (pair 4 0) (pair 5 5) (pair 6 6)}) (map "Sir" {(pair 1 1) (pair 2 5)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_BETA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain)))) (move Pass (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))))))
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (piece "PIECE_ALPHA" Each)}) (rules (start (set Score Each 0)) (play (if (was Pass) (or (move Pass) (priority (move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))) (then (addScore Mover 1))) (forEach Piece (do (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))))) (if (<= 5 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from))))))))))))))}) ifAfterwards:(can Move (add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))))))))) (or {(move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))) (then (addScore Mover 1))) (forEach Piece (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))))) (if (<= 5 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from))))))))))))))})) (move Pass)}))) (end {(if (and (all Passed) (> (score Mover) (score Next))) (result Mover Win)) (if (and (all Passed) (<= (score Mover) (score Next))) (result Next Win))}))) ### MID: (board (hex Limping 5) use:Cell)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {7 8 9 10 11 12} P1 directed:True) (track "Track2" {18 17 16 15 14 13} P2 directed:True)} use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (move (from) (to (trackSite Move steps:(pips))))))) (map "StartTrack" {(pair P1 7) (pair P2 18)})}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {7 8 9}) count:2) (place Stack "PIECE_ALPHA1" (sites {10 11 12}) count:3) (place Stack "PIECE_ALPHA2" (sites {13 14 15}) count:3) (place Stack "PIECE_ALPHA2" (sites {16 17 18}) count:2)}) phases:{(phase "UnStacking" (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die if:(!= (pips) 0) (or (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 0) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (if (= 3 (size Stack at:(last To))) (forEach Level (last To) (set State at:(last To) level:(level) 1)) (forEach Level (last To) (set State at:(last To) level:(level) 2))) (if (not (all DiceUsed)) (moveAgain)))))) (if ### SUF: (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 2)) (if (not (all DiceUsed)) (moveAgain)))))))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (or (= (state at:(site)) 0) (= (state at:(site)) 1)))) "BearingOff")) (phase "BearingOff" (play (do (if (or (all DiceEqual) (not (is Prev Mover))) (roll)) next:(forEach Piece top:True) (then (if (not (all DiceUsed)) (moveAgain))))) (end (if (no Pieces Mover) (result Mover Win))))})) ### MID: (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 1)
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (dice d:9 from:0 num:1)}) (rules (play (do (roll) next:(if (is Empty (count Pips)) (move Add (piece (if (is Mover P1) (id "PIECE_ALPHA" P1) (id "PIECE_BETA" P2))) (to (count Pips))) (move Pass (then (moveAgain)))))) (end {(if (is Line 3) (result Mover Win)) (if (is Full) (result Mover Draw))}))) ### MID: (board (square 3))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "PIECE_ALPHA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "PIECE_GAMMA" Next))))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_EPSILON1" (sites Row 1)) (place "PIECE_EPSILON2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8")}) phases:{(phase "OpeningCounselor" (play (forEach Piece "PIECE_ZETA" (move Hop Forward (between if:True) (to if:(is Empty (to)) (apply (remove (to))))))) (nextPhase Mover "OpeningSoldier")) (phase "OpeningSoldier" (play (forEach Piece "PIECE_EPSILON" (if (is In (from) (sites {"D2" "D7"})) (move Hop Forward (between if:True) (to if:(is Empty (to)) (apply (remove (to)))))))) (nextPhase Mover "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover)))))))} (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) ### SUF: ) (if (no Moves Next) (result Mover Win))}))) ### MID: (result Mover Win)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (or (move Pass (then (forEach Site (sites Next) (if (= (what at:(site)) (id "PIECE_ALPHA" Mover)) (promote (site) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (or (move Pass) (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) ### SUF: ) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (or (move Step (directions {FR FL}) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (move Hop (from) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))))) (forEach Piece "PIECE_BETA" (or (move Slide Diagonal) (move Hop (from) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (apply (remove (between)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules ### SUF: (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (priority {(forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (forEach Player if:(no Pieces Player) (result Player Win))))) ### MID: (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))})
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_BETA" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1))))))) (if (not (= 1 (state at:(from)))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_DELTA" Each ### SUF: ) (piece "PIECE_EPSILON" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Var 1))))))) (piece "PIECE_ZETA" Each (or {(if (and (not (= (var) 1)) (is In (from) (sites Start (piece (what at:(from)))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))} (then (if (and (= (where "PIECE_BETA" Mover) -1) (is In (last To) (sites Mover "Promotion"))) (promote (last To) (piece "PIECE_BETA") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ZETA1" (sites Row 1)) (place "PIECE_ZETA2" (sites Row 6)) (place "PIECE_EPSILON1" {"A1" "H1"} state:1) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1" state:1) (place "PIECE_EPSILON2" {"A8" "H8"} state:1) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end (if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win))))) ### MID: (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 12)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 5 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 5 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after: ### SUF: if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (count Rows)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 14)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))})) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ETA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_THETA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_IOTA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_KAPPA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 12)) (place "PIECE_BETA1" {"A1" "N1"}) (place "PIECE_THETA1" {"B1" "M1"}) (place "PIECE_GAMMA1" {"C1" "L1"}) (place "PIECE_DELTA1" {"D1" "K1"}) (place "PIECE_ETA1" {"E1" "J1"}) (place "PIECE_KAPPA1" coord:"F1") ### SUF: (place "PIECE_EPSILON1" coord:"H1") (place "PIECE_ZETA1" coord:"I1") (place "PIECE_BETA2" {"A14" "N14"}) (place "PIECE_THETA2" {"B14" "M14"}) (place "PIECE_GAMMA2" {"C14" "L14"}) (place "PIECE_DELTA2" {"D14" "K14"}) (place "PIECE_ETA2" {"E14" "J14"}) (place "PIECE_KAPPA2" coord:"I14") (place "PIECE_IOTA2" coord:"H14") (place "PIECE_EPSILON2" coord:"G14") (place "PIECE_ZETA2" coord:"F14")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_EPSILON" Mover))))) (end (if (and (is Threatened (id "PIECE_EPSILON" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_EPSILON" Next))))))) (result Mover Win))))) ### MID: (place "PIECE_IOTA1" coord:"G1")
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 11)) (piece "PIECE_ALPHA" Each (or (if (not (is Prev Mover)) (move Step Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (move Slide Orthogonal (then (if (not (is Prev Mover)) (moveAgain)))))) (piece "PIECE_BETA" P1 (if (not (is Prev Mover)) (or (move Step Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Slide Orthogonal)))) (hand Each) (regions "CentreSites" (expand (sites Centre) steps:2))}) (rules (start {(place "PIECE_BETA1" (sites Centre)) (place "PIECE_ALPHA1" (handSite P1) count:12) (place "PIECE_ALPHA2" (handSite P2) count:20)}) phases:{(phase "PlacementP1" (play (move (from (handSite P1)) (to (intersection (sites "CentreSites") (sites Empty))) (then (if (is Occupied (handSite P1)) (moveAgain))))) (nextPhase (is Empty (handSite P1)) "PlacementP2")) (phase "PlacementP2" (play (move (from (handSite P2)) (to (difference (sites Empty) (sites "CentreSites"))) (then (if (is Occupied (handSite P2)) (moveAgain))))) (nextPhase (is Empty (handSite P2)) "Movement")) (phase "Movement" (play (forEach Piece)) (end {(if ### SUF: (result P1 Win)) (if (= (where "PIECE_BETA" P1) -1) (result P2 Win))}))})) ### MID: (is Within (id "PIECE_BETA1") in:(sites Outer))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10)) (piece "PIECE_ALPHA" Each (move Slide Orthogonal (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_GAMMA" Next))))))) (piece "PIECE_BETA" Each (move Slide All (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_ALPHA" Next))))))) (piece "PIECE_GAMMA" Each (move Slide Diagonal (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_BETA" Next))))))) (regions "Water" (sites {"D4" "D7" "G4" "G7"}))}) (rules (start {(place "PIECE_BETA1" (sites {"E1" "F1"})) (place "PIECE_GAMMA1" (sites {"D2" "G2"})) (place "PIECE_ALPHA1" (sites {"E2" "F2"})) ### SUF: (place "PIECE_GAMMA2" (sites {"D9" "G9"})) (place "PIECE_ALPHA2" (sites {"E9" "F9"}))}) (play (priority {(and {(forEach Piece "PIECE_ALPHA" (if (is In (from) (sites Around (sites Occupied by:Next component:"PIECE_GAMMA"))) (move Slide Orthogonal (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_GAMMA" Next)))))))) (forEach Piece "PIECE_BETA" (if (is In (from) (sites Around (sites Occupied by:Next component:"PIECE_ALPHA"))) (move Slide All (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_ALPHA" Next)))))))) (forEach Piece "PIECE_GAMMA" (if (is In (from) (sites Around (sites Occupied by:Next component:"PIECE_BETA"))) (move Slide Diagonal (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_BETA" Next))))))))}) (forEach Piece)})) (end (if (= 3 (count Sites in:(intersection (sites Occupied by:Mover) (sites "Water")))) (result Mover Win))))) ### MID: (place "PIECE_BETA2" (sites {"E10" "F10"}))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (dual (hex Prism 7 6)) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (if (< 0 (count Sites in:(sites Occupied by:Mover))) (forEach (sites Empty) if:(and (> (count Pieces Mover in:(sites LineOfSight at:(site))) 0) (= (count Sites in:(sites Around (site) Own)) 0))) (sites Empty))))) (nextPhase (= 4 (count Moves)) "Play")) (phase "Play" (play (if (can Move (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(sites LineOfSight at:(site))) 0))))) (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(sites LineOfSight at:(site))) 0))) (then (forEach Group (if (all Sites (sites) if:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from:(site) stop:(is Occupied (to)) stopIncluded:True)) (sites))))) (remove (sites)))))) (move Pass (then (forEach Group (if (all Sites (sites) if: ### SUF: ) (remove (sites)))))))))} (end (if (and (< 4 (count Moves)) (or (= 0 (count Sites in:(sites Occupied by:P1))) (= 0 (count Sites in:(sites Occupied by:P2))))) (result Mover Loss))))) ### MID: (= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from:(site) stop:(is Occupied (to)) stopIncluded:True)) (sites))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (priority {(forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move ### SUF: ) (moveAgain))))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 2 diagonals:Solid) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(and {(or {(and (!= (from) (coord "A1")) (!= (from) (coord "C1"))) (and (= (from) (coord "C1")) (!= (to) (coord "A1"))) (and (= (from) (coord "A1")) (!= ### SUF: (coord "C1")))}) (is Empty (to))}))))}) (rules (start {(place "PIECE_ALPHA1" (sites Top)) (place "PIECE_ALPHA2" (sites Bottom))}) (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (keep (splitCrossings (merge (rotate 45 (dual (square 12 diagonals:Concentric))) (shift 3 3 (scale 6 (square 1))))) (poly {{3 3} {3 9} {9 9} {9 3}})) vertices:{{6 6}})) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (regions "Holes" (union (difference (sites Board Vertex) (sites Outer Vertex)) (sites Corners Vertex))) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)})}) (rules (meta (swap)) (play (move Add (to Vertex (sites Empty Vertex) if:(is In (to) (sites "Holes"))) (then (forEach Site (sites Incident Cell of:Vertex at:(last To)) (if (if (is In (site) (sites Centre)) (>= (+ (count Sites in:(intersection (intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")) (sites Occupied by:Mover on:Vertex))) (if (= (mover) (who Vertex at:(centrePoint Vertex))) 1 0)) 3) (>= (count Sites in:(intersection (intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")) (sites Occupied by:Mover on:Vertex))) (if (is Even (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")))) (/ (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes"))) 2) (+ (/ (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes"))) 2) 1)))) (claim (piece (id "PIECE_BETA" Mover)) (to Cell (site)))) (then (forEach Site ### SUF: (if (is Connected at:(site) Mover) (trigger "Connected" Mover)))))))) (end {(if (is Triggered "Connected" Mover) (result Mover Win)) (if (<= 52 (count Moves)) (result Mover Draw))}))) ### MID: (forEach (sites Incident Cell of:Vertex at:(last To)) if:(is Mover (who Cell at:(site))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (move Slide Orthogonal)) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from ### SUF: ) (to (difference (sites Board) (centrePoint)) if:(is Empty (to))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Move")) (phase "Move" (play (forEach Piece)))} (end (if (is Line 5) (result Mover Win))))) ### MID: (handSite Mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 10)) (hand Each) (piece "PIECE_ALPHA" Each (or {(move Step (to if:(is Empty (to))) (then (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain))))) (move Select (from) (to (intersection (sites Occupied by:Enemy container:"Board") (sites Distance from:(from) (range 1 (state at:(from)))))) (then (and (if (= (value Piece at:(last To)) 1) (remove (last To)) (set Value at:(last To) (- ### SUF: 1))) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain)))))) (move Select (from) (to (intersection (sites Occupied by:Enemy container:"Board") (sites Distance from:(from) (range 1 (state at:(from)))))) (then (and (addScore (player (who at:(last To))) 1) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain)))))) (move Select (from) (to) (then (and (if (< (state at:(last To)) 100) (set State at:(last To) (+ 1 (state at:(last To))))) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain))))))}) maxState:100)}) (rules (meta (passEnd NoEnd)) (start {(set Score Each 1) (place "PIECE_ALPHA1" (handSite P1) state:2 value:3) (place "PIECE_ALPHA2" (handSite P2) state:2 value:3)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (or (forEach Piece) (move Pass (then (addScore Mover 1))))))} (end (forEach NonMover if:(no Pieces Player) (result Player Loss))))) ### MID: (value Piece at:(last To))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (forEach Piece "PIECE_ALPHA" (or (move Hop ### SUF: (to if:(is Empty (to)))) (move Step (to if:(is Empty (to))))))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (between if:(is Enemy (who at:(between))) (apply (remove (between))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10)) (piece "PIECE_ALPHA" Each (or {(move Step Diagonal (to if:(is Empty (to)))) (move Slide Orthogonal (between (exact 2))) (move Hop (from) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain)))) (do (move Hop (from) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1)) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain))))})) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 4 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (or {(move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1)) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) ### SUF: ) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain)))) (move Pass)}) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to if:(is Empty (to)))
### PRE: (game "GAME_NAME" (players {(player S) (player N)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 (or (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "PIECE_BETA") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "PIECE_GAMMA" P1 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" P1 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" P1 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ZETA" P1 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" P1 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" P2 (or (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites Around (where "King-noCross" Next))))) (apply (remove (to))))) (move Slide (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites Around (where "King-noCross" Next)))) (remove (to))))))) (regions "Promotion" P1 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 6)) (place "PIECE_GAMMA1" {"A8" "H8"}) (place "PIECE_ZETA1" {"B8" "G8"}) ### SUF: (place "PIECE_BETA1" coord:"E8") (place "PIECE_DELTA1" coord:"D8") (place "PIECE_DELTA2" coord:"E1")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Mover))))) (end (if (and (is Threatened (id "PIECE_DELTA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Next))))))) (result Mover Win))))) ### MID: (place "PIECE_EPSILON1" {"C8" "F8"})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Orthogonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Slide Orthogonal)))}) (rules (start {(place "PIECE_ALPHA1" (union (expand (sites Bottom) steps:2) (sites {"F4" "G4" "E4"}))) (place "PIECE_ALPHA2" (union (expand (sites Top) steps:2) (sites {"A4" "B4" "C4"})))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end ### SUF: ))) ### MID: (if (no Pieces Next) (result Next Loss))
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 2) (equipment {(board (square 5) use:Vertex) (piece "PIECE_ALPHA" Each (move Slide))}) (rules (start {(place "PIECE_ALPHA1" (sites Phase 1)) (place "PIECE_ALPHA2" (difference (sites Phase 0) (sites Centre)))}) (play (forEach Piece)) (end (if (no Moves Next) (result Mover Win)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13) use:Vertex) (piece "PIECE_ALPHA" Each) (regions P1 {(sites Side N) ### SUF: }) (regions P2 {(sites Side W) (sites Side E)})}) (rules (meta {(swap) (no Repeat)}) (play (do (move Add (to (sites Empty)) (then (enclose (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between))))))) ifAfterwards:(> (count Liberties Orthogonal) 0))) (end {(if (is Connected Mover) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (sites Side S)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P1 (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (regions "CentralSites" (sites {6 8 16 18})) (hand P1)}) ### SUF: ) ### MID: (rules (start {(place Stack "PIECE_BETA1" (handSite P1) count:2) (place Stack "PIECE_ALPHA2" 6 count:8) (place Stack "PIECE_ALPHA2" 8 count:8) (place Stack "PIECE_ALPHA2" 16 count:8) (place Stack "PIECE_ALPHA2" 18 count:8)}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)) (then (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (moveAgain))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (or (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece top:True))))} (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3 if:(= 1 (size Stack at:(to)))) (moveAgain)))))}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:12) (place Stack "PIECE_ALPHA2" (handSite P2) count:12)}) phases:{(phase "Placement" (play (if (is Prev Mover) (move (from (handSite Mover)) (to (forEach (sites Occupied by:Next container:"Board") if:(= (size Stack at:(site)) 1)))) (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 if:(= 1 (size Stack at:(to)))) (moveAgain))))) (then (if (and (not (is Next Mover)) (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))))) (and (forEach Site (forEach (sites Occupied by:P1 container:"Board") if:(= (size Stack at:(site)) 2)) (and {(remove (site)) (remove (site)) (add (piece (id "PIECE_ALPHA" P1)) (to (site)))})) (forEach Site (forEach (sites Occupied by:P2 container:"Board") if:(= (size Stack at:(site)) 2)) (and {(remove (site)) (remove (site)) (add (piece (id "PIECE_ALPHA" P2)) (to (site)))}))))))) (nextPhase (and (not (is Next Mover)) (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (if (> (count Pieces Mover) 3) (forEach Piece) (move (from (sites Occupied by:Mover)) (to (sites Empty)))))) (end ### SUF: ))})) ### MID: (if (no Moves Next) (result Mover Win))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(sites Row 0) (sites Row 1) (sites Row 2) (sites Row 3) (expand (sites {"E5"}) W)})) (place "PIECE_ALPHA2" (union {(sites Row 5) (sites Row 6) (sites Row 7) (sites Row 8) (expand (sites {"A5"}) E)}))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) ### SUF: )) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (is Enemy (who at:(between)))