text
stringlengths
218
3.08k
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (piece "PIECE_ALPHA" Each)}) (rules (meta (swap)) (play (move Add (to (sites Empty)) (then (if (is Full) (do (set Var "CutOff" 0) next:(do (while (and (= 0 (- (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff")) (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff")))) (!= 0 (+ (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff")) (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff"))))) (set Var "CutOff" (+ 1 (var "CutOff")))) next:(and (set Score P1 (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff"))) (set Score P2 (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff")))))))))) (end (if (is Full) {(if (< (score P1) (score P2)) (result P1 Win)) (if (> (score P1) (score P2)) ### SUF: )})))) ### MID: (result P2 Win)
### 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: ### SUF: (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)) (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))))) (moveAgain)))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (and (is Enemy (who at:(to))) (= (count at:(to)) 1))
### 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)) (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) ### SUF: )) (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 Bottom)
### 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 ### SUF: ) 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")) (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))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (place "PIECE_ALPHA" "Hand" count:12)
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (piece "PIECE_ALPHA" Each (move Slide Orthogonal (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)))))))) (hand Each)}) (rules (meta (no Repeat)) (start (place "PIECE_ALPHA" "Hand" count:144)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Board) (centrePoint)) if:(is Empty (to))) (then (if (and (is Occupied (handSite Mover)) (not (is Prev Mover))) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Capture")) (phase "Capture" (play (forEach Piece)))} (end (if (<= (count Pieces Next) 1) (result Next Loss))))) ### MID: (board (square 17))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (merge {(rectangle 3 3 diagonals:Alternating) (shift 1.5 0.5 (rotate -90 (wedge 2))) (shift -1.5 0.5 (rotate 90 (wedge 2)))})) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_ALPHA" P2 N (move Step (directions {Forwards Rightward Leftward}) ### SUF: )) (regions "Home" P2 (sites {"B1" "C2" "A2"})) (regions "Home" P1 (sites {"B2"}))}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (is In (where "PIECE_ALPHA" P1) (sites P2)) (result P1 Win))}))) ### MID: (to if:(is Empty (to)))
### 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 ### SUF: ) (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))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (who at:(to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Limping 3) use:Cell) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2)}) (rules (start (set Score Each 0)) (play (or {(move Pass) (move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(intersection (sites LineOfSight Piece at:(to)) (sites Direction from:(to) distance:3))))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))) (forEach Piece (or (move Step (to if:(and (is Empty (to)) (< (count Pieces Mover in:(sites Around (from))) (- (count Pieces Mover in:(sites Around (to))) 1)))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))) (if (and (not (was Pass)) (not (can Move (move Step (to if:(and (is Empty (to)) (< (count Pieces Mover in:(sites Around (from))) (- (count Pieces Mover in:(sites Around (to))) 1)))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2))))))))) (move Step (to if:(and (is Empty (to)) (> (count Pieces Next in:(sites Around (from))) (count Pieces Next in:(sites Around (to)))))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) ### SUF: )))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))))))})) (end {(if (and (all Passed) (> (score Mover) (score Next))) (result Mover Win)) (if (and (all Passed) (<= (score Mover) (score Next))) (result Next Win))}))) ### MID: (sites Around (site) includeSelf:True)
### 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" {0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12 -2} P1 directed:True) (track "Track2" {12 13 14 15 16 17 18 19 20 21 22 23 11 10 9 8 7 6 5 4 3 2 1 0 -2} P2 directed:True)} use:Vertex) (dice d:6 num:3) (piece "PIECE_ALPHA" Each (or (forEach Die combined:True if:(and (!= ### SUF: 0) (<= 0 (trackSite Move from:(from) steps:(pips)))) (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)))) (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "LastQuadrant"))) (forEach Die combined:True if:(and (!= (pips) 0) (= (trackSite Move from:(from) steps:(pips)) -2)) (move Remove (from)) (then (if (not (all DiceUsed)) (moveAgain))))))) (regions "FirstQuadrant" P1 (sites {0 1 2 3 4 5})) (regions "FirstQuadrant" P2 (sites {12 13 14 15 16 17})) (regions "LastQuadrant" P1 (sites {12 13 14 15 16 17})) (regions "LastQuadrant" P2 (sites {0 1 2 3 4 5})) (map "StartTrack" {(pair P1 0) (pair P2 12)}) (hand Each)}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:15) (place Stack "PIECE_ALPHA2" (handSite P2) count:15)}) (play (max Moves (do (if (not (is Prev Mover)) (roll)) next:(if (is Occupied (handSite Mover)) (forEach Die combined:True if:(and (!= (pips) 0) (is In (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1)) (sites Mover "FirstQuadrant"))) (move (from (handSite Mover)) (to (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))))) (then (if (not (all DiceUsed)) (moveAgain)))) (forEach Piece top:True))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (pips)
### 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)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Board) if:(< ### SUF: (centrePoint)))) (place "PIECE_ALPHA2" (forEach (sites Board) if:(> (site) (centrePoint))))}) (play (forEach Piece)) (end (forEach Player if:(no Pieces Player) (result Player Loss))))) ### MID: (site)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (dual (remove (hex 4 5) cells:{0 1 15 20 25 32 36 39 44})) use:Vertex) (piece "PIECE_ALPHA" Each (move Slide))}) (rules (start (set Score Each 0)) (play (or {(move Add (piece (mover)) (to (difference (sites Empty) (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to)))))) (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom"))))) Mover) (if (and (not (is Prev Next)) (< 0 (counter))) (move Pass))} (then (if (is Prev Next) (moveAgain) (and (set Score Mover (+ (size Array (array (sites From (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom"))))) Mover)))) (count Sites in:(difference (sites (results from:(sites Occupied by:Mover) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))) (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))))))) (set Score Next (+ (size Array (array (sites From (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) ### SUF: )) Next)))) (count Sites in:(difference (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))) (sites (results from:(sites Occupied by:Mover) to:(sites LineOfSight Empty at:(from) Orthogonal) (to)))))))))))) (end (if (and (is Prev Mover) (no Moves Next)) (result Mover Win))))) ### MID: (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom")))
### 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) (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))))))) (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 ### SUF: 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: (is In (trackSite Move steps:(count Pips)) (sites Mover "Home"))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 11) (shift 0 5 (rotate 90 ### SUF: )) (shift 0 5 (rectangle 1 11)) (shift -5 10 (rotate 90 (rectangle 1 11))) (shift 5 10 (rotate 90 (rectangle 1 11))) (shift 0 15 (rectangle 1 11))}) {(track "Track1" "0,E5,N5,W,N,E,S,W5,N,End" P1 directed:True) (track "Track2" "10,W5,N5,E,N,W,S,E5,N,End" P2 directed:True)}) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(count Pips)) -2) (move Remove (from)) (if (!= (trackSite Move steps:(count Pips)) -1) (if (if (not (is Enemy (who at:(trackSite Move steps:(count Pips))))) True (not (is In (trackSite Move steps:(count Pips)) (sites "Protect")))) (move (from (from) level:(level)) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))) count:(count at:(to)))))))))) (dice d:2 from:0 num:7) (hand Each) (regions "Protect" (sites {0 10 5 16 21 23 30 36 46 56 51 42})) (map {(pair P1 0) (pair P2 10)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:5) (place Stack "PIECE_ALPHA2" (handSite P2) count:5)}) (play (do (roll) next:(if (can Move (or {(forEach Piece) (forEach Piece container:(mover)) (if (and {(or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (or (is Empty (mapEntry (mover))) (is Friend (who at:(mapEntry (mover)))))}) (move (from (handSite (mover))) (to (mapEntry (mover)))))} (then (if (or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (moveAgain))))) (or {(forEach Piece) (forEach Piece container:(mover)) (if (and {(or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (or (is Empty (mapEntry (mover))) (is Friend (who at:(mapEntry (mover)))))}) (move (from (handSite (mover))) (to (mapEntry (mover)))))} (then (if (or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (moveAgain)))) (move Pass (then (if (or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (moveAgain))))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (rectangle 1 11)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) ### SUF: }) (rules phases:{(phase "Opening" (play (move Add (to (sites Empty)))) (nextPhase "Playing")) (phase "Playing" (play (move Add (to (sites Empty)) (then (if (is Even (count Moves)) (moveAgain))))) (nextPhase "Playing"))} (end (if (is Line 6 All) (result Mover Win))))) ### MID: (piece "PIECE_ALPHA" Each)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 1 10) {(track "Track1" {0 1 2 3 4 5 6 7 8} loop:True P1) (track "Track2" {8 7 6 5 4 3 2 1 0} loop:True P2) (track "CaptureTrack1" {8 7 6 5 4 3 2 1 0} P1 directed:True) (track "CaptureTrack2" {0 1 2 3 4 5 6 7 8} P2 directed:True)} use:Edge) (piece "PIECE_ALPHA" Each (or (if (= 0 (state at:(from) level:(level))) (move (from (from) level:(level)) (to (trackSite Move from:(from) "Track" steps:(mapEntry "Throw" (count Pips)))) (then (if (is In (last To) (sites Occupied by:Enemy top:False)) (forEach Level (last To) FromTop (and ### SUF: (if (is Friend (who at:(last To) level:(level))) (set State at:(last To) level:(level) 1)))))))) (if (= 1 (state at:(from) level:(level))) (if (!= (trackSite Move from:(from) "CaptureTrack" steps:(mapEntry "Throw" (count Pips))) -1) (move (from (from) level:(level)) (to (trackSite Move from:(from) "CaptureTrack" steps:(mapEntry "Throw" (count Pips)))) (then (and (forEach Level (last From) FromTop (if (= 2 (state at:(last From) level:(level))) (fromTo (from (last From) level:(level)) (to (last To))))) (forEach Level (last From) FromTop (if (is Friend (who at:(last From) level:(level))) (set State at:(last From) level:(level) 0)))))) (move Remove (from) level:(level) (then (and {(forEach Level (last From) FromTop (if (is Friend (who at:(last From) level:(level))) (set State at:(last From) level:(level) 0))) (forEach Level (last From) FromTop (if (= 2 (state at:(last From) level:(level))) (remove (last From) level:(level)))) (add (piece (id "PIECE_ALPHA" Mover)) (to (handSite Mover)))}))))))) (regions "AllSites" (sites Board Vertex)) (map "Throw" {(pair 0 5) (pair 1 3) (pair 2 2) (pair 3 3) (pair 4 4)}) (map "Entry" {(pair 1 0) (pair 2 8)}) (dice d:2 from:0 num:4) (hand Each)}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:5) (place Stack "PIECE_ALPHA2" (handSite P2) count:5)}) (play (do (roll) next:(or {(if (is Occupied (handSite Mover)) (move (from (handSite Mover)) (to (trackSite Move from:(mapEntry "Entry" (mover)) "Track" steps:(- (mapEntry "Throw" (count Pips)) 1))))) (forEach Piece)}) (then (if (not (is Prev Mover)) (moveAgain))))) (end {(if (no Pieces P2) (result P2 Loss)) (if (no Pieces P1) (result P1 Loss))}))) ### MID: (if (is Enemy (who at:(last To) level:(level))) (set State at:(last To) level:(level) 2))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or {(move Step (if (!= 0 (count Moves)) (difference Adjacent Backwards) Forwards) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (move Hop (difference Adjacent Backwards) (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))))})) (piece "PIECE_BETA" Each (or {(move Step Adjacent (to if:(is Empty (to)))) (move Hop Adjacent (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Hop (from (from) if:(is In (from) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True)))) Adjacent (between before:(count Rows) after:(count Rows) if:(and (is Enemy (who at:(between))) (is In (between) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True)))) (apply (remove (between)))) (to if:(and (is Empty (to)) (is In (to) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True))))))})) (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"}) ### SUF: }))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (expand (sites Top))
### 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)}))) ### SUF: ) (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: (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)))}))
### 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")) (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))))}))))) ### SUF: ))))) (move Pass)) (forEach Piece))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (moveAgain)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 4)) (piece "PIECE_ALPHA" Shared) (piece "PIECE_BETA" Shared) (piece "PIECE_GAMMA" Shared)}) (rules (play (or {(move Add (piece "PIECE_ALPHA") (to (sites Empty))) (move Select (from (sites Occupied by:Shared component:"PIECE_ALPHA")) (then (promote (last To) (piece {"PIECE_BETA"}) Shared))) (move Select (from (sites Occupied by:Shared component:"PIECE_BETA")) (then (promote (last To) (piece {"PIECE_GAMMA"}) Shared)))})) (end (if (is Line 3) ### SUF: )))) ### MID: (result Mover Win)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 9 6)) (piece "PIECE_ALPHA" Each (or {(if (not (all Sites (sites Around (from) Orthogonal) if:(not (= (what at:(site)) (id "PIECE_ALPHA" Mover))))) (move Slide Orthogonal (between if:(and (is Empty (between)) (not (is In (between) (sites "BlackenedSquares"))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to))))))) (if (not (all Sites (sites Around (from) Diagonal) if:(not (= (what at:(site)) (id "PIECE_ALPHA" Mover))))) (move Slide Diagonal (between if:(and (is Empty ### SUF: ) (not (is In (between) (sites "BlackenedSquares"))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to))))))) (if (not (all Sites (forEach (sites Around (sites To (hop Orthogonal (between if:True) (to if:True))) Orthogonal) if:(= 2 (count Steps (from) (site)))) if:(!= (what at:(site)) (id "PIECE_ALPHA" Mover)))) (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites "BlackenedSquares")))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to)))))))})) (piece "PIECE_BETA" Each) (hand Each) (regions "BlackenedSquares" (sites {"A2" "B3" "B5" "C6" "D4" "E5" "E7" "F8"})) (regions "PawnStart" P1 (sites {"E1" "E2" "F2" "D2" "D3" "E3"})) (regions "PawnStart" P2 (sites {"B9" "B8" "A8" "C8" "C7" "B7"}))}) (rules (start {(place "PIECE_ALPHA" "Hand" count:3) (place "PIECE_ALPHA1" (sites P1 "PawnStart")) (place "PIECE_ALPHA2" (sites P2 "PawnStart")) (place "PIECE_BETA1" coord:"F1") (place "PIECE_BETA2" coord:"A9")}) (play (or (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_BETA" Mover)))) (if (is Occupied (handSite Mover)) (move (from (sites Hand)) (to (sites Mover "PawnStart") if:(is Empty (to))))))) (end {(if (and (is Threatened (id "PIECE_BETA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_BETA" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))}))) ### MID: (between)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(shift 2 2 (square 5 diagonals:Alternating)) (shift 2 0 (wedge 3)) (shift 5 3 (rotate 90 (wedge 3))) (shift 2 6 (rotate 180 (wedge 3))) (shift -1 3 (rotate 270 (wedge 3)))}) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom) steps:2) (expand (sites Right) steps:3) (sites {"F3" "G3" "F4" "F6" "F7" "G7"})})) (place "PIECE_ALPHA2" (union {(expand (sites Top) steps:2) (expand (sites Left) steps:3) (sites {"C3" "D3" "D4" "D6" "D7" "C7"})}))}) (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 "PIECE_ALPHA" (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop ### SUF: (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)))))))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (from (last To))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (play (or (move Select (from (union (sites Empty) (sites Hidden to:Mover))) (then (priority {(if (not (is In (last To) (sites Empty))) (and {(note player:Mover "made an illegal move") (note player:Mover "to play") (moveAgain)})) (do (add (to (last To)) (then (and {(enclose (from (last To)) Orthogonal ### SUF: ) (set Hidden at:(last To) to:Next) (note player:Mover "has moved") (note player:Next "to play")}))) ifAfterwards:(> (count Liberties Orthogonal) 0)) (and {(note player:Mover "made an illegal move") (note player:Mover "to play") (moveAgain)})}))) (move Pass))) (end (if (all Passed) (byScore {(score P1 (+ (score P1) (size Territory P1))) (score P2 (+ (score P2) (size Territory P2)))}))))) ### MID: (between if:(is Enemy (who at:(between))) (apply (and (addScore Mover 1) (remove (between)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N (move Step (directions {FR FL}) (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (move Step Diagonal (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" {"D8"}) (place "PIECE_ALPHA1" {"A1" "C1" "E1" "G1"})}) ### SUF: (end {(if (and (no Moves P2) (is Mover P2)) (result P1 Win)) (if (is In (where "PIECE_BETA" P2) (sites Bottom)) (result P2 Win))}))) ### MID: (play (forEach Piece))
### 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 ### SUF: )}) {(track "Track1" {24 11 10 9 8 7 6 5 4 3 2 1 0 12 13 14 15 16 17} P1 directed:True) (track "Track2" {25 11 10 9 8 7 6 5 4 3 2 1 0 12 13 14 15 16 17} P2 directed:True)} use:Vertex) (dice d:6 num:3) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move from:(from) steps:(pips)) -1) (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)}) (rules (start {(place Stack "PIECE_ALPHA1" 11 count:8) (place Stack "PIECE_ALPHA1" 6 count:3) (place Stack "PIECE_ALPHA1" 7 count:4) (place Stack "PIECE_ALPHA2" (sites {10 9 8}) count:5)}) (play (do (if (not (is Prev Mover)) (roll)) next:(or (forEach Piece top:True) (forEach Piece container:(mover) top:True)))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (rectangle 1 6)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 17)) (piece "PIECE_ALPHA" Each) (hand Each) (regions "Secret Meeting Place" (sites {106 107 108 109 110 111 112 113 114 123 124 125 126 127 128 129 130 131 140 141 142 143 144 145 146 147 148 157 158 159 160 161 162 163 164 165 174 175 176 177 178 179 180 181 182})) (regions "Sanctuaries" (sites {"A1" "B1" "D1" "F1" "H1" "J1" "L1" "N1" "P1" "Q1" "A2" "Q2" "A4" "Q4" "A6" "Q6" "A8" "Q8" "A9" "Q9" "A10" "Q10" "A12" "Q12" "A14" "Q14" "A16" "Q16" "A17" "B17" "D17" "F17" "H17" "I17" "J17" "L17" "L17" "N17" "P17" "Q17"}))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:21) (place "PIECE_ALPHA2" (handSite P2) count:21)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (forEach (sites "Secret Meeting Place") if:(is Empty (site)))))) (nextPhase (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) (or (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))) ### SUF: ) (move Pass)) (forEach Piece (if (not (is In (from) (sites "Sanctuaries"))) (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))) (then (if (and (not (is In (last To) (sites "Sanctuaries"))) (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to)))))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))))) (end (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites "Sanctuaries"))) (result Mover Win))))})) ### MID: (then (if (and (not (is In (last To) (sites "Sanctuaries"))) (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to)))))))) (moveAgain)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (hand Each) (regions "AllSites" (sites Board))}) (rules ### SUF: (play (if (is Pending) (move (from (handSite Mover)) (to (sites Empty))) (or (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (set Pending)))) (forEach Piece)))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (start (place "PIECE_ALPHA" "Hand" count:12))
### 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 (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)))))) (max Moves (move Hop (from (last To)) (difference Orthogonal OppositeDirection) ### SUF: (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 (priority {(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 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))))))})) (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: (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between))))
### 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 (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))))) (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)))) (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 {(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 before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not ### SUF: ) (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: (is In (between) (sites ToClear))
### 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 ### SUF: 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 (not (all DiceUsed)) (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: (sites Occupied by:Mover)
### 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 (= (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) 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 ### SUF: (roll)) next:(forEach Piece top:True) (then (if (not (all DiceUsed)) (moveAgain))))) (end (if (no Pieces Mover) (result Mover Win))))})) ### MID: (or (all DiceEqual) (not (is Prev Mover)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each (move Step (to if:(and (or (= (id Neutral) (who at:(to))) (is Empty (to))) (= 1 (- (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) ### SUF: ))) (from) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral)))))) (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (to) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral))))))))) (apply (if (is Occupied (to)) (and (remove (to)) (addScore Mover 1))))))) (piece "PIECE_ALPHA" Neutral)}) (rules (start {(place "PIECE_ALPHA0" (difference (sites Board) (sites Corners))) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) NNW)) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) E)) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) SSW)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) NNE)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) W)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) SSE))}) (play (forEach Piece Mover)) (end (if (or (< (/ (- (count Sites in:(sites Board)) 6) 2) (score P1)) (< (/ (- (count Sites in:(sites Board)) 6) 2) (score P2))) (byScore))))) ### MID: (is Empty (to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(scale 2 1 (rectangle 1 3)) (rectangle 2 1) (shift 4 0 (rectangle 2 1)) (shift 4 1.5 (rectangle 2 1)) (shift 0 1.5 (rectangle 2 1)) (scale 2 1 (shift 0 2.5 (rectangle 1 3)))}) edges:{{3 7} {5 4} {9 1} {3 1} {1 4} {5 9} {9 7}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) ### SUF: }) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:3) (place "PIECE_BETA2" (handSite P2))}) 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 P2) (result P1 Win)) (if (or (>= (count Moves) (- (value MoveLimit) 10)) (>= (count Turns) (- (value TurnLimit) 5))) (result P2 Win))}))) ### MID: (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 6 10) {(track "Track1" "0,E,N1,W,N1,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "59,W,S1,E,S1,W,S1,E,S1,W,S1,E" P2 directed:True)}) (piece "PIECE_ALPHA" Each (if (= (state at:(from)) 1) (or (if (!= (trackSite Move steps:(mapEntry (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(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)))))))) (if (!= (trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))) -1) (if (is Enemy (who at:(trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))))) (move (from) (to (trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) (then (set Value Mover 0)))))))) (dice d:2 from:0 num:3) (map {(pair 1 1) (pair 2 2) (pair 3 4) (pair 0 6)})}) (rules (start {(place "PIECE_ALPHA1" (union (intersection (sites Bottom) (expand (sites Left) steps:2)) (intersection (sites Bottom) (expand (sites Right) steps:2)))) (place "PIECE_ALPHA2" (union (intersection (sites Top) (expand (sites Left) steps:2)) (intersection (sites Top) (expand (sites Right) steps:2))))}) (play (do (roll) next:(if (= (mapEntry (count Pips)) 1) (or (move Pass (then (and (if (> (value Player Mover) 0) (set Value Mover (+ 1 (value Player Mover))) (set Value Mover 1)) (moveAgain)))) (move Select (from (sites Occupied by:Mover) if:(= (state at:(from)) 0)) (then (and (set State at:(last From) 1) (moveAgain))))) (if (= (mapEntry (count Pips)) 2) (forEach Piece) (forEach Piece (then (moveAgain))))))) (end (if (and (= (count Sites in:(difference (sites Occupied by:P1) (sites Top))) 0) (= (count Sites in:(difference (sites Occupied by:P2) ### SUF: )) 0)) (byScore))))) ### MID: (sites Bottom)
### PRE: (game "GAME_NAME" (players {(player N) (player E) (player S) (player W)}) (equipment {(board (merge (merge (merge (merge (square 13 diagonals:Solid) (shift 3 -1 (rectangle 2 7 diagonals:Solid))) (shift 3 12 (rectangle 2 7 diagonals:Solid))) (shift -3.5 5.5 (rotate 90 (rectangle 2 7 diagonals:Solid)))) (shift 9.5 5.5 (rotate 90 (rectangle 2 7 diagonals:Solid)))) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (directions {FR FL}) (to if:(is Empty (to))))) (piece "PIECE_BETA" Each (move Step (directions {Rightward Forwards Leftward}) (to if:(is Empty (to))))) (regions "Home" P1 (sites {"D9" "E8" "F7" "G6" "H5" "I4"})) (regions "Home" P2 (sites {"I22" "H21" "G20" "F19" "E18" "D17"})) (regions "Home" P3 (sites {"Q22" "R21" "S20" "T19" "U18" "V17"})) (regions "Home" P4 (sites {"V9" "U8" "T7" "S6" "R5" "Q4"})) (hand Each)}) (rules (start {(set Team 1 {P1 P4}) (set Team 2 {P2 P3}) (place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2)) (place "PIECE_ALPHA3" (sites P3)) (place "PIECE_ALPHA4" (sites P4)) (place "PIECE_BETA" "Hand")}) (play (forEach Piece (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (and {(remove (between)) (if (not (all Sites (sites Hand Mover) if: ### SUF: )) (fromTo (from (handSite Mover)) (to (between)))) (addScore Mover 1)}))) (to if:(is Friend (who at:(to)))))))) (end (if (and (all Sites (union (sites Occupied by:P1) (sites Occupied by:P4)) if:(is In (site) (union (sites P2) (sites P3)))) (all Sites (union (sites Occupied by:P2) (sites Occupied by:P3)) if:(is In (site) (union (sites P1) (sites P4))))) {(if (> (+ (score P1) (score P4)) (+ (score P2) (score P3))) (result Team1 Win)) (if (< (+ (score P1) (score P4)) (+ (score P2) (score P3))) (result Team2 Win)) (if (= (+ (score P1) (score P4)) (+ (score P2) (score P3))) (result Mover Draw))})))) ### MID: (= 0 (count Cell at:(site)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(shift 2 2 (square 5 diagonals:Alternating)) (shift 2 0 (wedge 3)) (shift 5 3 (rotate 90 (wedge 3))) (shift 2 6 (rotate 180 (wedge 3))) (shift -1 3 (rotate 270 (wedge 3)))}) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom) steps:2) (expand (sites Right) steps:3) (sites {"F3" "G3" "F4" "F6" "F7" "G7"})})) (place "PIECE_ALPHA2" (union {(expand (sites Top) steps:2) (expand (sites Left) steps:3) (sites {"C3" "D3" "D4" "D6" "D7" "C7"})}))}) (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 "PIECE_ALPHA" (or (move Hop (between if:(is Enemy (who at:(between))) (apply ### 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)))))))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (remove (between))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 10)) (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:(- 4 1)) (sites Phase 1))) ### SUF: }) (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:(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)) 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: (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 1)) (sites Phase 1)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4)) (piece "PIECE_ALPHA" Each) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:8)) (play (if (is Prev Mover) (move Hop ### SUF: (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)))) (priority {(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))))) (or (if (is Occupied (handSite Mover)) (move (from (handSite Mover)) (to (sites Empty)))) (forEach Piece (move Step (to if:(is Empty (to))))))}))) (end {(forEach NonMover if:(<= (count Pieces Player) 2) (result Player Loss)) (if (is Line 3 All) (result Mover Win))}))) ### MID: (from (last To))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 11)) (regions "Fortresses" (sites Corners)) (piece "PIECE_ALPHA" P1 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (and {(custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA2" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))) (surround (from (last To)) Orthogonal (between if:(= (what at:(between)) (id "PIECE_BETA" P2)) (apply (trigger "Surrounded" P2))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))})))) (piece "PIECE_ALPHA" P2 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))))) (piece "PIECE_BETA" P2 (move Slide Orthogonal (then (custodial (from ### SUF: ) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))))))}) (rules (start {(place "PIECE_ALPHA1" {"D1" "E1" "F1" "G1" "H1" "F2" "A4" "A5" "A6" "A7" "A8" "B6" "K4" "K5" "K6" "K7" "K8" "J6" "F10" "D11" "E11" "F11" "G11" "H11" "F10"}) (place "PIECE_ALPHA2" {"F4" "E5" "F5" "G5" "D6" "E6" "G6" "H6" "E7" "F7" "G7" "F8"}) (place "PIECE_BETA2" (centrePoint))}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA2") in:(sites "Fortresses")) (result P2 Win)) (if (is Triggered "Surrounded" P2) (result P1 Win))}))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (rotate 30 (dual (tiling T3636 5))) cells:{0 4 5 73 81 97 142 143 152})) (tile "Rhombus" Each)}) (rules (play (move Select (from (sites Empty) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))) (to (sites Around (from) Empty Orthogonal) if:(not (all Sites (sites Around (to) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from)))))) (then (do (forEach Site (forEach (sites Empty) if:(and {(= (count Sites in:(sites Around (site) Own Orthogonal)) (count Sites in:(sites Around (site) Enemy Orthogonal))) (not (can Move (move Select (from (sites Around (site) Empty Orthogonal) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))))))})) (set State at:(site) 1)) next:(do (add (to (intersection (sites Around (last From) Orthogonal includeSelf:True) (sites Around (last To) Orthogonal includeSelf:True)))) next:(addScore Mover (% (count Sites in:(forEach (forEach (sites Empty) if:(and {(= (count Sites in:(sites Around (site) Own Orthogonal)) (count Sites in:(sites Around (site) Enemy Orthogonal))) (not (can Move (move Select (from (sites Around (site) Empty Orthogonal) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))))))})) if:(!= 1 (state at:(site))))) 2))))))) (end (if (no Moves Next) (byScore {(score P1 (+ {(score P1) (- (max (/ (count Sites in:(sites Occupied by:P1)) 3) (/ (count Sites in:(sites Occupied by:P2)) 3)) (/ (count Sites in:(sites Occupied by:P1)) 3)) (count Sites in:(forEach ### SUF: if:(> (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P1))) (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P2))))))})) (score P2 (+ {(score P2) (- (max (/ (count Sites in:(sites Occupied by:P1)) 3) (/ (count Sites in:(sites Occupied by:P2)) 3)) (/ (count Sites in:(sites Occupied by:P2)) 3)) (count Sites in:(forEach (sites Empty) if:(> (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P2))) (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P1))))))}))}))))) ### MID: (sites Empty)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (concentric {1 4}) edges:{{1 0} {0 3}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:2)) phases:{(phase "Placement" (play (move ### SUF: (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 Mover Win))))) ### MID: (from (handSite Mover))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13)) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (sites Empty)))) (nextPhase "General")) (phase "General" ### SUF: )} (end (if (<= 2 (+ {(if (is Line 4 N exact:True) 1 0) (if (is Line 4 NE exact:True) 1 0) (if (is Line 4 E exact:True) 1 0) (if (is Line 4 SE exact:True) 1 0)})) (result Mover Win))))) ### MID: (play (do (move Add (to (sites Empty)) (then (if (not (is Prev Mover)) (moveAgain)))) ifAfterwards:(and (not (is Line 5)) (!= 1 (+ {(if (is Line 4 N exact:True) 1 0) (if (is Line 4 NE exact:True) 1 0) (if (is Line 4 E exact:True) 1 0) (if (is Line 4 SE exact:True) 1 0)})))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13)) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (sites Empty)))) (nextPhase "General")) (phase "General" (play (do (move Add (to (sites Empty)) (then (if (not (is Prev Mover)) ### SUF: ))) ifAfterwards:(and (not (is Line 5)) (!= 1 (+ {(if (is Line 4 N exact:True) 1 0) (if (is Line 4 NE exact:True) 1 0) (if (is Line 4 E exact:True) 1 0) (if (is Line 4 SE exact:True) 1 0)}))))))} (end (if (<= 2 (+ {(if (is Line 4 N exact:True) 1 0) (if (is Line 4 NE exact:True) 1 0) (if (is Line 4 E exact:True) 1 0) (if (is Line 4 SE exact:True) 1 0)})) (result Mover Win))))) ### MID: (moveAgain)
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 8)) (piece "PIECE_ALPHA" Each (or {(move Hop Orthogonal (between if:(and (is Enemy (who at:(between))) (not (is In (between) (union (sites Bottom) (sites Top))))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step Orthogonal (to if:(is Empty (to)))) (if (= 1 (state at:(from))) (move Slide Orthogonal (between (exact 2) if:(is Empty (between))) (then (set State at:(last To) 0))))}))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (forEach Piece)) (end (if (<= (count Pieces Next) 3) (result Next Loss)))))
### PRE: (game "GAME_NAME" (players {(player S) (player N)}) (equipment {(board (add (remove (merge {(rectangle 3 3 diagonals:Alternating) (shift 0 2 (wedge 2)) (shift 0 -1 (rotate 180 (wedge 2)))}) vertices:{3 5 1}) edges:{{0 3} {1 5} {2 7} {0 1}}) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step Adjacent (to if:(and (if (= 1 (count Turns)) (!= (centrePoint) (to)) True) (is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))))) (hand P1) (regions "Home" P2 (intersection (sites Outer) ### SUF: )) (regions "Home" P1 (sites Top))}) (rules (start {(place "PIECE_BETA2" (intersection (sites Outer) (expand (sites Bottom)))) (place "PIECE_ALPHA1" (handSite P1))}) phases:{(phase "Opening" (play (move (from (handSite Mover)) (to (expand (sites Top))) (then (moveAgain)))) (nextPhase "Main")) (phase "Main" (play (forEach Piece)))} (end {(if (no Moves P1) (result P2 Win)) (if (is In (where "PIECE_ALPHA" P1) (sites P2)) (result P1 Win))}))) ### MID: (expand (sites Bottom))
### 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 ### SUF: (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: (is Enemy (who at:(to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 45 (merge {(rectangle 5 4) (shift -1 1 (rectangle 3 6)) (shift -2 2 (rectangle 1 8)) (shift 1 -1 (rectangle 7 2))})) use:Vertex) (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:(- 3 1))) (place "PIECE_ALPHA2" (expand (sites Top) steps:(- 3 1)))}) (play (if (is Prev Mover) (or (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 (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) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) SameDirection (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)) SameDirection (between before:(count Rows) after:(count Rows) if:(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 {FR FL}) (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 {FR FL}) ### SUF: (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)) SameDirection (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (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))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (between if:(is Enemy (who at:(between))) (apply (remove (between))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (hand Each) (piece "PIECE_ALPHA" Each (if (is Line 4 Orthogonal through:(from) exact:True) (move Step Orthogonal (to if:(is Empty (to))) (then (and {(if (and (!= (last From) (ahead (last From) N)) (= ### SUF: (who at:(ahead (last From) N)))) (if (is Line 3 Orthogonal through:(ahead (last From) N) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) S)) (= (mover) (who at:(ahead (last From) S)))) (if (is Line 3 Orthogonal through:(ahead (last From) S) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) E)) (= (mover) (who at:(ahead (last From) E)))) (if (is Line 3 Orthogonal through:(ahead (last From) E) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) W)) (= (mover) (who at:(ahead (last From) W)))) (if (is Line 3 Orthogonal through:(ahead (last From) W) exact:True) (and (moveAgain) (addScore Mover 1))))}))) (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (and (moveAgain) (addScore Mover 1)))))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "PlacementCenter" (play (move (from (handSite Mover)) (to (forEach (sites Centre) if:(is Empty (site)))))) (nextPhase (= (count Moves) 4) "Placement")) (phase "Placement" (play (if (!= 0 (score Mover)) (move Remove (sites Occupied by:Next container:"Board") (then (and (set Score Mover (- (score Mover) 1)) (if (< 1 (score Mover)) (moveAgain))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal exact:True) (and (moveAgain) (addScore Mover 1))))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (!= 0 (score Mover)) (move Remove (sites Occupied by:Next container:"Board") (then (and (set Score Mover (- (score Mover) 1)) (if (< 1 (score Mover)) (moveAgain))))) (forEach Piece))) (end (if (<= (count Pieces Next) 2) (result Next Loss))))})) ### MID: (mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 12) {(track "Track1" "0,E,N1,W,N1,E,N1,W,N1,E" P1 directed:True) (track "Track2" "59,W,S1,E,S1,W,S1,E,S1,W" P2 directed:True)} use:Vertex) (dice d:2 from:0 num:6) (piece "PIECE_ALPHA" Each (if (not (is Friend (who at:(trackSite Move steps:(mapEntry (var)))))) (move (from) (to (trackSite Move steps:(mapEntry (var))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (map {(pair 0 10) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 1) (pair 6 10)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (roll) next:(if (or (= (value Player Mover) 1) (is In (count Pips) ### SUF: )) (do (set Var (count Pips)) next:(forEach Piece (then (if (not (= (value Player Mover) 1)) (set Value Mover 1)))))))) (end (if (<= (count Pieces Next) 2) (result Next Loss))))) ### MID: (sites {0 1 5 6})
### 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 (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)))) ### SUF: )) (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: (to if:(is Empty (to)))
### 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 ### SUF: ) (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:(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)) 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: (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)))))
### 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 (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)))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (sites {"C6"})) (place "PIECE_BETA2" (union (expand (sites Bottom)) (sites {"A3" "E3"})))}) (play (forEach Piece)) ### SUF: )) ### MID: (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(rectangle 1 8) (shift -4 1.5 (rectangle 1 12)) (shift 0 3 (rectangle 1 8))}) vertices:{{-1 0.1} {-2 0.3} {-2.9 0.5} {-3.6 0.8} {-1 2.9} {-2 2.7} {-2.9 2.5} {-3.6 2.2}}) {(track "Track1" {31 30 29 28 0 1 2 3 4 5 6 7 19 18 17 16 15 14 13 12 11 10 9 8 35 34 33 32 20 21 22 23 24 25 26 27 19 18 17 16 15 14 13 12 11 10 9 8} loop:True P1) (track "Track2" {35 34 33 32 20 21 22 23 24 25 26 27 19 18 17 16 15 14 13 12 11 10 9 8 31 30 29 28 0 1 2 3 4 5 6 7 19 18 17 16 15 14 13 12 11 10 9 8} loop:True P2)} use:Vertex) (regions "AllSites" (sites Board)) (dice d:4 num:2) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 1) (and (= (state at:(from)) 0) (= 1 (pips)))) (move Slide "Track1" (between (exact (pips)) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply if:(not (is Friend (who at:(to)))) (remove (to)))) (then (if (= (state at:(last To)) 0) (set State at:(last To) 1)))))) ### SUF: }) (rules (start {(place "PIECE_ALPHA1" (sites {0 1 2 3 4 5 6 7 28 29 30 31})) (place "PIECE_ALPHA2" (sites {20 21 22 23 24 25 26 27 32 33 34 35}))}) (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die replayDouble:(and (= (face 36) 1) (= (face 37) 1)) (forEach Piece (then (if (not (all DiceUsed)) (if (can Move (forEach Die (forEach Piece))) (moveAgain)))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (piece "PIECE_ALPHA" P2 (if (or (= (state at:(from)) 1) (and (= (state at:(from)) 0) (= 1 (pips)))) (move Slide "Track2" (between (exact (pips)) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply if:(not (is Friend (who at:(to)))) (remove (to)))) (then (if (= (state at:(last To)) 0) (set State at:(last To) 1))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (merge {(rectangle 3 3 diagonals:Alternating) (shift 0 -1 (rotate 180 (wedge 2))) (shift 0 2 (wedge 2)) (shift -1.5 0.5 (rotate 90 (wedge 2))) (shift 1.5 0.5 (rotate -90 (wedge 2)))}) edges:{{{1 1} {0 0}} {{1 1} {2 2}} {{1 1} {2 0}} {{1 1} {0 2}}}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (custodial (from (last To)) (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(= (what at:(to)) (what at:(last To))))))))}) (rules (start {(place "PIECE_ALPHA1" {"A3" "B3" "B4" "B2"}) (place "PIECE_ALPHA2" {"D2" "D3" "E3" "D4"})}) (play (forEach Piece)) ### SUF: )) ### MID: (end (if (<= (count Pieces Next) 1) (result Next Loss)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (merge (shift 0 2 (square 5 diagonals:Alternating)) (wedge 3)) (rotate 45 (shift 1.5 6.2 (square 2 diagonals:Solid)))) use:Vertex) (hand P1) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (or (move Step (to if:(is Empty (to)))) (move Hop (between if: ### SUF: (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_BETA2" (sites {"C3" "C7"})) (place "PIECE_ALPHA1" (difference (expand (sites Centre)) (centrePoint))) (place "PIECE_ALPHA1" (handSite P1) count:16)}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win))}))) ### MID: (is Enemy (who at:(between)))
### 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 ### SUF: ))) (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 Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (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:"D8") (place "PIECE_GAMMA2" coord:"E8")}) (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:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (if (is In (last To) (sites Mover "Promotion")) (moveAgain))
### 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))) ### SUF: ) (forEach Piece))) (end (if (no Moves Next) (byScore {(score P1 (count Pieces P1)) (score P2 (count Pieces P2))}))))) ### MID: (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:(between))) (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))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (scale 1.4 1 (remove (scale 1 2 (wedge 5 6)) edges:{{0 1} {0 6}} vertices:{24 19})) 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)))) (move Step (to if:(is Empty (to)))) (move Hop (between (exact 3) if:(and (!= (row of:(between)) (row of:(from))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Hop (between (exact 4) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))})) ### SUF: }) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:5) (place "PIECE_BETA2" (handSite P2) count:15)}) 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)) (if (no Pieces P2) (result P2 Win))}))})) ### MID: (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) (piece "PIECE_ALPHA" Each) (regions "MarkedSites" (sites {"D4" "D7" "D10" "D13" "D16" "G4" "G16" "J4" "J10" "J16" "M4" "M16" "P4" "P7" "P10" "P13" "P16"}))}) (rules phases:{(phase "MarkedPlacement" (play (move Add (to (intersection (sites Empty) (sites "MarkedSites"))))) (nextPhase (= 0 (count Sites in:(intersection (sites "MarkedSites") (sites Empty)))) "Playing")) (phase "Playing" (play (do (move Add (to (sites Empty)) (then (enclose (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (and (addScore Mover 1) (remove (between))))) numException:1))) ifAfterwards:(> (count Liberties Orthogonal) 0))) (end (if (no Moves Next) (byScore {(score P1 (+ (score P1) (size Territory P1))) (score P2 (+ (score P2) ### SUF: ))}))))})) ### MID: (size Territory P2)
### 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 ### SUF: ))} (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: (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:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from:(site) stop:(is Occupied (to)) stopIncluded:True)) (sites))))) (remove (sites)))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 3 diagonals:Alternating) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:3)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" ### SUF: )} (end (if (is Line 3) (result Mover Win))))) ### MID: (play (forEach Piece))
### PRE: (game "GAME_NAME" (players 2) ### SUF: (rules (start {(place "PIECE_ALPHA1" (sites {"C6" "E6"})) (place "PIECE_ALPHA2" (union (expand (union (sites Right) (sites Left))) (expand (sites Bottom) steps:3)))}) (play (if (is Mover P1) (do (forEach Site (sites From (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (remember Value "From" (site))) next:(forEach Piece) (then (and (if (!= 0 (count Sites in:(sites (values Remembered "From")))) (if (= 1 (count Steps (last From) (last To))) (and (forEach Site (sites (values Remembered "From")) (remove (site))) (if (is In (last From) (sites (values Remembered "From"))) (remove (last To)))))) (forget Value All)))) (forEach Piece))) (end {(if (no Pieces P2) (result P1 Win)) (if (or (or (no Pieces P1) (no Moves P1)) (all Sites (expand (sites Top) steps:2) if:(= (who at:(site)) P2))) (result P2 Win))}))) ### MID: (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) (piece "PIECE_ALPHA" P1 (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_ALPHA" P2 (move Step (to if:(is Empty (to)))))})
### PRE: (game "GAME_NAME" (players {(player N) (player N)}) (equipment {(board (rectangle 7 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)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (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 Slide Diagonal (to if:(is Enemy (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 Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Top))}) (rules ### SUF: (play (if (is Prev Mover) (move Promote (last To) (piece {"PIECE_ZETA" "PIECE_EPSILON" "PIECE_DELTA" "PIECE_BETA"}) 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:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))) ### MID: (start {(place "PIECE_ALPHA1" {"B2" "B3" "C3" "D3" "E3" "E2" "F2" "F1"}) (place "PIECE_BETA1" {"A1" "A2"}) (place "PIECE_EPSILON1" {"C2" "D2"}) (place "PIECE_DELTA1" {"B1" "E1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"C1") (place "PIECE_ALPHA2" {"G1" "G2" "H2" "H3" "I3" "J3" "K3" "K2"}) (place "PIECE_BETA2" {"L1" "L2"}) (place "PIECE_EPSILON2" {"J2" "I2"}) (place "PIECE_DELTA2" {"K1" "H1"}) (place "PIECE_ZETA2" coord:"I1") (place "PIECE_GAMMA2" coord:"J1")})
### PRE: (game "GAME_NAME" (players 2) ### SUF: (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)) (end (if (<= (count Pieces Next) 5) (result Next Loss))))) ### MID: (equipment {(board (rectangle 5 5 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)))) (move Step (to if:(is Empty (to))))))})
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(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")) (if (= (where "PIECE_BETA" Mover) -1) (promote (last To) (piece "PIECE_BETA") Mover) (remove (last 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_BETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (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 (move Step (to if:(not ### SUF: ) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ETA" 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_ETA" Next))))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (board (square 10))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 2)) (place "PIECE_ALPHA2" (sites Row 7)) (place "PIECE_ZETA1" (sites {"A1" "J1"})) (place "PIECE_ZETA2" (sites {"A10" "J10"})) (place "PIECE_DELTA1" (sites {"B1" "I1"})) (place "PIECE_DELTA2" (sites {"B10" "I10"})) (place "PIECE_ETA1" (sites {"C1" "H1"})) (place "PIECE_ETA2" (sites {"C10" "H10"})) (place "PIECE_EPSILON1" (sites {"D1" "G1"})) (place "PIECE_EPSILON2" (sites {"D10" "G10"})) (place "PIECE_BETA1" coord:"E1") (place "PIECE_BETA2" coord:"F10") (place "PIECE_GAMMA1" coord:"F1") (place "PIECE_GAMMA2" coord:"E10")}) (play (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:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (is Friend (who at:(to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (concentric {1 4 12}) edges:{{6 8} {9 11} {12 14} {5 15}}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" Each (move Step (to if:(is Empty (to))))) (hand Each)}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:3) (place "PIECE_BETA2" (sites Centre))}) phases:{(phase "PlacementP1" (play (move (from (handSite P1)) (to (intersection (sites Empty) (sites {1 2 3 4}))) (then (if (not (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site))))) (moveAgain))))) (nextPhase (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) "HuntingP2")) (phase "HuntingP2" ### SUF: (nextPhase (= 1 (count Sites in:(sites Occupied by:All container:"Board"))) "PlacementP2")) (phase "PlacementP2" (play (move (from (handSite P2)) (to (intersection (sites Empty) (sites {1 2 3 4}))) (then (if (not (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site))))) (moveAgain))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "HuntingP1")) (phase "HuntingP1" (play (forEach Piece (then (if (not (can Move (move Step (from (where "PIECE_BETA" P1)) (to if:(is Empty (to)))))) (addScore P1 (- (count Moves) (+ (score P2) 6))))))) (end (if (!= 0 (score P1)) (byScore))))})) ### MID: (play (forEach Piece (then (if (not (can Move (move Step (from (where "PIECE_BETA" P2)) (to if:(is Empty (to)))))) (and {(addScore P2 (- (count Moves) 3)) (remove (sites Occupied by:All container:"Board")) (add (piece "PIECE_BETA1") (to (sites Centre))) (add (piece "PIECE_ALPHA2") (to (handSite P2)) count:3)})))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "47,W,S1,E,S1,W,S1,E" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (if (and (not (is In (from) (sites Next "Home"))) (!= 0 (mapEntry "Throw" (count Pips)))) (or (if (not (= 1 (var))) (move (from (from) if:(if (= (state at:(from)) 1) True (= 2 (mapEntry "Throw" (count Pips))))) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (not (= (state at:(last To)) 1)) (set State at:(last To) 1))))) (move (from (from) if:(if (= ### SUF: 1) True (= 2 (mapEntry "Throw" (count Pips))))) (to (trackSite Move steps:(/ (mapEntry "Throw" (count Pips)) 2)) if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (and (if (not (= (state at:(last To)) 1)) (set State at:(last To) 1)) (if (not (= 1 (var))) (and (set Var 1) (moveAgain)) (set Var 0)))))))) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map "Throw" {(pair 0 8) (pair 1 0) (pair 2 0) (pair 3 2) (pair 4 12)}) (dice d:2 from:0 num:4)}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (if (not (= 1 (var))) (roll)) next:(if (can Move (forEach Piece)) (forEach Piece) (move Pass (then (set Var 0)))) (then (if (is In (mapEntry "Throw" (count Pips)) (sites {2 8 12})) (moveAgain))))) (end (if (and (= 0 (count Sites in:(forEach (sites Occupied by:P1) if:(not (is In (site) (sites P2 "Home")))))) (= 0 (count Sites in:(forEach (sites Occupied by:P2) if:(not (is In (site) (sites P1 "Home"))))))) (byScore {(score P1 (count Sites in:(forEach (sites P2 "Home") if:(= (who at:(site)) P1)))) (score P2 (count Sites in:(forEach (sites P1 "Home") if:(= (who at:(site)) P2))))}))))) ### MID: (state at:(from))
### 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 ### SUF: ) (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: (mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(shift -1.25 -0.34 (rotate 30 (rectangle 6 1))) (rectangle 1 5) (rectangle 5 1) (shift 0 6 (rectangle 5 1)) (shift 0 10 (rectangle 1 5)) (shift 7 0 (rectangle 1 5)) (shift 7 10 (rectangle 1 5)) (shift 11 0 (rectangle 5 1)) (shift 11 6 (rectangle 5 1)) (shift 12.25 5.33 (rotate 30 (rectangle 6 1)))}) edges:{{13 14} {22 28} {37 36} {9 23}}) {(track "Track1" "46,5,SSE,N,E,S,W,NNW2,End" P1 directed:True) (track "Track2" "47,41,NNW,W,S,E,N,SSE2,End" P2 directed:True)} use:Vertex) (regions "AllSites" (sites Board)) (regions "LastSide" P1 (sites {6 7 8 9 23 24 25 26 27})) (regions "LastSide" P2 (sites {27 33 34 35 36 37 38 39 40})) (dice d:2 facesByDie:{{0 4} {0 6} {0 14} {0 15}} num:4) (piece "PIECE_ALPHA" Each (if (if (not (is In (from) (sites Mover "LastSide"))) True (or {(= (mapEntry "Throw" (count Pips)) 1) (= (mapEntry "Throw" (count Pips)) 2) ### SUF: })) (or (if (= 14 (mapEntry "Throw" (count Pips))) (if (= (trackSite Move steps:1) -2) (move Remove (from) level:(level)) (move (from (from) level:(level)) (to (trackSite Move steps:1) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (fromTo (from (to) level:(level)) (to (handSite (who at:(to) level:(level)))))))))))) (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -2) (move Remove (from) level:(level)) (move (from (from) level:(level)) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (fromTo (from (to) level:(level)) (to (handSite (who at:(to) level:(level)))))))))))))) (hand Each) (map "Throw" {(pair 0 10) (pair 39 5) (pair 24 3) (pair 25 3) (pair 35 3) (pair 33 3) (pair 10 2) (pair 18 2) (pair 19 2) (pair 20 2) (pair 21 2) (pair 29 2)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:2) (place Stack "PIECE_ALPHA2" (handSite P2) count:2)}) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (= (mapEntry "Throw" (count Pips)) 3)