text
stringlengths
218
3.08k
### PRE: (game "GAME_NAME" (players { ### SUF: (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or (move Step Forwards (to if:(is Empty (to)))) (move Select (from (from)) (then (forEach Site (sites Around (last To) includeSelf:True) (if (is Occupied (site)) (remove (site)))))))) (regions P1 (sites Top)) (regions P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (forEach Piece)) (end (if (or (is In (last To) (sites Mover)) (no Pieces Next)) (result Mover Win))))) ### MID: (player N)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal ### SUF: (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (priority {(forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start (set Score Each 0)) phases:{(phase "Opening" (play (move Add (to (sites "J10")))) (nextPhase "General")) (phase "General" (play (move Add (to (sites Empty)) (then (custodial (from ### SUF: ) All (between if:(is Next (who at:(between))) (apply (remove (between)))) (to if:(and (= 3 (count Steps Vertex All (last To) (to))) (is Mover (who at:(to))))) (then (addScore Mover 1)))))))} (end {(if (is Line 5 All) (result Mover Win)) (if (> (score Mover) 9) (result Mover Win))}))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4) {(track "Track1" {14 14 11 10 9 8 8 13 9 5 1 1 4 5 6 7 7 2 6 10} loop:True directed:True) (track "Track2" {11 11 14 10 6 2 2 7 6 5 4 4 1 5 9 13 13 8 9 10} loop:True directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (or {(move Step Orthogonal (to if:(is Empty (to)))) (move Slide "AllTracks" (between if:(or (= (between) (from)) ### SUF: )) (to if:(is Enemy (who at:(to))) (apply if:False (remove (to)))))}))}) (rules (start {(place "PIECE_ALPHA1" {"A3" "B3" "A4" "B4"}) (place "PIECE_ALPHA2" {"C1" "D1" "C2" "D2"})}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (is Empty (between))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Hop (between if:(is Occupied (between))) (to if:(is Empty (to)) (apply (and {(if (is Enemy (who at:(between))) (remove (between))) (remember Value (from)) (remember Value (to))}))) (then (if (can Move (hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is In (to) (values Remembered))))))) (moveAgain) (forget Value All)))))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (if (is Prev Mover) (or (move Pass (then (forget Value All))) (move Hop (from (last To)) ### SUF: (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))))) (forEach Piece))) (end (if (no Moves Next) (byScore {(score P1 (count Pieces P1)) (score P2 (count Pieces P2))}))))) ### MID: (between if:(is Occupied (between)))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_BETA" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy ### SUF: ) (remove (to) (then (set Var 1))))))) (if (not (= 1 (state at:(from)))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_EPSILON" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Var 1))))))) (piece "PIECE_ZETA" Each (or {(if (and (not (= (var) 1)) (is In (from) (sites Start (piece (what at:(from)))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))} (then (if (and (= (where "PIECE_BETA" Mover) -1) (is In (last To) (sites Mover "Promotion"))) (promote (last To) (piece "PIECE_BETA") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ZETA1" (sites Row 1)) (place "PIECE_ZETA2" (sites Row 6)) (place "PIECE_EPSILON1" {"A1" "H1"} state:1) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1" state:1) (place "PIECE_EPSILON2" {"A8" "H8"} state:1) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end (if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win))))) ### MID: (who at:(to))
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" {1 8 7}) (place "PIECE_ALPHA2" {3 4 5})}) (play (forEach Piece)) (end (if (and (= (what at:(centrePoint)) (mover)) (is Line 3)) (result Mover Win))))) ### MID: (board (concentric {1 8}) use:Vertex)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P1 (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (regions "CentralSites" (sites {6 8 16 18})) (hand P1)}) (rules (start {(place Stack "PIECE_BETA1" (handSite P1) count:2) (place Stack "PIECE_ALPHA2" 6 count:8) (place Stack "PIECE_ALPHA2" 8 count:8) (place Stack "PIECE_ALPHA2" 16 count:8) (place Stack "PIECE_ALPHA2" 18 count:8)}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)) (then (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (moveAgain))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (or ### SUF: (move Pass)) (forEach Piece top:True))))} (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (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:24)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (if (no 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)))) ### SUF: (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: (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 12)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 5 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 5 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) ### SUF: )) (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: (to if:(is Empty (to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 13) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "51,W,S1,E,S1,W,S1,E" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (if (or (= (state at:(from)) 0) (and (= (count Pips) 1) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(count Pips)) -1) (if (or (is In (trackSite Move steps:(count Pips)) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(count Pips))))) (move (from) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) ### SUF: (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (do (roll) next:(forEach Piece))) (end {(if (no Pieces Next) (result Next Loss)) (if (and (= (count Sites in:(difference (sites Occupied by:P1) (sites P2))) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites P1))) 0)) (result Mover Draw))}))) ### MID: (regions P1 (sites Bottom))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9)) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (meta (swap)) (start (place "PIECE_ALPHA0" (sites Outer))) (play (move Add (to (sites Empty)) (then (and (addScore Mover 1) (if ### SUF: (moveAgain)))))) (end (if (is Full) (byScore))))) ### MID: (< 2 (count Sites in:(sites Around (last To) NotEmpty Orthogonal)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 6)) (piece "PIECE_ALPHA" Each)}) (rules (play (if (= 0 (count Moves)) ### SUF: (move Add (to (sites Empty) if:(and (= 0 (count Sites in:(sites Around (to) Own))) (= 1 (count Sites in:(sites Around (to) Enemy)))))))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (move Add (to (sites Empty)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) ### SUF: )) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union (expand (sites Bottom)) (sites {"D3" "E3"}))) (place "PIECE_ALPHA2" (union (expand (sites Top)) (sites {"A3" "B3"})))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (and (no Moves Next) (>= 1 (count Pieces Next))) (result Mover Win))))) ### MID: (sites ToClear)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (remove (merge {(shift 0.4 -1 (scale 0.6 (rectangle 1 3))) (shift 0.2 0 (scale 0.8 2 (wedge 2))) (shift 0 -0.5 (scale 1 2.5 (wedge 2)))}) edges:{{3 8} {3 7} {3 9}}) edges:{{6 9} {4 7} {1 8}}) 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_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules ### SUF: (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (start {(place "PIECE_ALPHA1" (sites Top)) (place "PIECE_BETA2" (sites Bottom))})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 ### SUF: ) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step Orthogonal (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 N (or (if (= (state at:(from)) 1) (move Step Backwards (to if:(and (is In (to) (sites Bottom)) (is Empty (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (move Step Forwards (to if:(is Empty (to))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "Home" P2 (sites {"B1" "C2" "A2"})) (regions "Home" P1 (sites {"B2"}))}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_BETA2" (sites P2) state:1)}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (is In (where "PIECE_ALPHA" P1) (sites P2)) (result P1 Win))}))) ### MID: (merge {(rectangle 3 3 diagonals:Alternating) (shift 1.5 0.5 (rotate -90 (wedge 2))) (shift -1.5 0.5 (rotate 90 (wedge 2)))})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:9)) phases:{(phase "Placement" (play (if (is Prev Mover) (if (can Move (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site)))))) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move Remove (sites Occupied by:Enemy container:"Board"))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (if (can Move (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site)))))) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move Remove (sites Occupied by:Enemy container:"Board"))) (forEach Piece))))} (end ### SUF: ))) ### MID: (if (or (no Moves Next) (<= (count Pieces Next) 2)) (result Mover Win))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" P1 (priority {(move Hop (between (range 1 9) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(and (is Empty (to)) (is Even (count Steps (from) (to)))))) (move Step (to if:(is Empty (to))))})) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to))))) (hand Each)}) (rules (start {(place "PIECE_ALPHA1" (centrePoint) count:1) (place "PIECE_BETA2" (handSite P2) count:16) (place "PIECE_BETA2" (difference (expand ### SUF: ) (centrePoint)))}) phases:{(phase "Placement" P2 (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 P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (sites Centre)
### 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) (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 ### SUF: )) (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: (who at:(between))
### 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 "Arc" P1 (sites {1 2 3 4 5})) (regions "Arc" P2 (sites {41 42 43 44 45})) (dice d:2 facesByDie:{{0 4} {0 6} {0 14} {0 15}} num:4) (piece "PIECE_ALPHA" Each (if (or (!= (from) (handSite Mover)) (and (= (from) ### SUF: ) (all Sites (sites Occupied by:Mover) if:(not (is In (site) (sites Mover "Arc")))))) (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -2) (move Remove (from)) (if (!= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -1) (if (not (is Friend (who at:(trackSite Move steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next))))))))))) (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 "PIECE_ALPHA" "Hand" count:2)) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (handSite Mover)
### 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" {11 10 9 8 7 6 5 4 3 2 1 0 12 13 14 15 16 17 18 19 20 21 22 23 -2} P1 directed:True) (track "Track2" {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:2) (piece "PIECE_ALPHA" Each (forEach Die replayDouble:True if:(!= (pips) 0) (if (= (trackSite Move from:(from) steps:(pips)) -2) (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "FinalQuadrant"))) (move Remove (from))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(and {(or (not (is Enemy (who at: ### SUF: ))) (= 1 (size Stack at:(to)))) (if (not (is In (to) (sites Mover "StartingSide"))) True (> 2 (size Stack at:(to)))) (if (not (is In (to) (sites Mover "AfterPenultimate"))) True (>= 10 (count Pieces in:(sites {(handSite Mover) (mapEntry "Entry" Mover)}))))}) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next))))))) (then (if (not (all DiceUsed)) (moveAgain))))) (hand Each) (regions "FinalQuadrant" P1 (sites {18 19 20 21 22 23})) (regions "FinalQuadrant" P2 (sites {0 1 2 3 4 5})) (regions "StartingSide" P1 (sites {0 1 2 3 4 5 6 7 8 9 10 11})) (regions "StartingSide" P2 (sites {12 13 14 15 16 17 18 19 20 21 22 23})) (regions "AfterPenultimate" P1 (sites {23})) (regions "AfterPenultimate" P2 (sites {0})) (map "Entry" {(pair P1 11) (pair P2 12)})}) (rules (start {(place Stack "PIECE_ALPHA1" 11 count:15) (place Stack "PIECE_ALPHA2" 12 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(or (if (is Occupied (handSite Mover)) (forEach Die replayDouble:True if:(!= (pips) 0) (move (from (handSite Mover)) (to (trackSite Move from:(mapEntry "Entry" Mover) steps:(- (pips) 1)) if:(is Empty (to)))) (then (if (not (all DiceUsed)) (moveAgain))))) (forEach Piece top:True)) (then (if (no Pieces Mover) (set Score Mover 2))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (to)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (from (from) level:(level)) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_BETA" Each (move Slide (from (from) level:(level)) Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_GAMMA" Each (move Hop (from (from) level:(level)) Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_DELTA" Each (move Leap (from (from) level:(level)) {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at: ### SUF: )) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_EPSILON" Each (move Step (from (from) level:(level)) Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_ZETA" Each (or (move Step (from (from) level:(level)) Forward (to if:(is Empty (to)))) (move Step (from (from) level:(level)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (forEach Level (to) (remove (to) level:(level)))))) (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (id "PIECE_EPSILON" Mover))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_GAMMA1" (sites {"C1" "F1"})) (place "PIECE_BETA1" (sites {"C2" "F2"})) (place "PIECE_DELTA1" (sites {"D2" "E2"})) (place "PIECE_ALPHA1" coord:"E1") (place Stack "PIECE_ZETA1" (sites Row 2)) (place Stack "PIECE_EPSILON1" (sites {"D3"})) (place "PIECE_GAMMA2" (sites {"C8" "F8"})) (place "PIECE_BETA2" (sites {"C7" "F7"})) (place "PIECE_DELTA2" (sites {"D7" "E7"})) (place "PIECE_ALPHA2" coord:"E8") (place Stack "PIECE_ZETA2" (sites Row 5)) (place Stack "PIECE_EPSILON2" (sites {"D6"}))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win))}))) ### MID: (to)
### 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 ### SUF: ) (move Slide Diagonal (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 (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: (all Sites (sites Around (from) Diagonal) if:(not (= (what at:(site)) (id "PIECE_ALPHA" Mover))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge (rectangle 3 6) (shift 7 0 (rectangle 3 6))) edges:{{5 18} {11 24} {17 30}}) {(track "Track1" "36,6,E,N1,W,0,E,End" P1 directed:True) (track "Track2" "38,6,E,S1,W,12,E,End" P2 directed:True)} use:Vertex) (dice num:3) (hand Each size:2) (piece "PIECE_ALPHA" Each (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(from) steps:(pips)) -1)) (if (= (trackSite Move from:(from) steps:(pips)) -2) (move Select (from (from)) (then (if (= (count at:(last To)) 1) (remove (last To)) (set Count at:(last To) (- (count at:(last To)) 1))))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(not (and (is Enemy (who at:(to))) (> (count at:(to)) 1))) (apply if:(and (is Enemy (who at:(to))) (= (count at:(to)) 1)) (fromTo (from (to)) (to (handSite Next 1)))))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:15) (place "PIECE_ALPHA2" (handSite P2) count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (!= (what at:(handSite Mover 1)) 0) (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(handSite Mover) steps:(pips)) -1)) (if (= (trackSite Move from:(handSite Mover) steps:(pips)) -2) (move Select (from (handSite Mover 1)) (then (if (= (count at:(last To)) 1) (remove (last To)) (set Count at:(last To) (- (count at:(last To)) 1))))) (move (from (handSite Mover 1)) (to (trackSite Move from:(handSite Mover) steps:(pips)) if:(not (and (is Enemy (who at:(to))) (> (count at:(to)) 1))) (apply if:(and (is Enemy (who at:(to))) (= (count at: ### SUF: ) 1)) (fromTo (from (to)) (to (handSite Next 1)))))))) (or (forEach Piece) (forEach Piece container:(mover))) (then (if (can Move (if (!= (what at:(handSite Mover 1)) 0) (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(handSite Mover) steps:(pips)) -1)) (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: (to)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))) (then (set Value Mover 1))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_BETA" Each (or (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (set Value Mover 0))) (move Slide (then (set Value Mover 1))))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (or (if (= (value Player Prev) 1) (or (if (and (is In (last From) (sites Pending)) (is In (last From) (sites Empty))) (move Select (from (last To) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))) (move Select (from (sites Pending) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)}))))) (do (set Pending (sites From (or (forEach Piece "PIECE_ALPHA" (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) ### SUF: )))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))))) next:(forEach Piece)))) (end (if (no Pieces Mover) (result Mover Loss))))) ### MID: (set Value Mover 0)
### 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 (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -2) (move Remove (from)) (move (from) (to ### SUF: if:(< (size Stack at:(trackSite Move steps:(pips))) 2) (apply (if (is Enemy (who at:(to))) (remove (to))))))))) (map "StartTrack" {(pair P1 0) (pair P2 12)})}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {0 1 2 3 4 5}) count:2 state:1) (place Stack "PIECE_ALPHA2" (sites {12 13 14 15 16 17}) count:2 state:1)}) phases:{(phase "UnStacking" (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 1) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and {(set State at:(last To) 0) (if (not (all DiceUsed)) (moveAgain))}))))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(site)) 1))) "BearingOff")) (phase "BearingOff" (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Piece top:True) (then (if (and (not (was Pass)) (not (all DiceUsed))) (moveAgain))))))} (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (trackSite Move steps:(pips))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (from (from) level:(level)) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_BETA" Each (move Slide (from (from) level:(level)) Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_GAMMA" Each (move Hop (from (from) level:(level)) Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_DELTA" Each (move Leap (from (from) level:(level)) {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_EPSILON" Each (move Step (from (from) level:(level)) Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_ZETA" Each (or (move Step (from (from) level:(level)) Forward (to if:(is Empty (to)))) (move Step (from (from) level:(level)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (forEach Level (to) (remove (to) level:(level)))))) (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (id "PIECE_EPSILON" Mover))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_GAMMA1" (sites {"C1" "F1"})) (place "PIECE_BETA1" (sites {"C2" "F2"})) (place "PIECE_DELTA1" (sites {"D2" "E2"})) (place "PIECE_ALPHA1" coord:"E1") (place Stack "PIECE_ZETA1" (sites Row 2)) (place Stack "PIECE_EPSILON1" (sites {"D3"})) (place "PIECE_GAMMA2" (sites {"C8" "F8"})) (place "PIECE_BETA2" (sites {"C7" "F7"})) (place "PIECE_DELTA2" (sites {"D7" "E7"})) (place "PIECE_ALPHA2" coord:"E8") (place Stack "PIECE_ZETA2" (sites Row 5)) (place Stack "PIECE_EPSILON2" (sites {"D6"}))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if ### SUF: (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win))}))) ### MID: (no Moves Next)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "PIECE_ALPHA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between (exact 2) if:True) (to if:(not (is Friend (who at: ### SUF: ))) (apply (if (is Enemy (who at:(to))) (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")) (promote (last To) (piece "PIECE_ZETA") Mover))))) (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")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))) (then (if (and (> (count Pieces P1) 1) (> (count Pieces P2) 1)) (set Counter))))) (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 (and (or (= (count Pieces P1) 1) (= (count Pieces P2) 1)) (= (counter) 20)) (result Mover Draw))}))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) (piece "PIECE_ALPHA" Each) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)})}) ### SUF: ) ### MID: (rules (meta (swap)) (play (do (move Add (to (sites Empty))) ifAfterwards:(not (is Pattern {F R F R F} whats:{(mover) (next)})))) (end (if (is Connected All Mover) (result Mover Win))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Neutral (flips 1 2))}) (rules (start {(place "PIECE_ALPHA0" (sites Phase 0) state:1) (place "PIECE_ALPHA0" (sites Phase 1) state:2)}) (play (move Select (from (sites Board)) (then (flip (last To) (then (custodial (from (last To)) Adjacent (between if:(!= (state at:(between)) (state at:(last To))) (apply (allCombinations ### SUF: (flip (between))))) (to if:(= (state at:(to)) (state at:(last To)))))))))) (end {(if (and (!= 0 (count Sites in:(forEach (sites Column 0) if:(or (all Sites (sites Row (row of:(site))) if:(= 1 (state at:(site)))) (all Sites (sites Row (row of:(site))) if:(= 2 (state at:(site)))))))) (!= 0 (count Sites in:(forEach (sites Row 0) if:(or (all Sites (sites Column (column of:(site))) if:(= 1 (state at:(site)))) (all Sites (sites Column (column of:(site))) if:(= 2 (state at:(site))))))))) (result Mover Loss)) (if (!= 0 (count Sites in:(forEach (sites Column 0) if:(or (all Sites (sites Row (row of:(site))) if:(= 1 (state at:(site)))) (all Sites (sites Row (row of:(site))) if:(= 2 (state at:(site)))))))) (result P1 Win)) (if (!= 0 (count Sites in:(forEach (sites Row 0) if:(or (all Sites (sites Column (column of:(site))) if:(= 1 (state at:(site)))) (all Sites (sites Column (column of:(site))) if:(= 2 (state at:(site)))))))) (result P2 Win))}))) ### MID: (add (piece "PIECE_ALPHA0" state:(mover)) (to (last To)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (square 7) edges:{{16 24} {24 32} {30 24} {24 18}}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (> (count Sites in:(forEach (sites Around (last To)) if:(if (is Empty (site)) (or (and {(is In (last To) (sites {(ahead (site) N) (ahead (site) S) ### SUF: (ahead (site) E)})) (is Mover (who at:(ahead (site) N))) (is Mover (who at:(ahead (site) S))) (is Mover (who at:(ahead (site) W))) (is Mover (who at:(ahead (site) E)))}) (and {(is In (last To) (sites {(ahead (site) NE) (ahead (site) SE) (ahead (site) SW) (ahead (site) NW)})) (is Mover (who at:(ahead (site) NE))) (is Mover (who at:(ahead (site) SE))) (is Mover (who at:(ahead (site) SW))) (is Mover (who at:(ahead (site) NW)))}))))) 0) (and (set Value Mover (count Sites in:(forEach (sites Around (last To)) if:(if (is Empty (site)) (or (and {(is In (last To) (sites {(ahead (site) N) (ahead (site) S) (ahead (site) W) (ahead (site) E)})) (is Mover (who at:(ahead (site) N))) (is Mover (who at:(ahead (site) S))) (is Mover (who at:(ahead (site) W))) (is Mover (who at:(ahead (site) E)))}) (and {(is In (last To) (sites {(ahead (site) NE) (ahead (site) SE) (ahead (site) SW) (ahead (site) NW)})) (is Mover (who at:(ahead (site) NE))) (is Mover (who at:(ahead (site) SE))) (is Mover (who at:(ahead (site) SW))) (is Mover (who at:(ahead (site) NW)))})))))) (moveAgain)))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:24)) phases:{(phase "FirstPlacement" P1 (play (move (from (handSite Mover)) (to (sites Centre)))) (nextPhase "Placement")) (phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Remove (sites Occupied by:Next) (then (if (> (value Player Mover) 1) (and (moveAgain) (set Value Mover (- (value Player Mover) 1))) (set Value Mover 0)))) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (ahead (site) W)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (meta (no Repeat)) (play (move Add (to (sites Empty)) (then (forEach Site (sites Occupied by:Next) (if (= ### SUF: 0) (move Remove (site) (then (addScore Mover 1)))))))) (end {(if (>= (score Mover) 5) (result Mover Win))}))) ### MID: (count Liberties at:(site) Orthogonal)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {12 11 10 9 8 7 5 4 3 2 1 0 13 14 15 16 17 18 20 21 22 23 24 25} P1 directed:True) (track "Track2" {25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12} P2 directed:True)} use:Vertex) (dice num:2) (regions P1 {20 21 22 23 24 25}) (regions P2 {7 8 9 10 11 12}) (piece "PIECE_ALPHA" Each (forEach Die replayDouble:True if:(and {(!= (pips) 0) (!= (trackSite Move from:(from) steps:(pips)) -1) (!= (trackSite Move from:(from) steps:(pips)) -2)}) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 12 count:15) (place Stack "PIECE_ALPHA2" 25 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover))) (forEach Die replayDouble:True if:(!= (pips) 0) (forEach Site (sites Occupied by:Mover) (if (and (is Occupied (site)) (!= (trackSite Move from:(site) steps:(pips)) -1)) (if (= (trackSite Move from:(site) steps:(pips)) -2) (move Remove (from)) (move (from (site)) (to (trackSite Move from:(site) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))))))) noMoveYet:(firstMoveOnTrack "Track" Mover (if (and (is Friend (who at:(site))) (< (trackSite Move from:(site) steps:(pips)) 0)) (move Remove (from)))) (then (if (not (all DiceUsed)) (moveAgain))))) (max Distance "Track" Mover ### SUF: )))) (end {(if (no Pieces Mover) (byScore {(score P1 (if (is Mover P1) (if (= (size Stack in:(sites Occupied by:P2)) 15) 2 1) 0)) (score P2 (if (is Mover P2) (if (= (size Stack in:(sites Occupied by:P1)) 15) 2 1) 0))})) (if (and (= (what at:12 level:0) (id "PIECE_ALPHA1" P1)) (= (what at:12 level:1) (id "PIECE_ALPHA2" P2))) (byScore {(score P1 0) (score P2 2)})) (if (and (= (what at:25 level:0) (id "PIECE_ALPHA2" P2)) (= (what at:25 level:1) (id "PIECE_ALPHA1" P1))) (byScore {(score P1 2) (score P2 0)}))}))) ### MID: (forEach Piece top:True (then (if (not (all DiceUsed)) (moveAgain))))
### 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) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (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: ### SUF: ) (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 if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forwards 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 Step (to if:(is Empty (to))))))}))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (is Empty (to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 (or (move Step Diagonal (to if:(is Empty (to)))) (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) ### SUF: (hand P1)}) (rules (start {(place "PIECE_ALPHA1" (handSite P1)) (place "PIECE_BETA2" (difference (expand (sites Bottom) steps:2) (sites Phase 0)))}) phases:{(phase "Placement" P1 (play (move (from (handSite Mover)) (to (difference (sites Empty) (sites Phase 0))))) (nextPhase "Movement")) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (piece "PIECE_BETA" P2 N (move Step (directions {FR FL}) (to if:(is Empty (to)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (remove (merge {(shift 0.4 -1 (scale 0.6 (rectangle 1 3))) (shift 0.2 0 (scale 0.8 2 (wedge 2))) (shift 0 -0.5 (scale 1 2.5 (wedge 2)))}) edges:{{3 8} {3 7} {3 9}}) edges:{{6 9} {4 7} {1 8}}) 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_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (sites Top)) (place "PIECE_BETA2" (sites Bottom))}) (play (forEach Piece)) (end {(if ### SUF: (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (no Moves P1)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3) (moveAgain)))))}) (rules (start ### SUF: ) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)) (then (if (and (is Line 3) (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))))) (moveAgain))))) (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 (forEach Piece)) (nextPhase Mover (is Line 3) "Capture")) (phase "Capture" (play (move Remove (sites Occupied by:Enemy container:"Board") (then (moveAgain)))) (nextPhase Mover "Movement"))} (end (forEach Player if:(<= (count Pieces Player) 2) (result Player Loss))))) ### MID: (place "PIECE_ALPHA" "Hand" count:9)
### 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"))) ### SUF: ))))))) (end (if (is Full) {(if (< (score P1) (score P2)) (result P1 Win)) (if (> (score P1) (score P2)) (result P2 Win))})))) ### MID: (set Score P2 (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff")))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 11)) (piece "PIECE_ALPHA" Each (or (if (not (is Prev Mover)) (move Step Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (move Slide Orthogonal (then (if (not (is Prev Mover)) (moveAgain)))))) (piece "PIECE_BETA" P1 (if (not (is Prev Mover)) (or (move Step Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Slide Orthogonal)))) (hand Each) (regions "CentreSites" (expand (sites Centre) steps:2))}) (rules (start {(place "PIECE_BETA1" (sites Centre)) (place "PIECE_ALPHA1" (handSite P1) count:12) (place "PIECE_ALPHA2" (handSite P2) count:20)}) phases:{(phase "PlacementP1" (play (move (from (handSite P1)) (to (intersection (sites "CentreSites") (sites Empty))) (then (if (is Occupied (handSite P1)) (moveAgain))))) (nextPhase (is Empty (handSite P1)) "PlacementP2")) ### SUF: (phase "Movement" (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA1") in:(sites Outer)) (result P1 Win)) (if (= (where "PIECE_BETA" P1) -1) (result P2 Win))}))})) ### MID: (phase "PlacementP2" (play (move (from (handSite P2)) (to (difference (sites Empty) (sites "CentreSites"))) (then (if (is Occupied (handSite P2)) (moveAgain))))) (nextPhase (is Empty (handSite P2)) "Movement"))
### PRE: (game "GAME_NAME" ### SUF: (equipment {(board (hex Triangle 11)) (piece "PIECE_ALPHA")}) (rules (play (move Add (to (sites Empty) if:(not (is In (to) (sites Around (last To))))))) (end (if (is Connected 3 Sides) (result Mover Win))))) ### MID: (players 2)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) ### SUF: )})) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (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 (if (is Enemy (who at:(to))) (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 (if (is Enemy (who at:(to))) (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")}) phases:{(phase "Opening" (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover))) (then (and (set Value Mover (+ 1 (value Player Mover))) (if (!= (value Player Mover) 1) (moveAgain)))))) (nextPhase Mover (= 2 (value Player Mover)) "Playing")) (phase "Playing" (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))))) ### MID: (to if:(is Enemy (who at:(to))) (apply (remove (to))))
### 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 ### SUF: 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: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Radiating) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step ### SUF: )) (piece "PIECE_BETA" P2 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (if (is Prev Mover) (move Pass) (move Step (to if:(is Empty (to)))))))}) (rules (start {(place "PIECE_ALPHA1" (union (expand (sites Bottom)) (sites {"A3" "E3"}))) (place "PIECE_BETA2" (centrePoint))}) (play (forEach Piece)) (end {(if (no Moves Next) (result Next Loss)) (if (<= (count Pieces P1) 9) (result P1 Loss))}))) ### MID: (to if:(is Empty (to)))
### PRE: (game "GAME_NAME" (players 6) (equipment {(board (hex Star 4)) (piece "PIECE_ALPHA" Each) (regions "Home" P1 (expand origin:(coord row:0 column:4) steps:(- 4 1))) (regions "Home" P2 (expand origin:(coord row:4 column:(* 4 3)) steps:(- 4 1))) (regions "Home" P3 (expand origin:(coord row:(* 4 3) column:(* 4 4)) steps:(- 4 1))) (regions "Home" P4 (expand origin:(coord row:(* 4 4) column:(* 4 3)) steps:(- 4 1))) (regions "Home" P5 (expand origin:(coord row:(* 4 3) column:4) steps:(- 4 1))) (regions "Home" P6 (expand origin:(coord row:4 column:0) steps:(- 4 1))) (map {(pair 1 4) (pair 2 5) (pair 3 6) (pair 4 1) (pair 5 2) (pair 6 3)})}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2)) (place "PIECE_ALPHA3" (sites P3)) (place "PIECE_ALPHA4" (sites P4)) (place "PIECE_ALPHA5" (sites P5)) (place "PIECE_ALPHA6" (sites P6))}) phases:{(phase "Movement" (play (forEach Piece (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Step (to if:(and (is Empty (to)) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))))) (nextPhase (is Mover (next)) "MultiJump")) (phase "MultiJump" (play (or (move Hop (from (last To)) (between if: ### SUF: ) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Pass))) (nextPhase (not (is Mover (next))) "Movement"))} (end (if (= (sites Occupied by:Mover) (sites (player (mapEntry (mover))))) (result Mover Win))))) ### MID: (is Occupied (between))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (tiling T33434 3)) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (= 1 (count Sites in:(forEach (sites Incident Cell of:Vertex at:(last To)) if:(and {(= 3 (count Sites in:(sites Incident Vertex of:Cell at:(site)))) (= 2 (count Sites in:(forEach (sites Incident Vertex of:Cell at:(site)) if:(is Mover (who at:(site)))))) (= 1 (count Sites in:(forEach (sites Incident Vertex of:Cell at:(site)) if:(is Next (who at:(site))))))})))) (forEach Site (sites Incident Cell of:Vertex at:(last To)) (if (and {(= 3 (count Sites in:(sites Incident Vertex of:Cell at:(site)))) (= 2 (count Sites in:(forEach (sites Incident Vertex of:Cell at:(site)) if:(is Mover (who at:(site)))))) (= 1 (count Sites in:(forEach ### SUF: if:(is Next (who at:(site))))))}) (and (forEach Site (forEach (sites Incident Vertex of:Cell at:(site)) if:(is Next (who at:(site)))) (and (remove (site)) (add (piece (id "PIECE_ALPHA" Neutral)) (to (site))))) (set Counter)))))))) (piece "PIECE_ALPHA" Neutral) (hand Each) (regions P1 {(sites Side W) (sites Side E)}) (regions P2 {(sites Side N) (sites Side S)})}) (rules (meta (swap)) (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)) (then (and (forEach Site (sites Incident Cell of:Vertex at:(last To)) (if (= 4 (count Sites in:(forEach (sites Incident Vertex of:Cell at:(site)) if:(is Mover (who at:(site)))))) (trigger "Win" Mover))) (set Counter))))) (nextPhase Mover (is Empty (handSite Mover)) "Movement")) (phase "Movement" (play (or (forEach Piece) (move Remove (sites Occupied by:Neutral)))))} (end {(if (is Triggered "Win" Mover) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 49)) (result Mover Draw))}))) ### MID: (sites Incident Vertex of:Cell at:(site))
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (square 5) {(track "Track1" "2,E,N,W,S,E1,N3,E2,S2,W1,12" P1 directed:True) (track "Track2" "22,W,S,E,N,W1,S3,W2,N2,E1,12" P2 directed:True) (track "Track3" "14,N,W,S,E,N1,W3,N2,E2,S1,12" P3 directed:True) (track "Track4" "10,S,E,N,W,S1,E3,S2,W2,N1,12" P4 directed:True)}) (piece "PIECE_ALPHA" Each (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is Empty (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from (from) level:(level)) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "StartingPoint" (who at:(to))))))))) (then (if (= 12 (last To)) (remove (last To)))))) (map "ThrowDiceValue" {(pair 0 8) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (map "StartingPoint" {(pair 1 2) (pair 2 22) (pair 3 14) (pair 4 10)}) (dice d:2 from:0 num:4)}) (rules (start {(place Stack "PIECE_ALPHA1" 2 count:4) (place Stack "PIECE_ALPHA2" 22 count:4) (place Stack "PIECE_ALPHA3" 14 count:4) (place Stack "PIECE_ALPHA4" 10 count:4)}) (play ### SUF: ) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 8) (moveAgain)))) (move Pass (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 8) (moveAgain))))))
### PRE: (game "GAME_NAME" (players 2) (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 (intersection (sites Right) (sites Bottom)) steps:8 Orthogonal) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (intersection (sites Left) (sites Top)) steps:8 Orthogonal) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty ### SUF: )) (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 Diagonal (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: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (add (hole (merge (shift 0 8 (rectangle 4 20)) (shift 8 0 (rectangle 20 4))) (poly {{8 8} {8 11} {11 11} {11 8}})) cells:{{8 28 48 68 69 70 71 51 31 11 10 9}}) vertices:{{9.5 4} {15 4} {15 9.5} {15 15} {9.5 15} {4 15} {4 9.5} {4 4}}) {(track "Track" {144 145 146 147 148 149 150 151} loop:True)} use:Vertex) (dice d:2 from:0 num:7) (piece "PIECE_ALPHA" Each (move (from (from) level:(level)) (to (trackSite Move from:(from) "Track" steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (remove (to) level:(level)))))))) (hand Each) (map "Throw" {(pair 0 7) (pair 1 10) ### SUF: (pair 3 3) (pair 4 4) (pair 5 25) (pair 6 36) (pair 7 14)}) (map "Entry" {(pair P1 144) (pair P2 148)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:4) (place Stack "PIECE_ALPHA2" (handSite P2) count:4)}) (play (do (roll) next:(or (if (is Occupied (handSite Mover)) (move (from (handSite Mover)) (to (trackSite Move from:(mapEntry "Entry" Mover) "Track" steps:(- (mapEntry "ThrowDiceValue" (count Pips)) 1)) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (remove (to) level:(level)))))))) (forEach Piece)))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (pair 2 2)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (hand Each) (piece "PIECE_ALPHA" Each (flips 0 1) (if (= 0 (state at:(from))) (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))))) (moveAgain)))) (then (and (custodial (from (last From)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to)))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 0 (state at:(between)))) (apply (and ### SUF: (custodial (from (between)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (mover)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Enemy (who at:(to))) (= 0 (state at:(to))))))))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to)))))))))))}) (rules (meta (no Repeat)) (start (place "PIECE_ALPHA" "Hand" count:16)) 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 (if (is Prev Mover) (or (move Hop (from (last To)) Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))) (then (and {(if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))))) (moveAgain)) (custodial (from (last From)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to)))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 0 (state at:(between)))) (apply (and (flip (between)) (custodial (from (between)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (mover)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Enemy (who at:(to))) (= 0 (state at:(to))))))))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to))))))}))) (move Pass)) (or (forEach Piece) (move Remove (forEach (sites Occupied by:Next) if:(= 1 (state at:(site)))))))))} (end (if (= (count Pieces Next) 1) (result Mover Win))))) ### MID: (flip (between))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:2) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:5)) phases:{ ### SUF: (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (forEach Piece))))} (end (if (<= (count Pieces Next) 2) (result Next Loss))))) ### MID: (phase "Placement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement"))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (piece "PIECE_ALPHA" P1)}) (rules (start {(place "PIECE_ALPHA1" (sites Board)) (set Score P1 (count Sites in:(sites Phase 1))) (set Score P2 (count Sites in:(sites Phase 0)))}) (play (do (or (move Select (from (sites Occupied by:P1)) (to (sites Around (from) NotEmpty) if:(and (or (<= (size Stack at:(from)) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from))))) (= 0 (count Sites in:(intersection (sites Empty) (sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from))))))) (all Sites (sites Around (from) NotEmpty) if:(not (and (< (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(to)) stop:(is Empty (to)) distance:(size Stack at:(from)))) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(site)) stop:(is Empty (to)) distance:(size Stack at:(from))))) (or (<= (size Stack at:(from)) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(site)) distance:(size Stack at:(from))))) (= 0 (count Sites in:(intersection (sites Empty) (sites Direction from:(from) (directions Cell from:(from) to:(site)) distance:(size Stack at:(from)))))))))))) (then (forEach Site (sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From))) (if (= (count Sites in:(sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From)))) (count Steps (last From) (site))) (add (piece "PIECE_ALPHA1") (to (site)) count:(- (size Stack at:(last From)) (- (count Sites in:(sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From)))) 1)) stack:True) (add (piece "PIECE_ALPHA1") (to (site)) stack:True))))) (move Select (from (sites Occupied by:P1)) (to (sites Around (from)) if:(and (not (<= (size Stack at:(from)) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from)))))) (not (= 0 (count Sites in:(intersection (sites Empty) (sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from))))))))) (then (forEach Site (sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) distance:(size Stack at:(last From))) (add (piece "PIECE_ALPHA1") (to (site)) stack:True)))) (then (remove (last From) count:(size Stack at:(last From))))) ifAfterwards:(= 1 (count Groups)) ### SUF: )) (end (if (= 0 (* (score P1) (score P2))) (byScore))))) ### MID: (then (and (set Score P1 (count Sites in:(forEach (sites Phase 1) if:(is Occupied (site))))) (set Score P2 (count Sites in:(forEach (sites Phase 0) if:(is Occupied (site)))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (splitCrossings (regular Star 5)) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) ### SUF: ) (move Step (to if:(is Empty (to)))))) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:1) (place "PIECE_ALPHA2" (handSite P2) count:7)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))})) ### MID: (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)))
### 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 (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 (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: ### SUF: (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: (not (is In (to) (sites "BlackenedSquares")))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (add (concentric Square rings:3 joinCorners:True) vertices:{{0 0}} edges:{{11 24} {16 24} {7 24} {12 24}}) edges:{{3 6} {8 5} {17 20} {15 18}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (if (> (count Pieces Mover) 3) (move Step (to if:(is Empty (to)))) (move (from) (to (sites Empty))) (then (if (is Line 3) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 through:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if: ### SUF: ) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 through:(site))))) (forEach Piece))))} (end (if (<= (count Pieces Next) 2) (result Next Loss))))) ### MID: (= 0 (count Cell at:(site)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(scale 2 1 (rectangle 12 2)) (shift 2 0 (scale 4 1 (rectangle 12 2))) (shift 6 0 (scale 2 1 (rectangle 12 2)))}) {(track "Track1" "22,S,E1,N,E1,S" P1 directed:True) (track "Track2" "47,S,W1,N,W1,S" P2 directed:True) (track "LoopTrack1" "1,N,E1,S" loop:True P1) (track "LoopTrack2" "24,N,W1,S" loop:True P2)} use:Vertex) (dice d:2 from:0 num:4) (piece "PIECE_ALPHA" Each (if (is In (from) (difference (sites Board) (union (sites Left) (sites Right)))) (move (from (from)) (to (trackSite Move "LoopTrack" steps:(mapEntry "Throw" (count Pips))) if:(and {(if (is Enemy (who at:(to))) (= 2 (mapEntry "Throw" (count Pips))) (is Empty (to))) (if (is In (to) (sites Next "Home")) (= 1 (var "Kiust")) True) (if (or (and (= 2 (mapEntry "Throw" (count Pips))) (is Enemy (who at:(to)))) (= 3 (mapEntry "Throw" (count Pips)))) True (all Sites (sites Track from:(trackSite Move from:(from) "LoopTrack" steps:1) to:(trackSite Move from:(from) "LoopTrack" steps:(- (mapEntry "Throw" (count Pips)) 1))) if:(not (is Enemy (who at:(site))))))}) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move (from (from)) (to (trackSite Move "Track" steps:(mapEntry "Throw" (count Pips))) if:(and {(if (is In (to) (difference (sites Board) (union (sites Left) (sites Right)))) (if (is Enemy (who at:(to))) (= 2 (mapEntry "Throw" (count Pips))) (is Empty (to))) (is Empty (to))) (if (is In (to) (sites Next "Home")) (= 1 (var "Kiust")) True) (if (or (and (= 2 (mapEntry "Throw" (count Pips))) (is Enemy (who at:(to)))) ### SUF: ) True (all Sites (sites Track from:(trackSite Move from:(from) "Track" steps:1) to:(trackSite Move from:(from) "Track" steps:(- (mapEntry "Throw" (count Pips)) 1))) if:(not (is Enemy (who at:(site))))))}) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (then (and (if (= (count Pips) 4) (and (if (!= 1 (value Player Mover)) (moveAgain)) (if (<= (value Player Mover) 0) (set Value Mover 3) (set Value Mover (- (value Player Mover) 1))))) (set Var "Kiust" 0))))) (map "Throw" {(pair 0 0) (pair 3 6) (pair 2 3) (pair 1 2) (pair 4 6)}) (regions "Home" P1 (expand (sites Left))) (regions "Home" P2 (expand (sites Right)))}) (rules (start {(place "PIECE_ALPHA1" (sites Left)) (place "PIECE_ALPHA2" (sites Right))}) (play (do (if (or (= (var "Kiust") 1) (not (is Prev Mover))) (roll)) next:(if (= 0 (mapEntry "Throw" (count Pips))) (move Pass (then (and (moveAgain) (set Var "Kiust" 1)))) (forEach Piece)))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (= 3 (mapEntry "Throw" (count Pips)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4 pyramidal:True) use:Vertex) (piece "PIECE_ALPHA" Each) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:15)) (play (if (is Prev Mover) (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (handSite Mover)) (then (if (= (var) 1) (and (set Var 0) (moveAgain))))) (or (do (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (sites Empty) if:(and (is Flat) (< ### SUF: (layer of:(to)))))) ifAfterwards:(is Flat (last To))) (move (from (sites Occupied by:Mover container:(mover))) (to (sites Empty) if:(is Flat))) (then (if (is Pattern {F R F R F} whats:{(id "PIECE_ALPHA" Mover)}) (and (set Var 1) (moveAgain))))))) (end (if (= (layer of:(last To)) 3) (result Mover Win))))) ### MID: (layer of:(from))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (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)))}) edges:{{20 16} {16 12} {12 8} {8 4} {0 6} {6 12} {12 18} {18 24}}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Step (to if:(is Empty (to)))) ### SUF: ))}) (rules (start {(place "PIECE_ALPHA1" (difference (union (expand (sites Right)) (expand (sites Bottom) steps:4)) (expand (sites Centre) steps:2 W))) (place "PIECE_ALPHA2" (difference (union (expand (sites Left)) (expand (sites Top) steps:4)) (expand (sites Centre) steps:2 E)))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 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)))))})) (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" (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" (move Step Diagonal (to if: ### SUF: (apply (remove (to))))))}) (rules (start {(place "PIECE_GAMMA1" coord:"E1") (place "PIECE_GAMMA2" coord:"E8") (place "PIECE_ZETA1" coord:"D1") (place "PIECE_ZETA2" coord:"D8") (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6))}) (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))))) ### MID: (not (is Friend (who at:(to))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (regions "Fortresses" (sites Corners)) (piece "PIECE_ALPHA" P1 (move Slide Orthogonal (to (apply if:(not (is In ### SUF: (union (sites Centre) (sites "Fortresses")))))) (then (or {(custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA2")) (apply (remove (between)))) (to if:(or {(is Friend (who at:(to))) (is In (to) (sites "Fortresses")) (and (is In (to) (sites Centre)) (is Empty (to)))}))) (surround (from (last To)) Orthogonal (between if:(and (= (what at:(between)) (id "PIECE_BETA" P2)) (is In (between) (expand origin:(centrePoint) Orthogonal))) (apply (trigger "Surrounded" P2))) (to if:(or (is Friend (who at:(to))) (is In (to) (sites Centre))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (id "PIECE_BETA" P2)) (not (is In (between) (expand origin:(centrePoint) Orthogonal)))) (apply (trigger "Surrounded" P2))) (to if:(or (is Friend (who at:(to))) (is In (to) (sites "Fortresses")))))})))) (piece "PIECE_ALPHA" P2 (move Slide Orthogonal (to (apply if:(not (is In (to) (union (sites Centre) (sites "Fortresses")))))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1")) (apply (remove (between)))) (to if:(or {(is Friend (who at:(to))) (is In (to) (sites "Fortresses")) (and (is In (to) (sites Centre)) (is Empty (to)))})))))) (piece "PIECE_BETA" P2 (move Slide Orthogonal (to (apply if:(not (= (to) (centrePoint))))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1")) (apply (remove (between)))) (to if:(or {(is Friend (who at:(to))) (is In (to) (sites "Fortresses")) (and (is In (to) (sites Centre)) (is Empty (to)))}))))))}) (rules (start {(place "PIECE_ALPHA1" {"D1" "D2" "A4" "B4" "F4" "G4" "D6" "D7"}) (place "PIECE_ALPHA2" {"D3" "C4" "E4" "D5"}) (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: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 9 9 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Board) if:(< (site) (centrePoint)))) (place "PIECE_ALPHA2" (forEach (sites Board) if:(> (site) (centrePoint))))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) ### SUF: ) (forEach Piece))) (end (forEach Player if:(no Pieces Player) (result Player Loss))))) ### MID: (move Pass)
### 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 (is Friend (who at:(to)))) (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 ### SUF: ))) (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: (= (what at:(to)) (id "PIECE_ETA" Next))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Diamond 11)) (piece "PIECE_ALPHA" Each) (regions P1 {(sites Side NE) (sites Side SW)}) (regions P2 {(sites Side NW) (sites Side SE)})}) ### SUF: ) ### MID: (rules phases:{(phase "Opening" P1 (play (move Add (to (sites Empty)))) (nextPhase "Playing")) (phase "Playing" (play (move Add (to (sites Empty)) (then (if (= 0 (count MovesThisTurn)) (moveAgain))))))} (end (if (is Connected Mover) (result Mover Win))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)}) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2)}) (rules (play (if (not (is Prev Mover)) (or (move Add (to (sites Empty)) (then (if (and (not (is Prev Mover)) (< 0 (count Sites in:(sites (results from:(last To) to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" (last To) (then (moveAgain))) (set Var "LT" -1)))) (forEach Site (sites Occupied by:Mover) (do (set Var "LT" (site)) next:(forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))) Orthogonal)) (move (from (var "LT")) (to (site) if:(!= (last From) (to)) (apply (remove (site)))) (then (and (add (piece (id "PIECE_ALPHA" Next)) (to (var "LT"))) (set Var "LT" (last To) (then (if (< 0 (count Sites in:(sites (results from:(var "LT") to:(sites Around ### SUF: Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))))) (set NextPlayer (player (mover))) (set Var "LT" -1))))))))))) (if (<= 0 (var "LT")) (forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))) Orthogonal)) (move (from (var "LT")) (to (site) if:(!= (last From) (to)) (apply (remove (site)))) (then (and (add (piece (id "PIECE_ALPHA" Next)) (to (var "LT"))) (set Var "LT" (last To) (then (if (< 0 (count Sites in:(sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))))) (set NextPlayer (player (mover))) (set Var "LT" -1)))))))) (move Add (to (sites Empty)) (then (if (and (not (is Prev Mover)) (< 0 (count Sites in:(sites (results from:(last To) to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" (last To) (then (moveAgain))) (set Var "LT" -1))))))) (end {(if (is Connected Orthogonal Mover) (result Mover Win))}))) ### MID: (from)
### 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 ### SUF: 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 (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")))))))))}) (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: (max 1)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)}) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2)}) (rules (play (if (not (is Prev Mover)) (or (move Add (to (sites Empty)) (then (if (and (not (is Prev Mover)) (< 0 (count Sites in:(sites (results from:(last To) to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" ### SUF: (then (moveAgain))) (set Var "LT" -1)))) (forEach Site (sites Occupied by:Mover) (do (set Var "LT" (site)) next:(forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))) Orthogonal)) (move (from (var "LT")) (to (site) if:(!= (last From) (to)) (apply (remove (site)))) (then (and (add (piece (id "PIECE_ALPHA" Next)) (to (var "LT"))) (set Var "LT" (last To) (then (if (< 0 (count Sites in:(sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))))) (set NextPlayer (player (mover))) (set Var "LT" -1))))))))))) (if (<= 0 (var "LT")) (forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))) Orthogonal)) (move (from (var "LT")) (to (site) if:(!= (last From) (to)) (apply (remove (site)))) (then (and (add (piece (id "PIECE_ALPHA" Next)) (to (var "LT"))) (set Var "LT" (last To) (then (if (< 0 (count Sites in:(sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))))) (set NextPlayer (player (mover))) (set Var "LT" -1)))))))) (move Add (to (sites Empty)) (then (if (and (not (is Prev Mover)) (< 0 (count Sites in:(sites (results from:(last To) to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" (last To) (then (moveAgain))) (set Var "LT" -1))))))) (end {(if (is Connected Orthogonal Mover) (result Mover Win))}))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (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 (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 if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or (forEach Piece "PIECE_ALPHA" (or (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))))) (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" (or (move Step Diagonal (to if:(is Empty (to)))) (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty ### SUF: )) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4 pyramidal:True) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (play (move Add (to (sites Empty) if:(is Flat)))) (end (if (is Line (- (count Rows) (layer of:(last To))) SameLayer) ### SUF: )))) ### MID: (result Mover Win)
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (piece "PIECE_ALPHA" Each) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:4) (map "Throw" {(pair 0 6) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (map "FirstEnemySite" {(pair P1 2) (pair P2 0)}) (regions "Home" P1 (sites Left)) (regions "Home" P2 (sites Right))}) (rules (start {(place "PIECE_ALPHA1" (sites Left)) (place "PIECE_ALPHA2" (sites Right))}) (play (do (roll) next:(or (if (and (= 1 (mapEntry "Throw" (count Pips))) (= (mover) (who at:36))) (move (from 36) (to (mapEntry "FirstEnemySite" (mover)) if:(not (is Friend (mapEntry "FirstEnemySite" (mover)))) (apply if:(is Enemy (who at:(to))) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home"))))))))))) (forEach Piece (or (if (is In (from) (sites Track Mover "HomeTrack")) (if (if (!= 0 (state at:(from))) True (= 1 (mapEntry "Throw" (count Pips)))) (if (not (is Friend (who at:(trackSite Move "HomeTrack" steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move "HomeTrack" steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) (if (is In (to) (sites Next "Home")) (remove (to)) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home")))))))))) (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (mapEntry "Throw" (count Pips)))) (set State at:(last To) 1))))))) (if (is In (from) (sites Track Mover "EnemyTrack")) (if (not (is Friend (who at:(trackSite Move "EnemyTrack" steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move "EnemyTrack" steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) (if (is In (to) (sites Next "Home")) (remove (to)) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home")))))))))))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (board (merge {(rectangle 12 3) (shift 1 -1 (rectangle 13 1))}) {(track "HomeTrack1" "0,N,E1,S" P1 directed:True) (track "HomeTrack2" "2,N,W1,S" P2 directed:True) (track "EnemyTrack1" "2,N,W1,S" P1 directed:True) (track "EnemyTrack2" "0,N,E1,S" P2 directed:True)} use:Vertex)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (wedge 4) (shift 0 3 (rotate 180 (wedge 4)))) 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" (expand (sites Bottom) steps:2)) (place "PIECE_ALPHA2" (expand (sites Top) steps:2))}) (play (forEach Piece)) (end (if (no Pieces Next) ### SUF: )))) ### MID: (result Next Loss)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {6 12 11 10 9 8 7 5 4 3 2 1 0 13 14 15 16 17 18 20 21 22 23 24 25 -2} P1 directed:True) (track "Track2" {19 25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12 -2} P2 directed:True)} use:Vertex) (dice d:6 num:2) (map "Bar" {(pair P1 6) (pair P2 19)}) (regions "FinalQuadrant" P1 (sites {20 21 22 23 24 25})) (regions "FinalQuadrant" P2 (sites {7 8 9 10 11 12})) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move from:(from) steps:(pips)) -2) (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "FinalQuadrant"))) (move Remove (from))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Bar" Next))))))) (then (if (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 ### SUF: ))) ### MID: (if (no Pieces Mover) (result Mover Win))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric {0 10}) (track "Track" {0 1 2 3 4 5 6 7 8 9} loop:True) use:Vertex) (piece "PIECE_ALPHA" Shared) (dice d:6 num:1) (regions P1 (expand (sites Bottom) steps:2)) (regions P2 (expand (sites Top) steps:2))}) (rules (start (set Count 1 to:(sites Board))) (play (do (roll) next:(move (from (if (is Prev Mover) (sites {(last From)}) (forEach (sites Mover) if:(is Occupied (site))))) (to (trackSite Move from:(from) steps:(count Pips))) (then (if (is Occupied (last From)) (moveAgain)))))) (end (forEach Player if:(all Sites ### SUF: if:(and (is Next Player) (is Empty (site)))) (result Player Loss))))) ### MID: (sites Player)
### 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))) ### SUF: ) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})))}) (move Select (from (sites Outer) if:(or (is Mover (who at:(from))) (= (who at:(from)) 0))) (then (and (fromTo (from (last To)) (to (handSite (mover)))) (moveAgain)))))) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (add (piece (next)) (to (last To)))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (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 (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)))) ### SUF: )) (moveAgain))))) (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or (forEach Piece "PIECE_ALPHA" (or (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))))) (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" (or (move Step Diagonal (to if:(is Empty (to)))) (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to if:(is Empty (to)))
### 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) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (union (expand (sites Bottom)) (sites Row 2))) (place "PIECE_ALPHA1" (centrePoint))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) ### SUF: ) (forEach Piece))) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (move Pass)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules ### SUF: (play (forEach Piece)) (end (if (and (not (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover)))) (is Line 3)) (result Mover Win))))) ### MID: (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2))})
### 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 if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) ### SUF: (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (directions {FR FL})
### PRE: (game "GAME_NAME" (players 6) (equipment {(board (hex Star 4)) (piece "PIECE_ALPHA" Each) (regions "Home" P1 (expand origin:(coord row:0 column:4) steps:(- 4 1))) (regions "Home" P2 (expand origin:(coord row:4 column:(* 4 3)) steps:(- 4 1))) (regions "Home" P3 (expand origin:(coord row:(* 4 3) column:(* 4 4)) steps:(- 4 1))) (regions "Home" P4 (expand origin:(coord row:(* 4 4) column:(* 4 3)) steps:(- 4 1))) (regions "Home" P5 (expand origin:(coord row:(* 4 3) column:4) steps:(- 4 1))) (regions "Home" P6 (expand origin:(coord row:4 column:0) steps:(- 4 1))) (map {(pair 1 4) (pair 2 5) (pair 3 6) (pair 4 1) (pair 5 2) (pair 6 3)})}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2)) (place "PIECE_ALPHA3" (sites P3)) (place "PIECE_ALPHA4" (sites P4)) (place "PIECE_ALPHA5" (sites P5)) (place "PIECE_ALPHA6" (sites P6))}) phases:{(phase "Movement" (play (forEach Piece (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Step (to if:(and (is Empty (to)) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))))) (nextPhase ### SUF: "MultiJump")) (phase "MultiJump" (play (or (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Pass))) (nextPhase (not (is Mover (next))) "Movement"))} (end (if (= (sites Occupied by:Mover) (sites (player (mapEntry (mover))))) (result Mover Win))))) ### MID: (is Mover (next))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))) (then (set Value Mover 1))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_BETA" Each (or (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (set Value Mover 0))) (move Slide (then (set Value Mover 1))))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (or (if (= (value Player Prev) 1) (or (if (and (is In (last From) ### SUF: ) (is In (last From) (sites Empty))) (move Select (from (last To) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))) (move Select (from (sites Pending) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)}))))) (do (set Pending (sites From (or (forEach Piece "PIECE_ALPHA" (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))))) next:(forEach Piece)))) (end (if (no Pieces Mover) (result Mover Loss))))) ### MID: (sites Pending)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Shared maxState:5)}) (rules (start {(place Random (sites Empty) {"PIECE_ALPHA1" "PIECE_ALPHA2"} count:2) (place Random (sites Empty) {"PIECE_BETA"} count:12 state:1) (place Random (sites Empty) {"PIECE_BETA"} count:12 state:2) (place Random (sites Empty) {"PIECE_BETA"} count:12 state:3) (place Random (sites Empty) {"PIECE_BETA"} count:12 state:4) (place Random (sites Empty) {"PIECE_BETA"} count:12 state:5)}) phases:{(phase "Swapping" (play (or (move Pass (then (set Var "Passed" 1))) (move Select (from (sites Board) if:(and (!= 3 (who at:(from))) (not (is In (from) (values Remembered))))) (to (sites Board) if:(= 3 (who at:(to)))) (then (and {(remember Value (last To)) (do (add (piece (who at:(last From))) (to (last To) (apply (do (set Var "StateToBeAtLastFrom" (state at:(to))) next:(remove (to)))))) next:(add (piece 3 state:(var "StateToBeAtLastFrom")) (to (last From) (apply (remove (to)))))) (if (!= 3 (size Array (values Remembered))) (moveAgain))}))))) (nextPhase (or (= 1 (var "Passed")) (= 4 (size Array (values Remembered)))) "Choose")) (phase "Choose" (play (or (move Swap Players P1 P2 (then (set NextPlayer (player 1)))) (move Pass))) (nextPhase "Play")) (phase "Play" (play (move Add (to (sites Around (sites Occupied by:Mover) Orthogonal) if:(not (or (= (mover) (who at:(to))) (= (next) (who at:(to)))))) stack:True (then (if (and (= 3 (who at:(last To) level:0)) (= 6 (count Sites in:(forEach (sites Occupied by:Mover) if:(= (state at:(last To) level:0) ### SUF: ))))) (and (remove (forEach (sites Board) if:(= (state at:(last To) level:0) (state at:(site) level:0))) count:2) (addScore Mover 1)))))))} (end (if (or (= 3 (score P1)) (= 3 (score P2))) (byScore))))) ### MID: (state at:(site) level:0)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {0 1 2 3 4 5 7 8 9 10 11 12 25 24 23 22 21 20 18 17 16 15 14 13 -2} P1 directed:True) ### SUF: } use:Vertex) (dice num:2) (regions "Home" P1 {20 21 22 23 24 25}) (regions "Home" P2 {7 8 9 10 11 12}) (regions "Side" P1 {0 1 2 3 4 5 6 7 8 9 10 11 12}) (regions "Side" P2 {13 14 15 16 17 18 19 20 21 22 23 24 25}) (map {(pair 1 0) (pair 2 25)}) (piece "PIECE_ALPHA" Each (forEach Die replayDouble:True if:(and {(!= (pips) 0) (!= (trackSite Move from:(from) steps:(pips)) -1) (!= (trackSite Move from:(from) steps:(pips)) -2)}) (if (or {(not (= (from) (mapEntry (mover)))) (and (= (from) (mapEntry (mover))) (!= (topLevel at:(from)) 13)) (not (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "Side"))))}) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(not (is Enemy (who at:(to)))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 0 count:15) (place Stack "PIECE_ALPHA2" 25 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "Home"))) (forEach Die replayDouble:True if:(!= (pips) 0) (forEach Site (sites Occupied by:Mover) (if (and (is Occupied (site)) (!= (trackSite Move from:(site) steps:(pips)) -1)) (if (= (trackSite Move from:(site) steps:(pips)) -2) (move Remove (site)) (move (from (site)) (to (trackSite Move from:(site) steps:(pips)) if:(not (is Enemy (who at:(to)))))))) noMoveYet:(firstMoveOnTrack "Track" Mover (if (and (is Friend (who at:(site))) (< (trackSite Move from:(site) steps:(pips)) 0)) (move Remove (site)))) (then (if (not (all DiceUsed)) (moveAgain))))) (max Distance "Track" Mover (forEach Piece top:True (then (if (not (all DiceUsed)) (moveAgain)))))))) (end (if (no Pieces Mover) (byScore {(score P1 (if (is Mover P1) (if (= (size Stack in:(sites Occupied by:P2)) 15) 2 1) 0)) (score P2 (if (is Mover P2) (if (= (size Stack in:(sites Occupied by:P1)) 15) 2 1) 0))}))))) ### MID: (track "Track2" {25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12 -2} P2 directed:True)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 20) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "79,W,S1,E,S1,W,S1,E" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (if (or (= (state at:(from)) 0) (and (or (= 1 (mapEntry (count Pips))) (= 6 (mapEntry (count Pips)))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(if (= (state at:(from)) 1) 1 (mapEntry (count Pips)))) -1) (if (or (is In (trackSite Move steps:(if (= ### SUF: 1) 1 (mapEntry (count Pips)))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(if (= (state at:(from)) 1) 1 (mapEntry (count Pips))))))) (move (from) (to (trackSite Move steps:(if (= (state at:(from)) 1) 1 (mapEntry (count Pips)))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (map {(pair 0 6) (pair 1 0) (pair 2 2) (pair 3 1) (pair 4 1) (pair 5 0) (pair 6 6)}) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (do (roll) next:(forEach Piece))) (end {(if (no Pieces Next) (result Next Loss)) (if (and (= (count Sites in:(difference (sites Occupied by:P1) (sites P2))) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites P1))) 0)) (result Mover Draw))}))) ### MID: (state at:(from))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Neutral (flips 1 2))}) (rules (start {(place "PIECE_ALPHA0" (sites Phase 0) state:1) (place "PIECE_ALPHA0" (sites Phase 1) state:2)}) (play (move Select (from (sites Board)) (then (flip (last To) (then (custodial (from (last To)) Adjacent (between if:(!= (state at:(between)) (state at:(last To))) (apply (allCombinations (add (piece "PIECE_ALPHA0" state:(mover)) (to (last To))) (flip (between))))) (to if:(= (state at:(to)) (state at:(last To)))))))))) (end {(if (and (!= 0 (count Sites in:(forEach (sites Column 0) if:(or (all Sites (sites Row (row of:(site))) if:(= 1 (state at:(site)))) (all Sites (sites Row (row of:(site))) if:(= 2 (state at:(site)))))))) (!= 0 (count Sites in:(forEach (sites Row 0) if:(or (all Sites (sites Column (column of:(site))) if:(= 1 (state at:(site)))) (all Sites (sites Column (column of:(site))) if:(= 2 (state at:(site))))))))) (result Mover Loss)) (if (!= 0 (count Sites in:(forEach (sites Column 0) if:(or (all Sites (sites Row (row of:(site))) if:(= 1 (state at: ### SUF: ))) (all Sites (sites Row (row of:(site))) if:(= 2 (state at:(site)))))))) (result P1 Win)) (if (!= 0 (count Sites in:(forEach (sites Row 0) if:(or (all Sites (sites Column (column of:(site))) if:(= 1 (state at:(site)))) (all Sites (sites Column (column of:(site))) if:(= 2 (state at:(site)))))))) (result P2 Win))}))) ### MID: (site)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- 9 3) 2) (rectangle 3 9 diagonals:Alternating)) (shift (/ (- 9 3) 2) 0 (rectangle 9 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_BETA" P2 N (move Step (directions {Rightward Forwards Leftward}) (to if:(is Empty (to)))))}) (rules (start { ### SUF: (place "PIECE_BETA2" (sites {"D1" "E1" "F1" "D2" "E2" "F2" "D3" "E3" "F3" "A4" "B4" "C4" "D4" "E4" "F4" "G4" "H4" "I4"}))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (place "PIECE_ALPHA1" coord:"E7")
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (tri {3 5 3 5 3}) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start (set Score Each 0)) (play (if (is Prev Mover) (if (= 0 (size Array (values Remembered))) (forEach Piece (move Hop (from if:(!= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece (id "PIECE_ALPHA" Mover)) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty ### SUF: ))))) (moveAgain))})))))) (forEach Piece (move Hop (from if:(= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece (id "PIECE_ALPHA" Mover)) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty (to)))))) (moveAgain))}))))))) (do (forget Value All) next:(move Add (piece (id "PIECE_ALPHA" Mover)) (to (sites Empty)) (then (if (can Move (forEach Piece (move Hop (from if:(!= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece (id "PIECE_ALPHA" Mover)) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty (to)))))) (moveAgain))}))))))) (moveAgain))))) (then (and (set Score Mover (count Pieces Mover)) (set Score Next (count Pieces Next)))))) (end {(if (and (or {(no Moves Next) (all Passed)}) (= (score Mover) (score Next))) (result Mover Win)) (if (and (or {(no Moves Next) (all Passed)}) (!= (score Mover) (score Next))) (byScore))}))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (scale 1.5 (merge {(shift 2 0 (rectangle 2 1)) (shift 1.5 0 (rectangle 2 1)) (shift 1 0 (rectangle 2 1)) (shift 0.5 0 (rectangle 2 1)) (rectangle 2 1)})) vertices:{{1.5 0.75}}) {(track "Track1" "8,6,4,2,0,1,3,5,7,9" loop:True P1) (track "Track2" "1,3,5,7,9,8,6,4,2,0" loop:True P2)} use:Vertex) (piece "PIECE_ALPHA" Each (if (and ### SUF: (is Empty (trackSite Move steps:(count Pips)))) (move (from) (to (trackSite Move steps:(count Pips)))))) (hand Each) (dice d:6 num:1) (map "Goal" {(pair P1 5) (pair P2 4)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:5) (place Stack "PIECE_ALPHA2" (handSite P2) count:5)}) (play (do (roll) next:(priority {(if (and (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (is Empty (trackSite Move from:(handSite Mover) steps:(- (count Pips) 1)))) (move (from (handSite Mover)) (to (trackSite Move from:(handSite Mover) steps:(- (count Pips) 1))))) (forEach Piece)} (then (if (= (mapEntry "Goal" Mover) (last To)) (fromTo (from (last To)) (to 10))))))) (end (if (all Sites (sites Occupied by:Mover) if:(= (site) 10)) (result Mover Win))))) ### MID: (!= (from) 10)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" ### SUF: ) (place "PIECE_ALPHA2" (union (expand (sites Top) steps:3) (sites {"A5" "B5" "C5" "D5"})))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (union (expand (sites Bottom) steps:3) (sites {"F5" "G5" "H5" "I5"}))
### 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 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if: ### SUF: ) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 N (move Step Forwards (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1)) (place "PIECE_BETA2" (union (expand (sites Bottom)) (sites Row 2)))}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P1) 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: (and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (dual (hex Prism 7 6)) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (if (< 0 (count Sites in:(sites Occupied by:Mover))) (forEach (sites Empty) if:(and (> (count Pieces Mover in:(sites LineOfSight at:(site))) 0) (= (count Sites in:(sites Around (site) Own)) 0))) (sites Empty))))) (nextPhase (= 4 (count Moves)) "Play")) (phase "Play" (play (if (can Move (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(sites LineOfSight at:(site))) 0))))) (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(sites LineOfSight at:(site))) 0))) (then (forEach Group (if (all Sites (sites) if:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from: ### SUF: 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)))))))))} (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: (site)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (move (from) (to (sites LineOfSight Farthest at:(from))))) (piece "PIECE_BETA" Each (move (from) (to (sites LineOfSight Farthest at:(from)))))}) (rules (start {(place "PIECE_BETA1" (intersection (sites Bottom) (sites Column 2))) (place "PIECE_BETA2" (intersection (sites Top) (sites Column 2))) (place "PIECE_ALPHA1" (difference (sites Bottom) (sites Column 2))) (place "PIECE_ALPHA2" (difference (sites Top) (sites Column 2)))}) ### SUF: (end (if (is In (where "PIECE_BETA" Mover) (sites Centre)) (result Mover Win))))) ### MID: (play (forEach Piece))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (or {(move Step (to if:(is Empty (to)))) (move Hop (between (range 1 9) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(and (is Empty (to)) (is Even (count Steps (from) (to))))))})) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (expand (sites Centre))) (place "PIECE_BETA2" (handSite P2) count:15) (place "PIECE_ALPHA1" (handSite P1))}) phases:{(phase "PlacementTiger" P1 (play (move (from (handSite P1)) (to (sites {"C3" "C7"})) (then (moveAgain)))) (nextPhase Mover "MoveHuman")) (phase "MoveHuman" P1 (play ### SUF: ) (nextPhase Mover (= 6 (count Sites in:(intersection (expand (sites Centre)) (sites Occupied by:Next)))) "Movement")) (phase "PlacementHuman" P2 (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))})) ### MID: (move (from (intersection (expand (sites Centre)) (sites Occupied by:Next))) (to (difference (sites Empty) (expand (sites Centre)))) (then (if (< 6 (count Sites in:(intersection (expand (sites Centre)) (sites Occupied by:Next)))) (moveAgain))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (or (or (move Add (piece (id "PIECE_ALPHA" P2)) (to (sites Empty)) (then (if (< (count MovesThisTurn) 2) (moveAgain)))) (move Set NextPlayer (player (next)))) (if (= (count MovesThisTurn) 0) (move Pass (then (if (is Mover P1) (swap Players P1 P2 (then (note "Player 1 is now White. Player 2 is now Black." to:All))) (note "Player 1 is now Black. Player 2 is now White." to:All) (then (do (set NextPlayer ### SUF: ) next:(set Var 1))))))))) (nextPhase (= 1 (var)) "Playing")) (phase "Playing" (play (or (move Add (to (sites Empty) if:(= (id P1) (mover))) (then (if (= 0 (count MovesThisTurn)) (moveAgain)))) (move Add (to (sites Empty) if:(= (id P2) (mover)))))))} (end {(if (and (not (= 1 (var))) (is Connected All {(sites Side N) (sites Side S) (sites Side E) (sites Side W)})) (result Mover Win)) (if (and {(= (id P1) (mover)) (or (is Connected Orthogonal {(sites Side N) (sites Side S)}) (is Connected Orthogonal {(sites Side E) (sites Side W)}))}) (result P1 Win)) (if (and {(= (id P2) (mover)) (is Connected All {(sites Side N) (sites Side S) (sites Side E) (sites Side W)})}) (result P2 Win))}))) ### MID: (player 1)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3) use:Vertex) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal) ### SUF: )))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:9)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (forEach Piece))))} (end {(if (<= (count Pieces Next) 2) (result Next Loss)) (if (no Moves Next) (result Mover Win))}))) ### MID: (moveAgain)
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(sites Row 0) (sites Row 1) (sites Row 2) (sites Row 3)})) (place "PIECE_ALPHA2" (union {(sites Row 5) (sites Row 6) (sites Row 7) (sites Row 8)}))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5 diagonals:Solid) 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" (union (difference (expand (sites Bottom) steps:2) (sites {"E5" "G5" "I5"})) (sites {"B2" "B4" "D2" "D4" "F2" "F4" "H2" "H4"}))) (place "PIECE_ALPHA2" (union (difference (expand (sites Top) steps:2) (sites {"E5" "A5" "C5"})) (sites {"B6" "B8" "D6" "D8" "F6" "F8" "H6" "H8"})))}) (play (forEach Piece)) (end (if (no Moves Next) ### SUF: )))) ### MID: (result Next Loss)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (hand P1) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2 (move Step (from Cell) Diagonal (to Cell if:(is Empty Cell (to))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who at:(site))) (remove (site) (then (if (can Move (move (from Cell (last To)) (to Cell (forEach (sites Around Cell (from) Diagonal) if:(and (is Empty Cell (site)) (!= 0 (count Sites in:(forEach (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(from))) if:(is Enemy (who at:(site))))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who at:(site))) (remove (site))))))) (moveAgain)))))))))}) (rules (start {(place "PIECE_BETA2" Cell {"E3" "D4" "C5" "D6" "E5" "F4"}) (place "PIECE_ALPHA1" "Hand1" count:66)}) phases:{(phase "InitGuerrilla" P1 (play (move (from (handSite Mover)) (to Vertex (difference (sites Empty Vertex) (sites Outer))) (then (moveAgain)))) (nextPhase (is Next Mover) "GuerrillaMove")) (phase "GuerrillaMove" P1 (play (if (is Prev Mover) (move (from (handSite Mover)) (to Vertex (difference (sites Around (last To) Orthogonal if:(is Empty (to))) (sites Outer))) (then (forEach Site (forEach (sites Occupied by:P2 on:Cell) if:(all Sites (sites Incident Vertex of:Cell at:(site)) if:(is Occupied Vertex (site)))) (remove Cell (site))))) (move (from (handSite Mover)) (to Vertex (difference (sites Empty Vertex) (sites Outer)) if:(not (= (count Sites in:(sites Around (to) Own Orthogonal)) 0))) (then (and (forEach Site (forEach (sites Occupied by:P2 on:Cell) if:(all Sites (sites Incident Vertex of:Cell at:(site)) if:(is Occupied Vertex (site)))) (remove Cell (site))) (moveAgain))))))) (phase "CoinMove" P2 (play (if (is Prev Mover) (move (from Cell (last To)) (to Cell (forEach (sites Around Cell (from) Diagonal) if:(and (is Empty Cell (site)) (!= 0 (count Sites in:(forEach (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(from))) if:(is Enemy (who at:(site))))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who at:(site))) (remove (site) (then (if (can Move (move (from Cell (last To)) (to Cell (forEach (sites Around Cell (from) Diagonal) if:(and (is Empty Cell (site)) (!= 0 (count Sites in:(forEach (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at: ### SUF: )) if:(is Enemy (who at:(site))))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who at:(site))) (remove (site))))))) (moveAgain)))))))) (forEach Piece))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (from)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {0 1 2 3 4 5 7 8 9 10 11 12 25 24 23 22 21 20 18 17 16 15 14 13 -2} P1 directed:True) (track "Track2" {25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12 -2} P2 directed:True)} use:Vertex) (dice num:2) (regions "Home" P1 {20 21 22 23 24 25}) (regions "Home" P2 {7 8 9 10 11 12}) (regions "Side" P1 {0 1 2 3 4 5 6 7 8 9 10 11 12}) (regions "Side" P2 {13 14 15 16 17 18 19 20 21 22 23 24 25}) (map {(pair 1 0) (pair 2 25)}) (piece "PIECE_ALPHA" Each (forEach Die replayDouble:True if:(and {(!= (pips) 0) (!= (trackSite Move from:(from) steps:(pips)) -1) (!= (trackSite Move from:(from) steps:(pips)) -2)}) (if (or {(not (= (from) (mapEntry (mover)))) (and (= (from) (mapEntry (mover))) (!= (topLevel at:(from)) 13)) (not (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "Side"))))}) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(not (is Enemy (who at:(to)))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 0 count:15) (place Stack "PIECE_ALPHA2" 25 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "Home"))) (forEach Die replayDouble:True if: ### SUF: (forEach Site (sites Occupied by:Mover) (if (and (is Occupied (site)) (!= (trackSite Move from:(site) steps:(pips)) -1)) (if (= (trackSite Move from:(site) steps:(pips)) -2) (move Remove (site)) (move (from (site)) (to (trackSite Move from:(site) steps:(pips)) if:(not (is Enemy (who at:(to)))))))) noMoveYet:(firstMoveOnTrack "Track" Mover (if (and (is Friend (who at:(site))) (< (trackSite Move from:(site) steps:(pips)) 0)) (move Remove (site)))) (then (if (not (all DiceUsed)) (moveAgain))))) (max Distance "Track" Mover (forEach Piece top:True (then (if (not (all DiceUsed)) (moveAgain)))))))) (end (if (no Pieces Mover) (byScore {(score P1 (if (is Mover P1) (if (= (size Stack in:(sites Occupied by:P2)) 15) 2 1) 0)) (score P2 (if (is Mover P2) (if (= (size Stack in:(sites Occupied by:P1)) 15) 2 1) 0))}))))) ### MID: (!= (pips) 0)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (scale 1 2 (wedge 4 3)) 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:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:5) (place "PIECE_BETA2" (sites Top))}) phases:{(phase "Opening" P1 (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) ### SUF: ) (if (< (count Pieces P1) 4) (result P2 Win))}))) ### MID: (result P1 Win)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (!= (value Player Mover) (mover)) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))) (then (set Value Mover (mover))))))) (piece "PIECE_EPSILON" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ZETA" 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_BETA" Each (move Slide (to if: ### SUF: (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_GAMMA1" {"A1" "H1"}) (place "PIECE_ZETA1" {"B1" "G1"}) (place "PIECE_EPSILON1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"D1") (place "PIECE_DELTA1" coord:"E1") (place "PIECE_GAMMA2" {"A8" "H8"}) (place "PIECE_ZETA2" {"B8" "G8"}) (place "PIECE_EPSILON2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"E8") (place "PIECE_DELTA2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Mover))) (then (if (!= (next) (value Player Next)) (if (is Threatened (id "PIECE_DELTA" Next)) (set Value Next (next))))))) (end {(if (and (is Threatened (id "PIECE_DELTA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (is Enemy (who at:(to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10)) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(and (is Empty (to)) (< (+ (results from:(sites {(from)}) to:(sites Around (from) Orthogonal) (if (= (from) (to)) 0 (if (is Friend (who at:(to))) 1 (if (is Enemy (who at:(to))) -1 0))))) (+ (results from:(sites {(from)}) to:(sites Around (to) Orthogonal) (if (= (from) (to)) 0 (if (is Friend (who at:(to))) 1 ### SUF: )))))))))}) (rules (start {(place "PIECE_ALPHA1" (sites {23 25 27 32 34 36 43 47 52 63 72 74 76 65 67 56})) (place "PIECE_ALPHA2" (sites {22 24 26 33 35 37 42 46 53 57 62 64 66 73 75 77}))}) (play (forEach Piece)) (end (if (no Moves Next) (result Mover Win))))) ### MID: (if (is Enemy (who at:(to))) -1 0)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4 pyramidal:True) use:Vertex) (piece "PIECE_ALPHA" Each) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:15)) (play (if (is Prev Mover) (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (handSite Mover)) (then (if (= (var) 1) (and (set Var 0) (moveAgain))))) (or (do (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) ### SUF: True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (sites Empty) if:(and (is Flat) (< (layer of:(from)) (layer of:(to)))))) ifAfterwards:(is Flat (last To))) (move (from (sites Occupied by:Mover container:(mover))) (to (sites Empty) if:(is Flat))) (then (if (is Pattern {F R F R F} whats:{(id "PIECE_ALPHA" Mover)}) (and (set Var 1) (moveAgain))))))) (end (if (= (layer of:(last To)) 3) (result Mover Win))))) ### MID: (is Empty (ahead (from) USE))