text
stringlengths
218
3.08k
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9)) (piece "PIECE_ALPHA" Each (or (move Step Orthogonal (to if:(and (is Empty (to)) (all Sites (sites Occupied by:Shared on:Edge) if:(not (is In (site) (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))))))))) (move Hop Orthogonal (between if:(is Enemy (who at:(between)))) (to if:(and {(is Empty (to)) (all Sites (sites Occupied by:Shared on:Edge) if:(not (is In (site) (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(between)))))) (all Sites (sites Occupied by:Shared on:Edge) if:(not (is In (site) (intersection (sites Incident Edge of:Cell at:(between)) (sites Incident Edge of:Cell at:(to))))))}))))) (piece "PIECE_BETA" Shared) (hand Each) (regions P1 (sites Top)) (regions P2 (sites Bottom))}) (rules (start {(place "PIECE_BETA" (handSite P1) count:10) (place "PIECE_BETA" (handSite P2) count:10) (place "PIECE_ALPHA1" (intersection (sites Bottom) (sites Column (column of:(centrePoint))))) (place "PIECE_ALPHA2" (intersection (sites Top) (sites Column (column of:(centrePoint)))))}) (play (or (do (if (is Occupied (handSite Mover)) (move (from (handSite Mover)) (to Edge (difference (sites Empty Edge) (sites Outer Edge))))) ifAfterwards:(and {(!= Infinity (count Steps (step Orthogonal (to if:(and (is Empty (to)) (all Sites (sites Occupied by:Shared on:Edge) if:(not (is In (site) (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))))))))) (where "PIECE_ALPHA" P1) (sites P1))) (!= Infinity (count Steps (step Orthogonal (to if:(and (is Empty (to)) (all Sites (sites Occupied by:Shared on:Edge) if:(not (is In ### SUF: (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))))))))) (where "PIECE_ALPHA" P2) (sites P2)))})) (forEach Piece))) (end (if (and (is LastTo Cell) (is In (last To) (sites Mover))) (result Mover Win))))) ### MID: (site)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (makeFaces (remove (square 5 diagonals:Alternating) edges:{{{0 0} {1 1}} {{1 1} {2 2}} {{2 2} {3 3}} {{3 3} {4 4}} {{4 0} {3 1}} {{3 1} {2 2}} {{2 2} {1 3}} {{1 3} {0 4}}})) use:Vertex) (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))) (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))))))}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {"B2" "D2" "B4" "D4"}) counts:{5 5 5 5}) (place "PIECE_BETA2" (sites {"C1" "C5"}))}) (play (if (is Prev Mover) (or (move Pass) (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if: ### SUF: ) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece top:True))) (end {(if (no Moves P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win))}))) ### MID: (and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (concentric {1 4}) edges:{{1 0} {0 3}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:2)) phases:{(phase "Placement" (play (move (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) ### SUF: )))) ### MID: (result Mover Win)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (if (is In (from) (sites Corners)) (move (from (from)) (to (sites Empty))) (move Step (to if:(is Empty (to)))) (then (if (is Line 3) (moveAgain)))))}) (rules (start ### SUF: ) phases:{(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) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (forEach Piece))))} (end (forEach NonMover if:(no Pieces Player) (result Player Loss))))) ### MID: (place "PIECE_ALPHA" "Hand" count:12)
### 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 ### SUF: )))} (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 (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (or (move Step (directions {FL FR Forward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step (directions {BL BR}) (to if:(is Empty (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 (or (if (= (state at:(from)) 1) (move (from) (to (ahead (ahead (from) N) N) if:(is Empty (to)))) (then (set State at:(last To) 0))) (move Step (directions {BL BR FL FR Forward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 2)) (place "PIECE_ALPHA2" (sites Row 5)) (place "PIECE_GAMMA1" {"A1" "H1"}) (place "PIECE_ZETA1" {"B1" "G1"}) (place "PIECE_EPSILON1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"E1" state:1) (place "PIECE_DELTA1" coord:"D1") (place "PIECE_GAMMA2" {"A8" "H8"}) (place "PIECE_ZETA2" {"B8" "G8"}) (place "PIECE_EPSILON2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"D8" state:1) (place "PIECE_DELTA2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Mover))))) (end {(if (and (is Threatened (id "PIECE_DELTA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw)) (if (and {(= (count Pieces Next) 1) (= (count Pieces Mover) 2) (!= (where "PIECE_BETA" Mover) -1)}) (result Mover Draw))}))) ### MID: (remove (to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 (if (= (state at:(from)) 1) (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 (and (forEach Site (sites Occupied by:Mover) (if (= (state at:(site)) 0) (set State at:(site) 1))) (set State at:(last To) 0))))) (piece "PIECE_BETA" P2 N (move Step (directions {FR FL}) (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (intersection (sites Top) (union (sites Left) (difference (expand (sites Right)) (sites Right)))) state:1) (place "PIECE_BETA2" (difference (expand (sites Bottom) steps:2) (sites Phase 0)))}) phases:{(phase "Opening" P1 (play (forEach Piece (or (move Step Diagonal (to if:(is Empty (to)))) (move Hop Diagonal ### SUF: (to if:(is Empty (to)))) (then (set State at:(last To) 0))))) (nextPhase "Movement")) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (between if:(is Enemy (who at:(between))) (apply (remove (between))))
### 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 ### SUF: ) (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"))) (if (> (count Pieces Mover) 3) (forEach Piece) (move (from (sites Occupied by:Mover)) (to (sites Empty)))))))} (end (if (<= (count Pieces Next) 2) (result Next Loss))))) ### MID: (handSite Mover)
### 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) ### SUF: (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (sites {"C6" "E6"})) (place "PIECE_ALPHA2" (union (expand (union (sites Right) (sites Left))) (expand (sites Bottom) steps:3)))}) (play (if (is Mover P1) (do (forEach Site (sites From (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (remember Value "From" (site))) next:(forEach Piece) (then (and (if (!= 0 (count Sites in:(sites (values Remembered "From")))) (if (= 1 (count Steps (last From) (last To))) (and (forEach Site (sites (values Remembered "From")) (remove (site))) (if (is In (last From) (sites (values Remembered "From"))) (remove (last To)))))) (forget Value All)))) (forEach Piece))) (end {(if (no Pieces P2) (result P1 Win)) (if (or (or (no Pieces P1) (no Moves P1)) (all Sites (expand (sites Top) steps:2) if:(= (who at:(site)) P2))) (result P2 Win))}))) ### MID: (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))))))
### 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) (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)))))) ### SUF: ) (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: (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)))))
### 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 (flip (between)) (custodial (from (between)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (mover)) (= 1 ### SUF: )) (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: (state at:(between))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 8) {(track "Track1" "0,E,N1,W,N1,E,S1,W" loop:True P1) (track "Track2" "23,W,S1,E,S1,W,N1,E" loop:True P2)}) (dice d:2 from:0 num:4) (piece "PIECE_ALPHA" Each (if (and {(if (!= 0 (state at:(from))) True (= 1 (count Pips)))}) (if (and (not (is Friend (who at:(trackSite Move steps:(count Pips))))) (if (not (is In (from) (sites Mover "Home"))) True (if (is In (trackSite Move steps:(count Pips)) (sites Mover "Home")) True (= (count Pieces Mover in:(difference (sites Board) (sites Mover "Home"))) 0)))) (move (from) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to)))) (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (count Pips))) (set State at:(last To) 1))))))) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (roll) next:(if (= 1 (count Pips)) (priority {(forEach Piece (if (and {(if (!= 0 (state at:(from))) True (= 1 (count Pips))) (is In (from) (sites Mover "Home"))}) (if (and (not (is Friend (who at:(trackSite Move steps:(count Pips))))) (if (not (is In (from) (sites Mover "Home"))) True ### SUF: )) (move (from) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to)))) (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (count Pips))) (set State at:(last To) 1))))))) (forEach Piece)}) (forEach Piece)) (then (if (= 1 (count Pips)) (moveAgain))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (if (is In (trackSite Move steps:(count Pips)) (sites Mover "Home")) True (= (count Pieces Mover in:(difference (sites Board) (sites Mover "Home"))) 0))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (rotate 180 (merge (shift 0 2 (square 5 diagonals:Alternating)) (wedge 3))) edges:{{27 29} {29 25}}) 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 ### SUF: ))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (union (expand (sites Bottom) steps:1) (sites {"A3" "E3"}))) (place "PIECE_ALPHA1" coord:"C7")}) (play (forEach Piece)) (end {(if (no Moves Next) (result Next Loss)) (if (<= (count Pieces P2) 6) (result P2 Loss))}))) ### MID: (to if:(is Empty (to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10)) (piece "PIECE_ALPHA" Each (or {(move Step Diagonal (to if:(is Empty (to)))) (move Slide Orthogonal (between (exact 2))) (move Hop (from) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from ### SUF: ) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain)))) (do (move Hop (from) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1)) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain))))})) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 4 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (or {(move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1)) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain)))) (move Pass)}) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (scale 2 (square 5 diagonals:Alternating)) (shift 2 8 (rotate 180 (wedge 3)))) use:Vertex) (piece "PIECE_ALPHA" P1 ### SUF: ) (piece "PIECE_BETA" P2 (move Step (to if:(and (not (is In (to) (expand (sites Top)))) (is Empty (to)))) (then (custodial (from (last To)) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))}) (rules (start {(place "PIECE_ALPHA1" (ahead (centrePoint) S)) (place "PIECE_BETA2" (difference (sites Outer) (expand (sites Top))))}) (play (forEach Piece)) (end {(if (no Pieces P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win)) (if (and {(is In (where "PIECE_ALPHA" P1) (expand (sites Top))) (>= (count Pieces P2) 2) (= (who at:(coord "D5")) P2)}) (result P2 Win))}))) ### MID: (move Step (to if:(is Empty (to))) (then (intervene (from (last To)) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))))
### PRE: (game "GAME_NAME" ### SUF: (equipment {(board (dual (remove (hex 4 5) cells:{0 1 15 20 25 32 36 39 44})) use:Vertex) (piece "PIECE_ALPHA" Each (move Slide))}) (rules (start (set Score Each 0)) (play (or {(move Add (piece (mover)) (to (difference (sites Empty) (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to)))))) (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom"))))) Mover) (if (and (not (is Prev Next)) (< 0 (counter))) (move Pass))} (then (if (is Prev Next) (moveAgain) (and (set Score Mover (+ (size Array (array (sites From (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom"))))) Mover)))) (count Sites in:(difference (sites (results from:(sites Occupied by:Mover) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))) (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))))))) (set Score Next (+ (size Array (array (sites From (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom"))))) Next)))) (count Sites in:(difference (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))) (sites (results from:(sites Occupied by:Mover) to:(sites LineOfSight Empty at:(from) Orthogonal) (to)))))))))))) (end (if (and (is Prev Mover) (no Moves Next)) (result Mover Win))))) ### MID: (players 2)
### 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 ### SUF: ) 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: (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))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (move Slide Orthogonal (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from ### SUF: ) (to (difference (sites Board) (centrePoint)) if:(is Empty (to))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Capture")) (phase "Capture" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (handSite Mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (dual (remove (hex 4 5) cells:{0 1 15 20 25 32 36 39 44})) use:Vertex) (piece "PIECE_ALPHA" Each (move Slide))}) (rules (start (set Score Each 0)) (play (or {(move Add (piece (mover)) (to (difference (sites Empty) (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to)))))) (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom"))))) Mover) ### SUF: } (then (if (is Prev Next) (moveAgain) (and (set Score Mover (+ (size Array (array (sites From (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom"))))) Mover)))) (count Sites in:(difference (sites (results from:(sites Occupied by:Mover) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))) (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))))))) (set Score Next (+ (size Array (array (sites From (forEach Piece (do (and (set Var "LoSFrom" (count Pieces Next in:(sites LineOfSight Piece at:(from) Orthogonal))) (set Var "QtyAroundFrom" (count Pieces Next in:(sites Around (from) Orthogonal)))) next:(move Slide Orthogonal) ifAfterwards:(or (> (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (and (= (count Pieces Next in:(sites Around (last To) Orthogonal)) (var "QtyAroundFrom")) (> (count Pieces Next in:(sites LineOfSight Piece at:(last To) Orthogonal)) (var "LoSFrom"))))) Next)))) (count Sites in:(difference (sites (results from:(sites Occupied by:Next) to:(sites LineOfSight Empty at:(from) Orthogonal) (to))) (sites (results from:(sites Occupied by:Mover) to:(sites LineOfSight Empty at:(from) Orthogonal) (to)))))))))))) (end (if (and (is Prev Mover) (no Moves Next)) (result Mover Win))))) ### MID: (if (and (not (is Prev Next)) (< 0 (counter))) (move Pass))
### 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 (forEach Piece top:True (then (if (not (all DiceUsed)) (moveAgain)))))))) (end {(if (no Pieces Mover) ### SUF: ) (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: (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))})
### 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 if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))})) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (difference (expand (sites Centre)) (centrePoint))) (place "PIECE_BETA2" (handSite P2) count:16) (place "PIECE_ALPHA1" (handSite P1) count:2)}) phases:{(phase "PlacementFirstTiger" P1 (play (move (from (handSite P1)) (to (sites Empty)) (then (moveAgain)))) (nextPhase Mover "RemoveHuman")) (phase "RemoveHuman" P1 (play (move Remove (intersection (sites Board) (sites Occupied by:Next)) (then (moveAgain)))) (nextPhase Mover "PlacementSecondTiger")) (phase "PlacementSecondTiger" P1 (play (move (from (handSite P1)) (to (sites Empty)))) (nextPhase Mover "Movement")) (phase "PlacementHuman" P2 (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at: ### SUF: ))) "Movement")) (phase "Movement" (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))})) ### MID: (site)
### 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:(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) ### SUF: )))) (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: (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))
### 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)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (sites {"C6" "E6"})) (place "PIECE_ALPHA2" (union (expand (union (sites Right) (sites Left))) (expand (sites Bottom) steps:3)))}) (play ### SUF: ) (end {(if (no Pieces P2) (result P1 Win)) (if (or (or (no Pieces P1) (no Moves P1)) (all Sites (expand (sites Top) steps:2) if:(= (who at:(site)) P2))) (result P2 Win))}))) ### MID: (if (is Mover P1) (do (forEach Site (sites From (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (remember Value "From" (site))) next:(forEach Piece) (then (and (if (!= 0 (count Sites in:(sites (values Remembered "From")))) (if (= 1 (count Steps (last From) (last To))) (and (forEach Site (sites (values Remembered "From")) (remove (site))) (if (is In (last From) (sites (values Remembered "From"))) (remove (last To)))))) (forget Value All)))) (forEach Piece))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (if (= 3 (count Pieces Mover)) (move (from (from)) (to (sites Empty))) (move Step (to if:(is Empty (to)))) (then (if (is Line 3 Orthogonal) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) ### SUF: } (end (forEach NonMover if:(= 2 (count Pieces Player)) (result Player Loss))))) ### MID: (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))))
### 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: ### SUF: ))) (sites {(last To)}))) (then (and {(push (from (last To)) W) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Bottom) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) N) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})))}) (move Select (from (sites Outer) if:(or (is Mover (who at:(from))) (= (who at:(from)) 0))) (then (and (fromTo (from (last To)) (to (handSite (mover)))) (moveAgain)))))) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (scale 1.4 1 (remove (scale 1 2 (wedge 5 6)) edges:{{0 1} {0 6}} vertices:{24 19})) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (or {(move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))) (move Hop (between (exact 3) if:(and (!= (row of:(between)) (row of:(from))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Hop (between (exact 4) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))})) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:5) (place "PIECE_BETA2" (handSite P2) count:15)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)) (end {(if ### SUF: (result Next Loss)) (if (no Pieces P2) (result P2 Win))}))})) ### MID: (no Moves Next)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (scale 1 2 (wedge 4)) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if: ### SUF: )))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:1) (place "PIECE_BETA2" (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)) (if (<= (count Pieces P2) 3) (result P2 Loss))}))})) ### MID: (is Empty (to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (hand Each size:2) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (regions "HomeP1" P1 (difference (expand (sites Bottom) steps:1) (union (sites Side E) (sites Side W)))) (regions "HomeP2" P2 (difference (expand (sites Top) steps:1) (union (sites Side E) (sites Side W)))) (regions "EscapeP1" P1 {30 35}) (regions "EscapeP2" P2 {0 5}) (map "Where" {(pair (id "PIECE_ALPHA" P1) (handSite P1)) (pair (id "PIECE_BETA" P1) (handSite P1 1)) (pair (id "PIECE_ALPHA" P2) (handSite P2)) (pair (id "PIECE_BETA" P2) (handSite P2 1))})}) (rules (start {(place "PIECE_ALPHA1" 36 count:4) (place "PIECE_BETA1" 37 count:4) (set Hidden (sites Hand P1) to:P2) (place "PIECE_ALPHA2" 38 count:4) (place "PIECE_BETA2" 39 count:4) (set Hidden (sites Hand P2) to:P1)}) phases:{(phase "Placement" (play (move (from (sites Occupied by:Mover container:(mover))) (to (forEach (sites Mover "Home") if:(is Empty (site)))) (then (if (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) (and {(set Hidden (sites P2 "Home") False to:P1) (set Hidden (sites P1 "Home") False to:P2) (set Hidden What (sites P2 "Home") to:P1) (set Hidden What (sites P1 "Home") to:P2)}))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece {"PIECE_ALPHA" "PIECE_BETA"} (or (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (add (piece (what at:(to))) (to (mapEntry "Where" (what at:(to))))))))) (move Select (from (intersection (sites Occupied by:Mover component:"PIECE_ALPHA") (sites Mover "Escape"))) (then (trigger "Escaped" (mover))))))) (end { ### SUF: (if (or (no Pieces Next "PIECE_BETA" in:(sites Board)) (no Pieces Mover "PIECE_ALPHA" in:(sites Board))) (result Mover Loss))}))})) ### MID: (if (or {(no Pieces Mover "PIECE_BETA" in:(sites Board)) (no Pieces Next "PIECE_ALPHA" in:(sites Board)) (is Triggered "Escaped" Mover)}) (result Mover Win))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 12) {(track "Track1" "0,E,N1,W,N1,E,N1,W,N1,E" P1 directed:True) (track "Track2" "59,W,S1,E,S1,W,S1,E,S1,W" P2 directed:True)} use:Vertex) (dice d:2 from:0 num:6) (piece "PIECE_ALPHA" Each (if (not (is Friend (who at:(trackSite Move steps:(mapEntry (var)))))) (move (from) (to (trackSite Move steps:(mapEntry ### SUF: )) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (map {(pair 0 10) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 1) (pair 6 10)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (roll) next:(if (or (= (value Player Mover) 1) (is In (count Pips) (sites {0 1 5 6}))) (do (set Var (count Pips)) next:(forEach Piece (then (if (not (= (value Player Mover) 1)) (set Value Mover 1)))))))) (end (if (<= (count Pieces Next) 2) (result Next Loss))))) ### MID: (var)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) (shift 0 6 (rectangle 1 6)) (shift 7 6 (rectangle 1 6))}) {(track "Track1" {24 0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12} P1 directed:True) (track "Track2" {25 0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12} P2 directed:True)} use:Vertex) (dice d:6 num:3) (hand Each) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (if (or (not (is Enemy (who at:(trackSite Move steps:(pips))))) (= 1 (size Stack at:(trackSite Move steps:(pips))))) (move (from) (to (trackSite Move steps:(pips)) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to))))))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 5 count:15) (place Stack "PIECE_ALPHA2" 4 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(or (forEach Piece top:True) (forEach Piece container:(mover) top:True) (then (if (or ### SUF: (not (all DiceUsed))) (moveAgain) (if (and (all DiceUsed) (= (value Player Mover) 1)) (set Value Mover -1))))))) (end {(if (no Pieces Mover) (result Mover Win)) (if (and (no Moves P1) (no Moves P2)) (result Mover Draw))}))) ### MID: (= (value Player Mover) -1)
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (concentric {4 4 4 4 4 4 4 4}) {(track "Track1" {28 24 20 16 12 8 4 0} P1 directed:True) (track "Track2" {29 25 21 17 13 9 5 1} P2 directed:True) (track "Track3" {30 26 22 18 14 10 6 2} P3 directed:True) (track "Track4" {31 27 23 19 15 11 7 3} P4 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Shared) (hand Each size:2)}) (rules (start {(place "PIECE_ALPHA1" 28) (place "PIECE_ALPHA2" 29) (place "PIECE_ALPHA3" 30) (place "PIECE_ALPHA4" 31)}) phases:{(phase "Hiding" (play (move Add (piece ### SUF: ) (to Cell (sites Hand Mover)) (then (set Hidden Cell at:(last To) to:Next)))) (nextPhase "Guessing")) (phase "Guessing" (play (move Select (from Cell (sites Hand Prev)) (then (and (if (is Empty (last To)) (and (fromTo (from (where "PIECE_ALPHA" Prev)) (to (if (is Prev P1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track1" steps:1) (if (is Prev P2) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track2" steps:1) (if (is Prev P3) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track3" steps:1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track4" steps:1)))))) (if (not (is In (if (is Prev P1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track1" steps:1) (if (is Prev P2) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track2" steps:1) (if (is Prev P3) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track3" steps:1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track4" steps:1)))) (sites Centre))) (set NextPlayer (player (prev))))) (and {(moveAgain) (fromTo (from (where "PIECE_ALPHA" Mover)) (to (trackSite Move from:(where "PIECE_ALPHA" Mover) steps:1)))})) (remove Cell (sites Hand Prev)))))) (nextPhase "Hiding"))} (end (if (!= (- (count Players) (count Active)) (count Sites in:(forEach (sites Centre) if:(is Occupied (site))))) {(if (and (is Active P1) (is In (where "PIECE_ALPHA" P1) (sites Centre))) (result P1 Win)) (if (and (is Active P2) (is In (where "PIECE_ALPHA" P2) (sites Centre))) (result P2 Win)) (if (and (is Active P3) (is In (where "PIECE_ALPHA" P3) (sites Centre))) (result P3 Win)) (if (and (is Active P4) (is In (where "PIECE_ALPHA" P4) (sites Centre))) (result P4 Win))})))) ### MID: (id "PIECE_BETA" Shared)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) (shift 0 6 (rectangle 1 6)) (shift 7 6 (rectangle 1 6))}) {(track "Track1" {24 23 22 21 20 19 18 -2} P1 directed:True) (track "Track2" {25 23 22 21 20 19 18 -2} P2 directed:True)} use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (or (forEach Die replayDouble:True if:(!= (pips) 0) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next)))))) (then (if (not (all DiceUsed)) (moveAgain)))) (if (is Empty (handSite Mover)) (forEach Die replayDouble:True if:(and (!= (pips) 0) (= (trackSite Move from:(from) steps:(pips)) -2)) (move Remove (from)) (then (if (not (all DiceUsed)) (moveAgain))))))) (hand Each)}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:15) (place Stack "PIECE_ALPHA2" (handSite P2) count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end ### SUF: ))) ### MID: (if (no Pieces Mover) (result Mover Win))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Step Orthogonal (to if: ### SUF: )) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (hand Each) (regions "AllSites" (sites Board))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) (play (if (is Pending) (move (from (handSite Mover)) (to (sites Empty))) (or (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (set Pending)))) (forEach Piece)))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (is Empty (to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom) steps:(- (/ 8 2) 2))) (place "PIECE_ALPHA2" (expand (sites Top) steps:(- (/ 8 2) 2)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before: ### SUF: 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 Forwards) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (count Rows)
### 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))))))) (piece "PIECE_BETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each ### SUF: ) (piece "PIECE_DELTA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ZETA" 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")) (and (promote (last To) (piece "PIECE_BETA") Mover) (fromTo (from (last To)) (to (last From)))))))) (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"}) (place "PIECE_GAMMA1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1") (place "PIECE_EPSILON2" {"A8" "H8"}) (place "PIECE_GAMMA2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8")}) (play (if (can Move (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover)))) (move Remove (difference (sites Occupied by:Next) (sites Occupied by:Next component:"PIECE_ALPHA"))))) (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 {(no Pieces Next "PIECE_BETA") (no Pieces Next "PIECE_GAMMA") (no Pieces Next "PIECE_DELTA") (no Pieces Next "PIECE_EPSILON")}) (result Mover Win))}))) ### MID: (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))
### PRE: (game "GAME_NAME" ### SUF: (equipment {(board (rectangle 5 10)) (hand Each) (piece "PIECE_ALPHA" Each (or {(move Step (to if:(is Empty (to))) (then (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain))))) (move Select (from) (to (intersection (sites Occupied by:Enemy container:"Board") (sites Distance from:(from) (range 1 (state at:(from)))))) (then (and (if (= (value Piece at:(last To)) 1) (remove (last To)) (set Value at:(last To) (- (value Piece at:(last To)) 1))) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain)))))) (move Select (from) (to (intersection (sites Occupied by:Enemy container:"Board") (sites Distance from:(from) (range 1 (state at:(from)))))) (then (and (addScore (player (who at:(last To))) 1) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain)))))) (move Select (from) (to) (then (and (if (< (state at:(last To)) 100) (set State at:(last To) (+ 1 (state at:(last To))))) (if (> (score Mover) 1) (and (addScore Mover -1) (moveAgain))))))}) maxState:100)}) (rules (meta (passEnd NoEnd)) (start {(set Score Each 1) (place "PIECE_ALPHA1" (handSite P1) state:2 value:3) (place "PIECE_ALPHA2" (handSite P2) state:2 value:3)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (or (forEach Piece) (move Pass (then (addScore Mover 1))))))} (end (forEach NonMover if:(no Pieces Player) (result Player Loss))))) ### MID: (players 2)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 3)) (piece "PIECE_ALPHA1" Each) (piece "PIECE_ALPHA2" Each) (piece "PIECE_ALPHA3" Each) (hand Each size:3)}) (rules (start {(place Stack "PIECE_ALPHA11" (handSite P1) count:3) (place Stack "PIECE_ALPHA12" (handSite P2) count:3) (place Stack "PIECE_ALPHA21" (handSite P1 1) count:3) (place Stack "PIECE_ALPHA22" (handSite P2 1) count:3) (place Stack "PIECE_ALPHA31" (handSite P1 2) count:3) (place Stack "PIECE_ALPHA32" (handSite P2 2) count:3)}) (play (or (move (from (sites Hand Mover)) (to (sites Board) if:(and (!= ### SUF: (to)) (or (is Empty (to)) (< (- (what at:(from) level:(topLevel at:(from))) (who at:(from) level:(topLevel at:(from)))) (- (what at:(to) level:(topLevel at:(to))) (who at:(to) level:(topLevel at:(to))))))))) (move (from (sites Occupied by:Mover top:True)) (to (sites Board) if:(and (!= (from) (to)) (or (is Empty (to)) (< (- (what at:(from) level:(topLevel at:(from))) (who at:(from) level:(topLevel at:(from)))) (- (what at:(to) level:(topLevel at:(to))) (who at:(to) level:(topLevel at:(to))))))))))) (end (forEach Player if:(is Line 3 Player top:True) (result Player Win))))) ### MID: (from)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {7 8 9 10 11 12} P1 directed:True) (track "Track2" {18 17 16 15 14 13} P2 directed:True)} use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (move (from) (to (trackSite Move steps:(pips))))))) (map "StartTrack" {(pair P1 7) (pair P2 18)})}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {7 8 9 10 11 12}) count:2) (place Stack "PIECE_ALPHA2" (sites {13 14 15 16 17 18}) count:2)}) phases:{(phase "UnStacking" (play (do (if (or (is Pending) (not (is Prev Mover))) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 0) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 1)) (if (not (all DiceUsed)) (moveAgain))))))) (then (if (all DiceEqual) (and (set Pending) (moveAgain)))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(site)) 0))) "Stacking")) (phase "Stacking" (play (do (if (or (is Pending) (not (is Prev Mover))) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 1) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 0)) (if (not (all DiceUsed)) (moveAgain))))))) (then (if (all DiceEqual) (and (set Pending) (moveAgain)))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at: ### SUF: ) 1))) "BearingOff")) (phase "BearingOff" (play (do (if (or (all DiceEqual) (not (is Prev Mover))) (roll)) next:(forEach Piece top:True) (then (if (or (not (all DiceUsed)) (all DiceEqual)) (moveAgain))))) (end (if (no Pieces Mover) (result Mover Win))))})) ### MID: (site)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,23,E,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23" loop:True P1) (track "Track2" "47,W,S1,E,S1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24" loop:True P2)} use:Vertex) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "PIECE_BETA" P2 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= ### SUF: 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (map "ThrowDiceValue" {(pair 0 6) (pair 1 5) (pair 2 0) (pair 3 3) (pair 4 0) (pair 5 5) (pair 6 6)}) (map "Sir" {(pair 1 1) (pair 2 5)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_BETA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain)))) (move Pass (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (state at:(last To))
### PRE: (game "GAME_NAME" (players {(player N) (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 ### SUF: (result Mover Win))))) ### MID: (or (is In (last To) (sites Mover)) (no Pieces Next))
### 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 (to) (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 ### SUF: (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: (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1")) (apply (remove (between))))
### 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) ### SUF: } use:Vertex) (dice d:6 num:3) (piece "PIECE_ALPHA" Each (or (forEach Die combined:True if:(and (!= (pips) 0) (<= 0 (trackSite Move from:(from) steps:(pips)))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next)))))) (then (if (not (all DiceUsed)) (moveAgain)))) (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "LastQuadrant"))) (forEach Die combined:True if:(and (!= (pips) 0) (= (trackSite Move from:(from) steps:(pips)) -2)) (move Remove (from)) (then (if (not (all DiceUsed)) (moveAgain))))))) (regions "FirstQuadrant" P1 (sites {0 1 2 3 4 5})) (regions "FirstQuadrant" P2 (sites {12 13 14 15 16 17})) (regions "LastQuadrant" P1 (sites {12 13 14 15 16 17})) (regions "LastQuadrant" P2 (sites {0 1 2 3 4 5})) (map "StartTrack" {(pair P1 0) (pair P2 12)}) (hand Each)}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:15) (place Stack "PIECE_ALPHA2" (handSite P2) count:15)}) (play (max Moves (do (if (not (is Prev Mover)) (roll)) next:(if (is Occupied (handSite Mover)) (forEach Die combined:True if:(and (!= (pips) 0) (is In (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1)) (sites Mover "FirstQuadrant"))) (move (from (handSite Mover)) (to (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))))) (then (if (not (all DiceUsed)) (moveAgain)))) (forEach Piece top:True))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (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)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each ### SUF: ) (piece "PIECE_BETA" Each (or (move Slide) (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (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 (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (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)))) (do (move Hop Orthogonal (between before:1 after:2 if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 0)))} (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (hand Each) (piece "PIECE_ALPHA" Each (if (is Line 4 Orthogonal through:(from) exact:True) (move Step Orthogonal (to if:(is Empty (to))) (then (and {(if (and (!= (last From) (ahead (last From) N)) (= (mover) (who at:(ahead (last From) N)))) (if (is Line 3 Orthogonal through:(ahead (last From) N) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) S)) (= (mover) (who at:(ahead (last From) S)))) (if (is Line 3 Orthogonal through:(ahead (last From) S) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) E)) (= (mover) (who at:(ahead (last From) E)))) (if (is Line 3 Orthogonal through:(ahead (last From) E) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) W)) (= (mover) (who at:(ahead (last From) W)))) (if (is Line 3 Orthogonal through:(ahead (last From) W) exact:True) (and (moveAgain) (addScore Mover 1))))}))) (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (and (moveAgain) (addScore Mover 1)))))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "PlacementCenter" (play (move (from (handSite Mover)) (to (forEach (sites Centre) if:(is Empty (site)))))) (nextPhase (= (count Moves) 4) "Placement")) (phase "Placement" (play (if (!= 0 (score Mover)) (move Remove (sites Occupied by:Next container:"Board") (then (and (set Score Mover ### SUF: ) (if (< 1 (score Mover)) (moveAgain))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal exact:True) (and (moveAgain) (addScore Mover 1))))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (!= 0 (score Mover)) (move Remove (sites Occupied by:Next container:"Board") (then (and (set Score Mover (- (score Mover) 1)) (if (< 1 (score Mover)) (moveAgain))))) (forEach Piece))) (end (if (<= (count Pieces Next) 2) (result Next Loss))))})) ### MID: (- (score Mover) 1)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (forEach Site (sites Around (last To)) (if (is Enemy (who at:(site))) (and (remove (site)) ### SUF: ))))))}) (rules (start {(place "PIECE_ALPHA1" (sites Phase 1)) (place "PIECE_ALPHA2" (sites Phase 0))}) (play (forEach Piece)) (end (if (no Moves Next) (byScore {(score P1 (count Pieces P1)) (score P2 (count Pieces P2))}))))) ### MID: (add (piece (id "PIECE_ALPHA" Mover)) (to (site)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 6 10) {(track "Track1" "0,E,N1,W,N1,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "59,W,S1,E,S1,W,S1,E,S1,W,S1,E" P2 directed:True)}) (piece "PIECE_ALPHA" Each (if (= (state at:(from)) 1) (or (if (!= (trackSite Move steps:(mapEntry (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1)))))))) (if (!= (trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))) -1) (if (is Enemy (who at:(trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))))) (move (from) (to (trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) (then (set Value Mover 0)))))))) (dice d:2 from:0 num:3) (map {(pair 1 1) (pair 2 2) (pair 3 4) (pair 0 6)})}) (rules (start {(place "PIECE_ALPHA1" (union (intersection (sites Bottom) ### SUF: ) (intersection (sites Bottom) (expand (sites Right) steps:2)))) (place "PIECE_ALPHA2" (union (intersection (sites Top) (expand (sites Left) steps:2)) (intersection (sites Top) (expand (sites Right) steps:2))))}) (play (do (roll) next:(if (= (mapEntry (count Pips)) 1) (or (move Pass (then (and (if (> (value Player Mover) 0) (set Value Mover (+ 1 (value Player Mover))) (set Value Mover 1)) (moveAgain)))) (move Select (from (sites Occupied by:Mover) if:(= (state at:(from)) 0)) (then (and (set State at:(last From) 1) (moveAgain))))) (if (= (mapEntry (count Pips)) 2) (forEach Piece) (forEach Piece (then (moveAgain))))))) (end (if (and (= (count Sites in:(difference (sites Occupied by:P1) (sites Top))) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites Bottom))) 0)) (byScore))))) ### MID: (expand (sites Left) steps:2)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_GAMMA2" coord:"E8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) ### SUF: (if (no Moves Next) (result Mover Win))}))) ### MID: (if (= (count Pieces Next) 1) (result Mover Win))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 5) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (directions {Rightward Leftward Forwards} of:All) (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 {Rightward Leftward Forwards} of:All) (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 All (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 All (then (set Value Mover 1))))) (regions P1 (intersection (sites Corners) (sites Bottom))) (regions P2 (intersection (sites Corners) (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 ### SUF: (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 All (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: (directions {Rightward Leftward Forwards} of:All)
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (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)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (board (square 8))
### PRE: (game "GAME_NAME" (players 2) (equipment {(boardless Hexagonal) (tile "Hex" Each numSides:6) (tile "SecondHex" Each numSides:6) (hand Each size:2)}) (rules (start {(place "Hex1" (centrePoint)) (place "Hex2" (ahead (centrePoint) E)) (place "Hex1" (handSite P1 0)) (place "Hex2" (handSite P2 0)) (place "SecondHex1" (handSite P1 1)) (place "SecondHex2" (handSite P2 1))}) (play (move (from (sites Hand Mover)) (to (sites Playable) if:(and (<= 2 (count Sites in:(sites Around (to) NotEmpty))) (not (is In (what at:(from)) (results from:(last From) to:(sites Around (to)) (what at:(to))))))) copy:True)) (end (if (and (is Line 4 whats:{(id "Hex" P1) (id "Hex" P2) (id "SecondHex" P1) (id "SecondHex" P2)}) (or {(and {(is Occupied (ahead (last To) steps:1 W)) (is Occupied (ahead (last To) steps:2 W)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 W)))}) (and {(is Occupied (ahead (last To) steps:1 E)) (is Occupied (ahead (last To) steps:2 E)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 E)))}) (and {(is Occupied (ahead ### SUF: steps:1 NNW)) (is Occupied (ahead (last To) steps:2 NNW)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 NNW)))}) (and {(is Occupied (ahead (last To) steps:1 SSW)) (is Occupied (ahead (last To) steps:2 SSW)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 SSW)))}) (and {(is Occupied (ahead (last To) steps:1 SSE)) (is Occupied (ahead (last To) steps:2 SSE)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 SSE)))}) (and {(is Occupied (ahead (last To) steps:1 NNE)) (is Occupied (ahead (last To) steps:2 NNE)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 NNE)))})})) (result Mover Win))))) ### MID: (last To)
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 2) (equipment {(board (dual (hex Prism 7 6)) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (if (< 0 (count Sites in:(sites Occupied by:Mover))) (forEach (sites Empty) if:(and (> (count Pieces Mover in:(sites LineOfSight at:(site))) 0) (= (count Sites in:(sites Around (site) Own)) 0))) (sites Empty))))) (nextPhase (= 4 (count Moves)) "Play")) (phase "Play" (play (if (can Move (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(sites LineOfSight at:(site))) 0))))) (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(sites LineOfSight at:(site))) 0))) (then (forEach Group (if (all Sites (sites) if:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from:(site) stop:(is Occupied (to)) stopIncluded:True)) (sites))))) (remove (sites)))))) (move Pass (then (forEach Group (if (all Sites (sites) if:(= 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)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (tiling T3464 2)) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))))) (regions "HexA" P1 (sites Cell "E4")) (regions "HexB" P1 (sites Cell "I4")) (regions "HexA" P2 ### SUF: ) (regions "HexB" P2 (sites Cell "I12")) (regions "HexNeutral1" (sites Cell "C8")) (regions "HexNeutral2" (sites Cell "G8")) (regions "HexNeutral3" (sites Cell "K8"))}) (rules (start (place "PIECE_ALPHA" "Hand" count:15)) (play (if (is Prev Mover) (move (from (sites Occupied by:Next container:"Board")) (to (sites Empty) (apply if:(is Pending) (moveAgain)))) (if (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) (forEach Piece) (move (from (handSite Mover)) (to (sites Empty))) (then (forEach Site (sites Incident Cell of:Vertex at:(last To)) (if (= (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites Occupied by:Mover))) (count Sites in:(sites Incident Vertex of:Cell at:(site)))) (if (= 6 (count Sites in:(sites Incident Vertex of:Cell at:(site)))) (if (or {(= (sites Incident Vertex of:Cell at:(site)) (sites Mover "HexA")) (= (sites Incident Vertex of:Cell at:(site)) (sites Mover "HexB")) (= (sites Incident Vertex of:Cell at:(site)) (sites "HexNeutral1")) (= (sites Incident Vertex of:Cell at:(site)) (sites "HexNeutral2")) (= (sites Incident Vertex of:Cell at:(site)) (sites "HexNeutral3"))}) (trigger "Lose" Next)) (and (if (= 4 (count Sites in:(sites Incident Vertex of:Cell at:(site)))) (set Pending)) (moveAgain))))))))) (end (if (is Triggered "Lose" Next) (result Mover Win))))) ### MID: (sites Cell "E12")
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 2 diagonals:Solid) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(and {(or {(and (!= (from) (coord "A1")) (!= (from) (coord "C1"))) (and (= (from) (coord "C1")) (!= (to) (coord "A1"))) (and (= (from) (coord "A1")) (!= (to) ### SUF: ))}) (is Empty (to))}))))}) (rules (start {(place "PIECE_ALPHA1" (sites Top)) (place "PIECE_ALPHA2" (sites Bottom))}) (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))) ### MID: (coord "C1")
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Limping 5) use:Cell) (piece "PIECE_ALPHA" Each)}) (rules (start (set Score Each 0)) (play (if (was Pass) (or (move Pass) (priority (move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in: ### SUF: ))) (then (addScore Mover 1))) (forEach Piece (do (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))))) (if (<= 5 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from))))))))))))))}) ifAfterwards:(can Move (add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))))))))) (or {(move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))) (then (addScore Mover 1))) (forEach Piece (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))))) (if (<= 5 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from))))))))))))))})) (move Pass)}))) (end {(if (and (all Passed) (> (score Mover) (score Next))) (result Mover Win)) (if (and (all Passed) (<= (score Mover) (score Next))) (result Next Win))}))) ### MID: (sites LineOfSight Piece at:(to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,23,E,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23" loop:True P1) (track "Track2" "47,W,S1,E,S1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24" loop:True P2)} use:Vertex) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" ### SUF: )) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "PIECE_BETA" P2 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (map "ThrowDiceValue" {(pair 0 6) (pair 1 5) (pair 2 0) (pair 3 3) (pair 4 0) (pair 5 5) (pair 6 6)}) (map "Sir" {(pair 1 1) (pair 2 5)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_BETA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain)))) (move Pass (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (mover)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 4 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 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 ### SUF: (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (between)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy ### SUF: )) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (who at:(between))
### 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) (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 ### SUF: )) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (count Cell at:(site))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Triangle rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:8)) 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 ### SUF: ) (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 (no Pieces Next) (result Next Loss))))) ### MID: (sites Empty)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (rotate 180 (merge (shift 0 2 (square 5 diagonals:Alternating)) (wedge 3))) edges:{{27 29} {29 25}}) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) ### SUF: )) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (union (expand (sites Bottom) steps:1) (sites {"A3" "E3"}))) (place "PIECE_ALPHA1" coord:"C7")}) (play (forEach Piece)) (end {(if (no Moves Next) (result Next Loss)) (if (<= (count Pieces P2) 6) (result P2 Loss))}))) ### MID: (move Step (to if:(is Empty (to))))
### 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 (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)))))))))))}) (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)) ### SUF: ) (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: (= 0 (state at:(between)))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 9 9 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Step (to if:(is Empty (to)))) (move Hop ### SUF: (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union (expand (sites Bottom) steps:1) (expand origin:(coord "I3") steps:5 W))) (place "PIECE_ALPHA2" (union (expand (sites Top) steps:1) (expand origin:(coord "A7") steps:5 E)))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (between if:(is Enemy (who at:(between))) (apply (remove (between))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(repeat 1 1 step:{{0.5 0} {1 0}} (poly {{-0.5 0} {0.5 0} {0 0.5}})) (repeat 1 1 step:{{0.5 0} {1 0}} (poly {{-0.5 0} {0.5 0} {0 -0.5}})) (repeat 15 1 step:{{0.5 0} {1 0}} (poly {{0.5 0} {0 0.5} {1 0.5}})) (repeat 15 1 step:{{0.5 0} {1 0}} (poly {{0.5 0} {0 -0.5} {1 -0.5}})) (shift 0.5 0 (rectangle 1 15))}) 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" (difference (union (sites Bottom) (sites Direction from:(centrePoint) W)) (coord "A2"))) (place "PIECE_ALPHA2" (union ### SUF: (sites Top)))}) (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))) ### MID: (sites Direction from:(centrePoint) E)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove ### SUF: ))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))}) (rules (start {(place "PIECE_ALPHA1" (union (expand (sites Bottom)) (sites {"A3"}))) (place "PIECE_ALPHA2" (union (expand (sites Top)) (sites {"E3"})))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (between)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (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:(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 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))))) ### SUF: ))))})) (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: (moveAgain)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if: ### SUF: ))) (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) (sites {13 14})})) (place "PIECE_ALPHA2" (union {(sites Row 5) (sites Row 6) (sites Row 7) (sites Row 8) (sites {10 11})}))}) (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: (is Empty (to))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Hop (directions {N S}) (between ### SUF: if:(not (is Enemy (who at:(between))))) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Hop (directions {W E}) (between (exact (- (count Sites in:(difference (sites Row (row of:(from))) (sites Empty))) 1)) if:(not (is Enemy (who at:(between))))) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Hop (directions {NE SW}) (between (exact (- (count Sites in:(difference (sites Direction from:(from) (directions {NE SW}) included:True) (sites Empty))) 1)) if:(not (is Enemy (who at:(between))))) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Hop (directions {NW SE}) (between (exact (- (count Sites in:(difference (sites Direction from:(from) (directions {NW SE}) included:True) (sites Empty))) 1)) if:(not (is Enemy (who at:(between))))) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))}))}) (rules (start {(place "PIECE_ALPHA1" (difference (union (sites Top) (sites Bottom)) (sites Corners))) (place "PIECE_ALPHA2" (difference (union (sites Right) (sites Left)) (sites Corners)))}) (play (forEach Piece)) (end {(if (and (= 1 (count Groups if:(= (who at:(to)) P1))) (= 1 (count Groups if:(= (who at:(to)) P2)))) (result Mover Draw)) (if (= 1 (count Groups if:(= (who at:(to)) P1))) (result P1 Win)) (if (= 1 (count Groups if:(= (who at:(to)) P2))) (result P2 Win))}))) ### MID: (exact (- (count Sites in:(difference (sites Column (column of:(from))) (sites Empty))) 1))
### 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 ### SUF: ) (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 (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))})) (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: (is Prev Mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (hand Each) (piece "PIECE_ALPHA" Each ### SUF: )}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (sites Around (sites Occupied by:Mover) Orthogonal))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Next)) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 2 Orthogonal) (moveAgain))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each (move Slide Orthogonal)) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:24)) phases:{(phase "Placement" (play (move (from (handSite Mover)) ### SUF: (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Move")) (phase "Move" (play (forEach Piece)))} (end (if (is Line 7) (result Mover Win))))) ### MID: (to (difference (sites Board) (centrePoint)) if:(is Empty (to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 3) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) ### SUF: ) ### MID: (rules (start (place "PIECE_ALPHA" "Hand" count:3)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (is Line 3) (result Mover Win))))
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 2) (equipment {(board (merge {(shift 2 2 (square 5 diagonals:Alternating)) (shift 2 0 (wedge 3)) (shift 5 3 (rotate 90 (wedge 3))) (shift 2 6 (rotate 180 (wedge 3))) (shift -1 3 (rotate 270 (wedge 3)))}) use:Vertex) (hand Each) (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))))))}) (rules (start {(place "PIECE_ALPHA2" (handSite P2) count:25) (place "PIECE_BETA1" (sites Centre)) (place "PIECE_BETA1" (handSite P1))}) phases:{(phase "Opening" (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))})))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Triangle 13)) (piece "PIECE_ALPHA" Each)}) (rules (meta (swap)) phases:{ ### SUF: (phase "Play" (play (move Add (to (sites LineOfSight Empty at:(var))) (then (set Var (last To))))))} (end (if (no Moves Next) (byScore {(score P1 (+ (if (is Mover P1) 1 0) (count Sites in:(intersection (sites Around (last To)) (sites Occupied by:P1))))) (score P2 (+ (if (is Mover P2) 1 0) (count Sites in:(intersection (sites Around (last To)) (sites Occupied by:P2)))))}))))) ### MID: (phase "Opening" P1 (play (move Add (to (sites Empty)) (then (set Var (last To))))) (nextPhase))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 7 6)) (hand Each) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:18)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (move ### SUF: (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) (move Remove (sites Occupied by:Enemy container:"Board")) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (from (handSite Mover))
### PRE: (game "GAME_NAME" (players {(player S) (player N)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 (or ### SUF: (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "PIECE_BETA") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "PIECE_GAMMA" P1 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" P1 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" P1 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ZETA" P1 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" P1 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" P2 (or (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites Around (where "King-noCross" Next))))) (apply (remove (to))))) (move Slide (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites Around (where "King-noCross" Next)))) (remove (to))))))) (regions "Promotion" P1 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 6)) (place "PIECE_GAMMA1" {"A8" "H8"}) (place "PIECE_ZETA1" {"B8" "G8"}) (place "PIECE_EPSILON1" {"C8" "F8"}) (place "PIECE_BETA1" coord:"E8") (place "PIECE_DELTA1" coord:"D8") (place "PIECE_DELTA2" coord:"E1")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Mover))))) (end (if (and (is Threatened (id "PIECE_DELTA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Next))))))) (result Mover Win))))) ### MID: (move Step Forward (to if:(is Empty (to))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" P1 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) (piece "PIECE_ALPHA" P2 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and {(surround (from (last To)) Orthogonal (between if:(and {(= (between) (centrePoint)) (= (what at:(between)) (id "PIECE_BETA" P1)) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:3) (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply ### SUF: )) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))})))) (piece "PIECE_BETA" P1 (move Step (to if:(is Empty (to))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) (regions "Fortresses" (sites Corners))}) (rules (start {(place "PIECE_BETA1" (centrePoint)) (place "PIECE_ALPHA2" (sites "Fortresses")) (place "PIECE_ALPHA1" {"D3" "C4" "E5"})}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA1") in:(sites "Fortresses")) (result P1 Win)) (if (= (where "PIECE_BETA" P1) -1) (result P2 Win))}))) ### MID: (remove (between))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:2) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:2) (sites Phase 1)))}) (play (priority (forEach Piece "PIECE_ALPHA" (move (from if: ### SUF: ) (to (sites Direction from:(from) Diagonal distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))}) (apply (remember Value (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to)))))))) count:(size Stack at:(from)) stack:True (then (if (can Move (move (from (last To)) (to (sites Direction from:(from) (difference Diagonal (directions Cell from:(last To) to:(last From))) distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))})))) (moveAgain) (do (forEach Site (sites (values Remembered)) (remove (site) count:(size Stack at:(site)))) next:(and (if (or (and (is Odd (size Stack at:(last To))) (is In (last To) (sites (player (+ 1 (% (mover) 2)))))) (and (is Even (size Stack at:(last To))) (is In (last To) (sites (player (mover)))))) (add (to (last To)) stack:True)) (forget Value All)))))) top:True) (forEach Piece "PIECE_ALPHA" (move Step (from) (if (is Odd (size Stack at:(from))) (directions {FL FR}) (directions {BL BR})) (to if:(is Empty (to))) stack:True (then (if (or (and (is Odd (size Stack at:(last To))) (is In (last To) (sites (player (+ 1 (% (mover) 2)))))) (and (is Even (size Stack at:(last To))) (is In (last To) (sites (player (mover)))))) (add (to (last To)) stack:True)))) top:True))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (tiling T3464 1) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" (sites {4 5 0 1})) (place "PIECE_ALPHA1" Cell 1) (place "PIECE_ALPHA1" Edge (sites {0 3 4 9})) (place "PIECE_ALPHA2" (sites {16 17 12 13})) (place "PIECE_ALPHA2" Cell 11) (place "PIECE_ALPHA2" Edge (sites {25 29 26 20}))}) (play (if (is Prev Mover) (move (from Cell (last To)) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Cell at:(from))) if:(and (= 1 (count Sites in:(intersection {(sites Empty Edge) (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))}))) (!= (last From) (to))))) (or {(forEach Piece on:Vertex (or (move Step (from Vertex) (to if:(is Empty Vertex (to))) (then (forEach Site (intersection (sites Incident Edge of:Vertex at:(last From)) (sites Incident Edge of:Vertex at:(last To))) (if (is Enemy (who Edge at:(site))) (remove Edge (site)))))) (move (from Vertex) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Vertex at:(from))))))) (forEach Piece on:Edge (or (move Step (from Edge) (to if:(is Empty Edge (to))) (then (forEach Site (intersection (sites Incident Vertex of:Edge at:(last From)) (sites Incident Vertex of:Edge at:(last To))) (if (is Enemy (who Vertex at:(site))) (remove Vertex (site)))))) (move (from Edge) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Edge at:(from))))))) (forEach Piece on:Cell (or {(move (from Cell) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Cell at:(from)))) (then (forEach Site (intersection (sites Incident Edge of:Cell at:(last From)) (sites Incident Edge of:Cell at:(last To))) (if (is Enemy (who Edge at: ### SUF: )) (remove Edge (site)))))) (move (from Cell) (to Cell (sites Incident Cell of:Cell at:(from)) if:(and (is Enemy (who Cell at:(to))) (= 1 (count Sites in:(intersection {(sites Empty Edge) (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))})))) (apply (remove Cell (to)))) (then (moveAgain))) (move (from Cell) (to Cell (forEach (sites Empty Cell) if:(= 1 (count Sites in:(intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(site))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who Vertex at:(site))) (remove Vertex (site)))))) (move (from Cell) (to Edge (intersection (sites Empty Edge) (sites Incident Edge of:Cell at:(from))))) (move (from Cell) (to Vertex (intersection (sites Empty Vertex) (sites Incident Vertex of:Cell at:(from)))))}))}))) (end (if (>= 1 (+ {(count Pieces Vertex Next) (count Pieces Edge Next) (count Pieces Cell Next)})) (result Mover Win))))) ### MID: (site)
### 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:(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 ### SUF: )) (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: (is Threatened (id "PIECE_BETA" Mover))
### 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 (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) (union (sites Centre) (sites "Fortresses")))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_BETA" P2)) (apply (trigger "Surrounded" P2))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))})))) (piece "PIECE_ALPHA" P2 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1")) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) ### SUF: ))))))) (piece "PIECE_BETA" P2 (move Slide Orthogonal (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) (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" {"F3" "F4" "F5" "C6" "D6" "E6" "G6" "H6" "I6" "F7" "F8" "F9"}) (place "PIECE_BETA2" (centrePoint))}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA2") in:(sites Outer)) (result P2 Win)) (if (is Triggered "Surrounded" P2) (result P1 Win))}))) ### MID: (union (sites Centre) (sites "Fortresses"))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (add (merge {(rectangle 3 5) (shift 1 0 (scale 0.5 (rectangle 5 1))) (shift 3 0 (scale 0.5 (rectangle 5 1))) (shift -1 1 (rectangle 1 7))}) edges:{{0 15} {15 7} {7 18} {18 14} {17 4} {7 17} {7 16} {16 10} {19 10} {0 19} {20 14} {20 4} {12 16} {16 5} {5 15} {15 2} {2 17} {17 9} {9 18} {18 12}}) edges:{{11 6} {6 1} {13 8} {8 3}}) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step ### SUF: )) (piece "PIECE_BETA" P2 E (move Step Forwards (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" coord:"C3") (place "PIECE_BETA2" (sites {"B3" "B1" "A3" "B5"}))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win))}))) ### MID: (to if:(is Empty (to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (add (merge {(rectangle 3 5) ### SUF: (shift 3 0 (scale 0.5 (rectangle 5 1))) (shift -1 1 (rectangle 1 7))}) edges:{{0 15} {15 7} {7 18} {18 14} {17 4} {7 17} {7 16} {16 10} {19 10} {0 19} {20 14} {20 4} {12 16} {16 5} {5 15} {15 2} {2 17} {17 9} {9 18} {18 12}}) edges:{{11 6} {6 1} {13 8} {8 3}}) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 E (move Step Forwards (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" coord:"C3") (place "PIECE_BETA2" (sites {"B3" "B1" "A3" "B5"}))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win))}))) ### MID: (shift 1 0 (scale 0.5 (rectangle 5 1)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (tri Hexagon 7) use:Vertex) (piece "PIECE_ALPHA" Each) (regions "SSW" {(sites Side S) (sites Side SW)}) (regions "NNW" {(sites Side NW) (sites Side N)}) (regions "NESE" {(sites Side NE) (sites Side SE)})}) (rules (play (move Add (to (sites Empty)))) ### SUF: )) ### MID: (end (if (is Connected {(sites "SSW") (sites "NNW") (sites "NESE")}) (result Mover Win)))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "PIECE_BETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_DELTA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) ### SUF: ))) (piece "PIECE_ZETA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 2)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 0))}) (rules (start {(place "PIECE_ALPHA1" coord:"B2") (place "PIECE_GAMMA1" coord:"B1") (place "PIECE_DELTA1" coord:"A1") (place "PIECE_EPSILON1" coord:"A2") (place "PIECE_ALPHA2" coord:"F6") (place "PIECE_GAMMA2" coord:"F7") (place "PIECE_DELTA2" coord:"G7") (place "PIECE_EPSILON2" coord:"G6") (place "PIECE_ZETA1" {"A3" "B3" "C3" "C2" "C1"}) (place "PIECE_ZETA2" {"E7" "E6" "E5" "F5" "G5"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"PIECE_GAMMA" "PIECE_DELTA" "PIECE_EPSILON"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))})) ### MID: (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(shift 1 0 (rectangle 4 2)) (shift 0 1 (rectangle 2 4))}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(and (= 0 (state at:(to))) (if (< (count MovesThisTurn) 2) (is Empty (to)) (is In (to) (union (sites Occupied by:Next) (sites Empty))))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (= 2 (count Sites in:(forEach (sites Board) if:(= 1 (state at:(site)))))) (forEach Site (sites Board) (if (= 1 (state at:(site))) (set State at:(site) 0))) (and (set State at:(last From) 1) (moveAgain))))))}) ### SUF: ) ### MID: (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (if (is Prev Mover) (move Step (from (last To)) (to if:(and (= 0 (state at:(to))) (if (< (count MovesThisTurn) 2) (is Empty (to)) (is In (to) (union (sites Occupied by:Next) (sites Empty))))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (= 2 (count Sites in:(forEach (sites Board) if:(= 1 (state at:(site)))))) (forEach Site (sites Board) (if (= 1 (state at:(site))) (set State at:(site) 0))) (and (set State at:(last From) 1) (moveAgain))))) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or {(move Step (if (!= 0 (count Moves)) (difference Adjacent Backwards) Forwards) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (move Hop (difference Adjacent Backwards) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty ### SUF: )) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))})) (piece "PIECE_BETA" Each (or {(move Step Adjacent (to if:(is Empty (to)))) (move Hop Adjacent (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Hop (from (from) if:(is In (from) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True)))) Adjacent (between before:(count Rows) after:(count Rows) if:(and (is Enemy (who at:(between))) (is In (between) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True)))) (apply (remove (between)))) (to if:(and (is Empty (to)) (is In (to) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True))))))})) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (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) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty ### SUF: )))))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" P1 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) (piece "PIECE_ALPHA" P2 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and {(surround (from (last To)) Orthogonal (between if:(and {(= (between) (centrePoint)) (= (what at:(between)) (id "PIECE_BETA" P1)) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:3) (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))})))) (piece "PIECE_BETA" P1 (move Step (to if:(is Empty (to))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove ### SUF: ))) (to if:(is Friend (who at:(to))))))))) (regions "Fortresses" (sites Corners))}) (rules (start {(place "PIECE_BETA1" (centrePoint)) (place "PIECE_ALPHA2" (sites "Fortresses")) (place "PIECE_ALPHA1" {"D3" "C4" "E5"})}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA1") in:(sites "Fortresses")) (result P1 Win)) (if (= (where "PIECE_BETA" P1) -1) (result P2 Win))}))) ### MID: (between)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(rectangle 1 8) (shift -4 1.5 (rectangle 1 12)) (shift 0 3 (rectangle 1 8))}) vertices:{{-1 0.1} {-2 0.3} {-2.9 0.5} {-3.6 0.8} {-1 2.9} {-2 2.7} {-2.9 2.5} {-3.6 2.2}}) {(track "Track1" {31 30 29 28 0 1 2 3 4 5 6 7 19 18 17 16 15 14 13 12 11 10 9 8 35 34 33 32 20 21 22 23 24 25 26 27 19 18 17 16 15 14 13 12 11 10 9 8} loop:True P1) (track "Track2" {35 34 33 32 20 21 22 23 24 25 26 27 19 18 17 16 15 14 13 12 11 10 9 8 31 30 29 28 0 1 2 3 4 5 6 7 19 18 17 16 15 14 13 12 11 10 9 8} loop:True P2)} use:Vertex) (regions "AllSites" (sites Board)) (dice d:4 num:2) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 1) (and (= (state at:(from)) 0) (= 1 (pips)))) (move Slide "Track1" (between (exact (pips)) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply if:(not (is Friend (who at:(to)))) (remove (to)))) (then (if (= (state at:(last To)) 0) (set State at:(last To) 1)))))) (piece "PIECE_ALPHA" P2 (if (or (= (state at:(from)) 1) (and (= (state at:(from)) 0) (= 1 (pips)))) (move Slide "Track2" (between (exact (pips)) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) ### SUF: ) (then (if (= (state at:(last To)) 0) (set State at:(last To) 1))))))}) (rules (start {(place "PIECE_ALPHA1" (sites {0 1 2 3 4 5 6 7 28 29 30 31})) (place "PIECE_ALPHA2" (sites {20 21 22 23 24 25 26 27 32 33 34 35}))}) (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die replayDouble:(and (= (face 36) 1) (= (face 37) 1)) (forEach Piece (then (if (not (all DiceUsed)) (if (can Move (forEach Die (forEach Piece))) (moveAgain)))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (apply if:(not (is Friend (who at:(to)))) (remove (to)))
### 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:(to)))) (= 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: ### SUF: (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: (is Enemy (who at:(to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (play (do (move Add (to (sites Empty))) ifAfterwards:(<= (max (results from:(sites Occupied by:Mover) to:1 (* 1 (size Group at:(from))))) (count Groups if:(= (who at:(to)) (mover)))))) (end ### SUF: ))) ### MID: (if (no Moves Next) (result Next Loss))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (and (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))) (surround (from (last To)) Orthogonal (between if:(and (is Enemy (who at:(between))) (is In (between) (sites Corners))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) (hand Each) (regions "HalfBoard" P1 (expand (sites Bottom) steps:3)) (regions "HalfBoard" P2 (expand (sites Top) steps:3))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:13) (place "PIECE_ALPHA2" (handSite P2) count:10)}) phases:{(phase "CentrePlacing" P1 (play (move (from (handSite P1)) (to (centrePoint)))) (nextPhase "Placement")) (phase "Placement" P2 (play (if (not (all Sites (sites Hand Mover) if:(= 0 ### SUF: ))) (move (from (handSite Mover)) (to (intersection (sites Empty) (sites Mover)))) (move Pass))) (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)) (end {(if (no Moves P2) (result P1 Win)) (if (< (count Pieces P1) 2) (result P2 Win))}))})) ### MID: (count Cell at:(site))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) Diagonal (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)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (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)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty ### SUF: )))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (makeFaces (remove (square 5 diagonals:Alternating) edges:{{{0 0} {1 1}} {{1 1} {2 2}} {{2 2} {3 3}} {{3 3} {4 4}} {{4 0} {3 1}} {{3 1} {2 2}} {{2 2} {1 3}} {{1 3} {0 4}}})) use:Vertex) (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))) (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))))))}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {"B2" "D2" "B4" "D4"}) counts:{5 5 5 5}) (place "PIECE_BETA2" (sites {"C1" "C5"}))}) (play (if (is Prev Mover) (or (move Pass) (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then ### SUF: ))) (forEach Piece top:True))) (end {(if (no Moves P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win))}))) ### MID: (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 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" ### SUF: ))) (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 (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))))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (count Pips)
### 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 (move (from (intersection (expand (sites Centre)) (sites Occupied by:Next))) (to (difference (sites Empty) (expand (sites Centre)))) (then (if (< 6 (count Sites in:(intersection (expand (sites Centre)) (sites Occupied by:Next)))) (moveAgain))))) (nextPhase Mover (= 6 (count Sites in:(intersection (expand (sites Centre)) (sites Occupied by:Next)))) "Movement")) (phase "PlacementHuman" P2 (play ### SUF: ) (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 (handSite Mover)) (to (sites Empty)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(boardless Hexagonal) (tile "Hex" Each numSides:6) (tile "SecondHex" Each numSides:6) (hand Each size:2)}) (rules (start {(place "Hex1" (centrePoint)) (place "Hex2" (ahead (centrePoint) E)) (place "Hex1" (handSite P1 0)) (place "Hex2" (handSite P2 0)) (place "SecondHex1" (handSite P1 1)) (place "SecondHex2" (handSite P2 1))}) (play (move (from ### SUF: ) (to (sites Playable) if:(and (<= 2 (count Sites in:(sites Around (to) NotEmpty))) (not (is In (what at:(from)) (results from:(last From) to:(sites Around (to)) (what at:(to))))))) copy:True)) (end (if (and (is Line 4 whats:{(id "Hex" P1) (id "Hex" P2) (id "SecondHex" P1) (id "SecondHex" P2)}) (or {(and {(is Occupied (ahead (last To) steps:1 W)) (is Occupied (ahead (last To) steps:2 W)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 W)))}) (and {(is Occupied (ahead (last To) steps:1 E)) (is Occupied (ahead (last To) steps:2 E)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 E)))}) (and {(is Occupied (ahead (last To) steps:1 NNW)) (is Occupied (ahead (last To) steps:2 NNW)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 NNW)))}) (and {(is Occupied (ahead (last To) steps:1 SSW)) (is Occupied (ahead (last To) steps:2 SSW)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 SSW)))}) (and {(is Occupied (ahead (last To) steps:1 SSE)) (is Occupied (ahead (last To) steps:2 SSE)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 SSE)))}) (and {(is Occupied (ahead (last To) steps:1 NNE)) (is Occupied (ahead (last To) steps:2 NNE)) (= (what at:(last To)) (what at:(ahead (last To) steps:3 NNE)))})})) (result Mover Win))))) ### MID: (sites Hand Mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (keep (splitCrossings (merge (rotate 45 (dual (square 12 diagonals:Concentric))) (shift 3 3 (scale 6 (square 1))))) (poly {{3 3} {3 9} {9 9} {9 3}})) vertices:{{6 6}})) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (regions "Holes" (union (difference (sites Board Vertex) (sites Outer Vertex)) (sites Corners Vertex))) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)})}) (rules (meta (swap)) (play (move Add (to Vertex (sites Empty Vertex) if:(is In (to) (sites "Holes"))) (then (forEach Site (sites Incident Cell of:Vertex at:(last To)) (if (if (is In (site) (sites Centre)) ### SUF: (>= (count Sites in:(intersection (intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")) (sites Occupied by:Mover on:Vertex))) (if (is Even (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")))) (/ (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes"))) 2) (+ (/ (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes"))) 2) 1)))) (claim (piece (id "PIECE_BETA" Mover)) (to Cell (site)))) (then (forEach Site (forEach (sites Incident Cell of:Vertex at:(last To)) if:(is Mover (who Cell at:(site)))) (if (is Connected at:(site) Mover) (trigger "Connected" Mover)))))))) (end {(if (is Triggered "Connected" Mover) (result Mover Win)) (if (<= 52 (count Moves)) (result Mover Draw))}))) ### MID: (>= (+ (count Sites in:(intersection (intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")) (sites Occupied by:Mover on:Vertex))) (if (= (mover) (who Vertex at:(centrePoint Vertex))) 1 0)) 3)
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (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) (state at:(site) level:0)))))) (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: (board (square 8))
### 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 (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) ### SUF: )) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (to if:(is Empty (to)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board ### SUF: use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(or (and {(is In (from) (sites Next)) (is In (to) (sites Next)) (is Empty (to))}) (and (not (is In (from) (sites Next))) (if (not (is In (from) (sites Mover))) (is In (to) (difference (sites Empty) (sites Mover))) (is Empty (to)))))))) (regions "Home" P1 (sites {"A1" "C1" "E1"})) (regions "Home" P2 (sites {"A5" "C5" "E5"}))}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2))}) (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))) ### MID: (add (merge {(rectangle 1 3) (shift 1 1 (scale 0.5 (concentric {1 4}))) (shift 0 2 (rectangle 1 3))}) edges:{{5 1} {9 7}})