text
stringlengths
218
3.08k
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2)}) (rules (play (move Add (to (difference (sites Empty) (sites Around (sites Occupied by:Next) Orthogonal))))) (end (if (no Moves Next) (result P1 Win))))) ### MID: (board (square 8))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (graph vertices:{{0 0} {2 0} {4 0} {1 1} {2 1} {3 1} {2 2} {1 3} {2 3} {3 3} {0 4} {2 4} {4 4}} edges:{{0 1} {0 3} {1 2} {1 4} {2 5} {3 4} {3 6} {4 5} {4 6} {5 6} {6 7} {6 8} {6 9} {7 8} {7 10} {8 9} {8 11} {9 12} {10 11} {11 12}}) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (regions P1 (intersection (sites Corners) (sites Bottom))) (regions P2 (intersection (sites Corners) (sites Top)))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (or {(forEach Piece "PIECE_ALPHA" (move Hop (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)))) (forEach Piece "PIECE_ALPHA" (move Step (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)) (forEach Piece "PIECE_BETA" (move Hop (between if:(is Enemy (who at: ### SUF: )) (apply (remove (between)))) (to if:(is Empty (to)))))})) (end (if (no Moves Next) (result Next Loss))))) ### 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) (or (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or (forEach Piece "PIECE_ALPHA" (or (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (forEach Piece "PIECE_BETA" (or (move Step Diagonal (to if:(is Empty (to)))) (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from ### SUF: ) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 3 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))}) (rules ### SUF: (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))})
### 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))) ### SUF: ) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (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: (is Enemy (who at:(between)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(boardless Hexagonal) (tile "Hex" Each numSides:6)}) (rules (start {(place "Hex1" (centrePoint)) (place "Hex2" ### SUF: )}) (play (move Add (to (sites Playable) if:(<= 1 (count Sites in:(sites Around (to) NotEmpty)))))) (end {(if (is Line 4) (result Mover Win)) (if (is Line 3) (result Mover Loss))}))) ### MID: (ahead (centrePoint) E)
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 4) (equipment {(board (add (hole (merge (shift 0 (/ (- 19 3) 2) (rectangle 3 19)) (shift (/ (- 19 3) 2) 0 (rectangle 19 3))) (poly {{8 8} {8 11} {11 11} {11 8}})) cells:{{8 28 48 68 69 70 71 51 31 11 10 9}}) {(track "Track1" "96,9,S,E1,N,11,E,N,W,53,N,W,S,42,W,S,E,8,S,E1,N8" P1 directed:True) (track "Track2" "96,26,W,S,E,8,S,E,N,11,E,N,W,53,N,W,S,42,W,S1,E8" P2 directed:True) (track "Track3" "96,52,N,W,S,42,W,S,E,8,S,E,N,11,E,N,W,53,N,W1,S8" P3 directed:True) (track "Track4" "96,27,E,N,W,53,N,W,S,42,W,S,E,8,S,E,N,11,E,N1,W8" P4 directed:True)}) (hand Each) (dice d:2 from:0 num:6) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -1) (move Remove (from)) (move (from (from)) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (is In (to) (sites "SafeSites"))))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))) (map "Throw" {(pair 0 6) (pair 1 10) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 25) (pair 6 12)}) (regions "SafeSites" (sites {60 62 16 48 87 89 37 2}))}) (rules (start (place "PIECE_ALPHA" "Hand" count:4)) (play (do (roll) next:(or (forEach Piece) (if (and (is In (mapEntry "Throw" (count Pips)) (array {10 25})) (is Occupied (handSite Mover))) (move (from (handSite Mover)) (to (centrePoint) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))))) (end (if (no Pieces Mover) (result Mover Win)))))
### 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 (!= (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))))))))) (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: ### SUF: )))))))))) (end (forEach Player if:(is Line 3 Player top:True) (result Player Win))))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (concentric {1 4 12}) edges:{{6 8} {9 11} {12 14} {5 15}}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" Each (move Step (to if:(is Empty (to))))) (hand Each)}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:3) (place "PIECE_BETA2" (sites Centre))}) phases:{(phase "PlacementP1" (play (move (from (handSite P1)) (to (intersection (sites Empty) (sites {1 2 3 4}))) (then (if (not (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site))))) (moveAgain))))) (nextPhase (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) "HuntingP2")) (phase "HuntingP2" (play (forEach Piece (then (if (not (can Move (move Step (from (where "PIECE_BETA" P2)) (to if:(is Empty (to)))))) (and {(addScore P2 (- (count Moves) 3)) (remove (sites Occupied by:All container:"Board")) (add (piece "PIECE_BETA1") (to (sites Centre))) (add (piece "PIECE_ALPHA2") (to (handSite P2)) count:3)}))))) (nextPhase (= 1 (count Sites in:(sites Occupied by:All container:"Board"))) "PlacementP2")) (phase "PlacementP2" (play (move (from (handSite P2)) (to ### SUF: ) (then (if (not (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site))))) (moveAgain))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "HuntingP1")) (phase "HuntingP1" (play (forEach Piece (then (if (not (can Move (move Step (from (where "PIECE_BETA" P1)) (to if:(is Empty (to)))))) (addScore P1 (- (count Moves) (+ (score P2) 6))))))) (end (if (!= 0 (score P1)) (byScore))))})) ### MID: (intersection (sites Empty) (sites {1 2 3 4}))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3 if:(= 1 (size Stack at:(to)))) (moveAgain)))))}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1)) (place Stack "PIECE_ALPHA2" (handSite P2))}) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Next container:"Board") if:(= 1 (size Stack at:(site))))) (move (from (handSite Mover)) (to (union (forEach (sites Occupied by:Next container:"Board") if:(= 1 (size Stack at:(site)))) (sites Empty))) copy:True (then (if (is Line 3 if:(= 1 (size Stack at:(to)))) (moveAgain)))) (then (if ### SUF: (and {(forEach Site (forEach (sites Occupied by:P1 container:"Board") if:(= (size Stack at:(site)) 2)) (and (remove (site)) (remove (site)))) (forEach Site (forEach (sites Occupied by:P2 container:"Board") if:(= (size Stack at:(site)) 2)) (and (remove (site)) (remove (site)))) (set Pending)}))))) (nextPhase (is Pending) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Next container:"Board") if:(= 1 (size Stack at:(site))))) (forEach Piece))) (end (if (all Sites (sites Occupied by:Next) if:(not (is In (site) (sites Board)))) (result Mover Win))))})) ### MID: (and (not (is Next Mover)) (is Full))
### PRE: (game "GAME_NAME" (players 2) (equipment {(boardless Hexagonal) (tile "Hex" Each numSides:6) ### SUF: (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 (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: (tile "SecondHex" Each numSides:6)
### 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:(sites LineOfSight Piece at:(to))))) (then (addScore Mover 1))) (forEach Piece (do (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))))) (if (<= 5 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from))))))))))))))}) ifAfterwards:(can Move (add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))))))))) (or {(move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))) (then (addScore Mover 1))) (forEach Piece (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around ### SUF: ))))))) (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: (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10)) (piece "PIECE_ALPHA" Each (or {(move Step Diagonal (to if:(is Empty (to)))) (move Slide Orthogonal (between (exact 2))) (move Hop (from) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain)))) (do (move Hop (from) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1)) (then (if (can Move (or (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (do (move Hop (from (last To)) Orthogonal (between before:2 after:2 if:(and (= 2 (count Steps (from) (between))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to)))) ifAfterwards:(is In (last To) (sites Phase 1))))) (moveAgain))))})) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 4 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (or {(move Hop (from (last To)) Diagonal (between if:(is Enemy (who at: ### SUF: )) (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: (between)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 9 diagonals:Alternating) (shift 2 8 (rotate 180 (wedge 3))) (shift 2 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Board) if:(< (site) (centrePoint)))) ### SUF: }) (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: (place "PIECE_ALPHA2" (forEach (sites Board) if:(and (> (site) (centrePoint)) (< (site) (* 9 9)))))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "PIECE_BETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_DELTA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "PIECE_ZETA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" ### SUF: ) (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: (sites Phase 2)
### 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) ### SUF: )))))) (piece "PIECE_BETA" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1))))))) (if (not (= 1 (state at:(from)))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_EPSILON" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Var 1))))))) (piece "PIECE_ZETA" Each (or {(if (and (not (= (var) 1)) (is In (from) (sites Start (piece (what at:(from)))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))} (then (if (and (= (where "PIECE_BETA" Mover) -1) (is In (last To) (sites Mover "Promotion"))) (promote (last To) (piece "PIECE_BETA") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ZETA1" (sites Row 1)) (place "PIECE_ZETA2" (sites Row 6)) (place "PIECE_EPSILON1" {"A1" "H1"} state:1) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1" state:1) (place "PIECE_EPSILON2" {"A8" "H8"} state:1) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end (if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win))))) ### MID: (then (set Var 1))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Board) if:(< (site) ### SUF: ))) (place "PIECE_ALPHA2" (forEach (sites Board) if:(> (site) (centrePoint))))}) (play (if (is Prev Mover) (max Moves (move Hop (from (last To)) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(max Moves (forEach Piece (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece)}))) (end (if (or (no Pieces Next) (and (= 1 (count Pieces Mover)) (= (centrePoint) (where "PIECE_ALPHA" Mover)))) (result Mover Win))))) ### MID: (centrePoint)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- 9 3) 2) ### SUF: ) (shift (/ (- 9 3) 2) 0 (rectangle 9 3 diagonals:Alternating))) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 N (move Step (directions {Rightward Forwards Leftward}) (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" coord:"E7") (place "PIECE_BETA2" (sites {"D1" "E1" "F1" "D2" "E2" "F2" "D3" "E3" "F3" "A4" "B4" "C4" "D4" "E4" "F4" "G4" "H4" "I4"}))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (rectangle 3 9 diagonals:Alternating)
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 2) (equipment {(board (hex Limping 3) use:Cell) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2)}) (rules (start (set Score Each 0)) (play (or {(move Pass) (move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(intersection (sites LineOfSight Piece at:(to)) (sites Direction from:(to) distance:3))))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))) (forEach Piece (or (move Step (to if:(and (is Empty (to)) (< (count Pieces Mover in:(sites Around (from))) (- (count Pieces Mover in:(sites Around (to))) 1)))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))) (if (and (not (was Pass)) (not (can Move (move Step (to if:(and (is Empty (to)) (< (count Pieces Mover in:(sites Around (from))) (- (count Pieces Mover in:(sites Around (to))) 1)))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2))))))))) (move Step (to if:(and (is Empty (to)) (> (count Pieces Next in:(sites Around (from))) (count Pieces Next in:(sites Around (to)))))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))))))})) (end {(if (and (all Passed) (> (score Mover) (score Next))) (result Mover Win)) (if (and (all Passed) (<= (score Mover) (score Next))) (result Next Win))})))
### 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 ### SUF: (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step (to if:(is Empty (to))))))}))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (is In (last To) (sites Next))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Triangle 13)) (piece "PIECE_ALPHA")}) (rules phases:{(phase "Opening" P1 (play (move Add (to (sites Empty)))) ### SUF: ) (phase "Playing" (play (move Add (to (sites Empty)) (then (if (= 0 (count MovesThisTurn)) (moveAgain))))))} (end (if (is Connected 3 Sides) (result Mover Win))))) ### MID: (nextPhase "Playing")
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "PIECE_ALPHA" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (or (move Step Diagonal (to if: ### SUF: (apply (remove (to))))) (move Step Forward (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_ZETA") Mover))))) (piece "PIECE_ZETA" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Hop Forward (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (regions "Promotion" P1 (sites Row 5)) (regions "Promotion" P2 (sites Row 2))}) (rules (start {(place "PIECE_EPSILON1" (sites Row 2)) (place "PIECE_EPSILON2" (sites Row 5)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1" state:1) (place "PIECE_ALPHA1" coord:"E1" state:1) (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8" state:1) (place "PIECE_ALPHA2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Draw))}))) ### MID: (not (is Friend (who at:(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 ### SUF: ) Orthogonal (between (max 1) if:(and (= (what at:(between)) (mover)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Enemy (who at:(to))) (= 0 (state at:(to))))))))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to)))))))))))}) (rules (meta (no Repeat)) (start (place "PIECE_ALPHA" "Hand" count:16)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (or (move Hop (from (last To)) Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))) (then (and {(if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))))) (moveAgain)) (custodial (from (last From)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to)))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 0 (state at:(between)))) (apply (and (flip (between)) (custodial (from (between)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (mover)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Enemy (who at:(to))) (= 0 (state at:(to))))))))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to))))))}))) (move Pass)) (or (forEach Piece) (move Remove (forEach (sites Occupied by:Next) if:(= 1 (state at:(site)))))))))} (end (if (= (count Pieces Next) 1) (result Mover Win))))) ### MID: (between)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (play (if (= (count Moves) (var "MoveThatMustBePlant")) (move Add (to (sites Empty) if:(= 0 (count Sites in:(sites Around (to) Own Orthogonal)))) (then (set Score Mover (- (count Sites in:(sites Occupied by:Mover)) (* 10 (count Groups Orthogonal if:(is Mover (who at:(to))))))))) (if (= 0 (count MovesThisTurn)) (or (move Add (to (sites Empty) if:(= 0 (count Sites in:(sites Around (to) Own Orthogonal)))) (then (set Score Mover (- (count Sites in:(sites Occupied by:Mover)) (* 10 (count Groups Orthogonal if:(is Mover (who at:(to))))))))) (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own Orthogonal))))) ifAfterwards:(all Groups Orthogonal of:(is Mover (who at:(to))) if:(> 2 (count Sites in:(intersection (sites Around (sites) NotEmpty Orthogonal) (sites Occupied by:Neutral))))) (then (if (can Move (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own Orthogonal))))) ifAfterwards:(all Groups Orthogonal of:(is Mover (who at:(to))) if:(> 2 (count Sites in:(intersection (sites Around (sites) NotEmpty Orthogonal) (sites Occupied by:Neutral))))))) (moveAgain) (do (add (to (sites Occupied by:Neutral) (apply (remove (to)))) (then (if (!= 1 (var "HasGrown")) (and (set Var "HasGrown" 1) (if (= (id P2) (mover)) (and (set Var "MoveThatMustBePlant" (count Moves)) (moveAgain))))))) next:(set Score Mover (- (count Sites in:(sites Occupied by:Mover)) (* 10 (count Groups Orthogonal if:(is Mover (who at:(to)))))))))))) (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own Orthogonal))))) ifAfterwards:(all Groups Orthogonal of:(is Mover (who at:(to))) if:(> 2 ### SUF: )) (then (if (can Move (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own Orthogonal))))) ifAfterwards:(all Groups Orthogonal of:(is Mover (who at:(to))) if:(> 2 (count Sites in:(intersection (sites Around (sites) NotEmpty Orthogonal) (sites Occupied by:Neutral))))))) (moveAgain) (do (add (to (sites Occupied by:Neutral) (apply (remove (to)))) (then (if (!= 1 (var "HasGrown")) (and (set Var "HasGrown" 1) (if (= (id P2) (mover)) (and (set Var "MoveThatMustBePlant" (count Moves)) (moveAgain))))))) next:(set Score Mover (- (count Sites in:(sites Occupied by:Mover)) (* 10 (count Groups Orthogonal if:(is Mover (who at:(to)))))))))))))) (end (if (is Full) (byScore))))) ### MID: (count Sites in:(intersection (sites Around (sites) NotEmpty Orthogonal) (sites Occupied by:Neutral)))
### 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 ### SUF: (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 (priority {(forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (is Prev Mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each)}) (rules (meta (swap)) (play (move Add (to (sites Empty)) (then (and (set Score Mover 0) (forEach Group Orthogonal if:(is Mover (who at:(to))) (if (is Odd (count Sites in:(sites))) (and (addScore Mover -1) (forEach Site (sites) (set State at:(site) 1))) (forEach Site (sites) (set State at:(site) 0)))))))) (end (if (is Full) {(if (= (count Groups if:(= (id P1) (who at:(to)))) (count Groups if:(= (id P2) (who at:(to))))) (byScore)) (if True (byScore {(score P1 (- (count Groups if:(= (id P1) (who at:(to)))))) (score P2 (- (count Groups if:(= (id P2) ### SUF: ))))}))})))) ### MID: (who at:(to))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Hop 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 ### SUF: ))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_GAMMA2" coord:"E8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (tri {3 5 3 5 3}) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start (set Score Each 0)) (play (if (is Prev Mover) (if (= 0 (size Array (values Remembered))) (forEach Piece (move Hop (from if:(!= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece (id "PIECE_ALPHA" Mover)) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty (to)))))) (moveAgain))})))))) (forEach Piece (move Hop (from if:(= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece (id "PIECE_ALPHA" Mover)) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty (to)))))) (moveAgain))}))))))) (do (forget Value All) next:(move Add (piece (id "PIECE_ALPHA" Mover)) (to ### SUF: ) (then (if (can Move (forEach Piece (move Hop (from if:(!= (from) (last To))) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered)))) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (and {(remember Value (value Pending)) (remove (value Pending)) (add (piece (id "PIECE_ALPHA" Mover)) (to (value Pending)))} (then (and {(set Pending) (if (can Move (forEach Piece (move Hop (from (last To)) Orthogonal (between if:(is In (between) (difference (sites Occupied by:Next) (sites (values Remembered))))) (to if:(is Empty (to)))))) (moveAgain))}))))))) (moveAgain))))) (then (and (set Score Mover (count Pieces Mover)) (set Score Next (count Pieces Next)))))) (end {(if (and (or {(no Moves Next) (all Passed)}) (= (score Mover) (score Next))) (result Mover Win)) (if (and (or {(no Moves Next) (all Passed)}) (!= (score Mover) (score Next))) (byScore))}))) ### MID: (sites Empty)
### 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 (!= (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))))))))) ### SUF: )) (end (forEach Player if:(is Line 3 Player top:True) (result Player Win))))) ### MID: (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)))))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(shift -1.25 -0.34 (rotate 30 (rectangle 6 1))) (rectangle 1 5) (rectangle 5 1) (shift 0 6 (rectangle 5 1)) (shift 0 10 (rectangle 1 5)) (shift 7 0 (rectangle 1 5)) (shift 7 10 (rectangle 1 5)) (shift 11 0 (rectangle 5 1)) (shift 11 6 (rectangle 5 1)) (shift 12.25 5.33 (rotate 30 (rectangle 6 1)))}) edges:{{13 14} {22 28} {37 36} {9 23}}) {(track "Track1" "46,5,SSE,N,E,S,W,NNW2,End" P1 directed:True) (track "Track2" "47,41,NNW,W,S,E,N,SSE2,End" P2 directed:True)} use:Vertex) (regions "AllSites" (sites Board)) (regions "LastSide" P1 (sites {6 7 8 9 23 24 25 26 27})) (regions "LastSide" P2 (sites {27 33 34 35 36 37 38 39 40})) ### SUF: (piece "PIECE_ALPHA" Each (if (if (not (is In (from) (sites Mover "LastSide"))) True (or {(= (mapEntry "Throw" (count Pips)) 1) (= (mapEntry "Throw" (count Pips)) 2) (= (mapEntry "Throw" (count Pips)) 3)})) (or (if (= 14 (mapEntry "Throw" (count Pips))) (if (= (trackSite Move steps:1) -2) (move Remove (from) level:(level)) (move (from (from) level:(level)) (to (trackSite Move steps:1) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (fromTo (from (to) level:(level)) (to (handSite (who at:(to) level:(level)))))))))))) (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -2) (move Remove (from) level:(level)) (move (from (from) level:(level)) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (fromTo (from (to) level:(level)) (to (handSite (who at:(to) level:(level)))))))))))))) (hand Each) (map "Throw" {(pair 0 10) (pair 39 5) (pair 24 3) (pair 25 3) (pair 35 3) (pair 33 3) (pair 10 2) (pair 18 2) (pair 19 2) (pair 20 2) (pair 21 2) (pair 29 2)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:2) (place Stack "PIECE_ALPHA2" (handSite P2) count:2)}) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (dice d:2 facesByDie:{{0 4} {0 6} {0 14} {0 15}} num:4)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (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}}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(or (and {(is In (from) (sites Next)) (is In ### SUF: (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: (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 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: ### SUF: ))) (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 (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 Pieces Next) (result Next Loss))))) ### MID: (is Empty (to))
### PRE: (game "GAME_NAME" (players {(player S) (player N)}) (equipment {(board (add (remove (rotate 90 (merge {(rectangle 3 3 diagonals:Alternating) (shift 1.5 0.5 (rotate -90 (wedge 2))) (shift -1.5 0.5 (rotate 90 (wedge 2)))})) vertices:{3 7 1}) edges:{{0 1} {4 5} {2 7} {0 4}}) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step Adjacent (to if:(and (if (= 1 (count Turns)) (!= (centrePoint) (to)) True) (is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))))) (hand P1) (regions "Home" P2 (intersection (sites Outer) (expand (sites Bottom)))) (regions "Home" P1 (sites Top))}) (rules (start {(place "PIECE_BETA2" (intersection (sites Outer) (expand (sites Bottom)))) (place "PIECE_ALPHA1" (handSite P1))}) phases:{(phase "Opening" P1 (play (move (from (handSite Mover)) (to (expand (sites Top))))) (nextPhase P1 "MainP1")) (phase "MainP1" P1 (play (forEach Piece (then (if (is In (where "PIECE_ALPHA" P1) ### SUF: ) (set Score P1 2) (if (is Cycle) (set Score P1 1))))))) (phase "MainP2" P2 (play (forEach Piece (then (if (no Moves Next) (set Score P2 1) (if (is Cycle) (set Score P1 1)))))))} (end (forEach Player if:(!= 0 (score Player)) (result Player Win))))) ### MID: (sites P2)
### 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: 3) (>= (count Sites in:(intersection (intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")) (sites Occupied by:Mover on:Vertex))) (if (is Even (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")))) (/ (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes"))) 2) (+ (/ (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes"))) 2) 1)))) (claim (piece (id "PIECE_BETA" Mover)) (to Cell (site)))) (then (forEach Site (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))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) (shift 0 6 (rectangle 1 6)) (shift 7 6 (rectangle 1 6))}) {(track "Track1" {24 0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12} P1 directed:True) (track "Track2" {25 12 13 14 15 16 17 18 19 20 21 22 23 11 10 9 8 7 6 5 4 3 2 1 0} P2 directed:True)} use:Vertex) (dice d:6 num:3) (hand Each) (regions "StartingQuadrant" P1 (sites {0 1 2 3 4 5})) (regions "StartingQuadrant" P2 (sites {12 13 14 15 16 17})) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (if (or {(is Empty (trackSite Move steps:(pips))) (and (is Friend (who at:(trackSite Move steps:(pips)))) (if (is In (to) (sites Mover "StartingQuadrant")) (not (= 1 (size Stack at:(trackSite Move steps:(pips))))) True)) (and (is Enemy (who at:(trackSite Move steps:(pips)))) (= 1 (size Stack at:(trackSite Move steps:(pips)))))}) (move (from) (to (trackSite Move steps:(pips)) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at: ### SUF: )))))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 0 count:15) (place Stack "PIECE_ALPHA2" 12 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(or (forEach Piece top:True) (forEach Piece container:(mover) top:True) (then (if (not (all DiceUsed)) (moveAgain)))))) (end {(if (no Pieces Mover) (result Mover Win)) (if (and (no Moves P1) (no Moves P2)) (result Mover Draw))}))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- 7 3) 2) (rectangle 3 7 diagonals:Alternating)) (shift (/ (- 7 3) 2) 0 (rectangle 7 3 diagonals:Alternating))) use:Vertex) (hand P1) ### SUF: (piece "PIECE_BETA" P2 N (move Step Forwards (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1)) (place "PIECE_BETA2" (union (expand (sites Bottom)) (sites Row 2)))}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves Next) (result Next Loss)) (if (no Pieces P2) (result P2 Win))}))) ### MID: (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (remove (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) vertices:{1 11 21 23 13 3}) edges:{{0 1} {1 2} {8 9} {9 10} {16 17} {17 18}}) 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))))))}) ### SUF: ) ### MID: (rules (start {(place "PIECE_ALPHA1" (union (sites {"A4" "E4"}) (expand (sites Bottom) steps:3))) (place "PIECE_ALPHA2" (union (sites {"A6" "E6"}) (expand (sites Top) steps:3)))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (or (move Pass (then (forEach Site (sites Next) (if (= (what at:(site)) (id "PIECE_ALPHA" Mover)) (promote (site) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (or (move Pass) (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then ### SUF: )))) (or (forEach Piece "PIECE_ALPHA" (or (move Step (directions {FR FL}) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (move Hop (from) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))))) (forEach Piece "PIECE_BETA" (or (move Slide Diagonal) (move Hop (from) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (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))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 30 (hex 4))) (piece "PIECE_ALPHA" Each (move Slide (between (max (if (= -1 (value Player Mover)) 1 (value Player Mover))) if:(not (is Enemy (who at:(between))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is Friend (who at:(to)))) (if (is Enemy (who at:(to))) (remove (to) (then ### SUF: ))))) (then (if (<= (- (if (= -1 (value Player Mover)) 1 (value Player Mover)) (count Steps (last From) (last To))) 0) (set Value Mover (- 7 (count Pieces Mover))) (and (set Value Mover (- (if (= -1 (value Player Mover)) 1 (value Player Mover)) (count Steps (last From) (last To)))) (moveAgain)))))) (hand Each)}) (rules (start {(place "PIECE_ALPHA1" (difference (union {(sites Side NW) (sites Side NE) (expand (sites Side N))}) (union (sites Left) (sites Right)))) (place "PIECE_ALPHA2" (difference (union {(sites Side SW) (sites Side SE) (expand (sites Side S))}) (union (sites Left) (sites Right))))}) (play (if (is Prev Mover) (move Slide (from (last To)) (between (max (if (= -1 (value Player Mover)) 1 (value Player Mover))) if:(not (is Enemy (who at:(between))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is Friend (who at:(to)))) (if (is Enemy (who at:(to))) (remove (to) (then (set Value Next (+ (value Player Next) 1))))))) (then (if (<= (- (if (= -1 (value Player Mover)) 1 (value Player Mover)) (count Steps (last From) (last To))) 0) (set Value Mover (- 7 (count Pieces Mover))) (and (set Value Mover (- (if (= -1 (value Player Mover)) 1 (value Player Mover)) (count Steps (last From) (last To)))) (moveAgain))))) (forEach Piece))) (end (if (or (and (= 1 (count Pieces Next)) (= 6 (count Pieces Mover))) (no Pieces Next)) (result Mover Win))))) ### MID: (set Value Next (+ (value Player Next) 1))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each)}) (rules (meta (swap)) (play (move Add (to (sites Empty)) (then (and (set Score Mover 0) (forEach Group Orthogonal if:(is Mover (who at:(to))) (if (is Odd (count Sites in:(sites))) (and (addScore Mover -1) (forEach Site (sites) ### SUF: )) (and (addScore Mover -2) (forEach Site (sites) (set State at:(site) 1))))))))) (end (if (is Full) (byScore))))) ### MID: (set State at:(site) 0)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) ### SUF: (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (or (if (= (value Player Prev) 1) (or (if (and (is In (last From) (sites Pending)) (is In (last From) (sites Empty))) (move Select (from (last To) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))) (move Select (from (sites Pending) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)}))))) (do (set Pending (sites From (or (forEach Piece "PIECE_ALPHA" (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))))) next:(forEach Piece)))) (end (if (no Pieces Mover) (result Mover Loss))))) ### MID: (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))) (then (set Value Mover 1))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_BETA" Each (or (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (set Value Mover 0))) (move Slide (then (set Value Mover 1))))) (regions P1 (sites Bottom)) (regions P2 (sites Top))})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)}) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2)}) (rules (play (if (not (is Prev Mover)) (or (move Add (to (sites Empty)) (then (if (and (not (is Prev Mover)) (< 0 (count Sites in:(sites (results from:(last To) to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" (last To) (then (moveAgain))) (set Var "LT" -1)))) (forEach Site (sites Occupied by:Mover) (do (set Var "LT" (site)) next:(forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) ### 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: (to)
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (concentric {4 4 4 4 4 4 4 4}) {(track "Track1" {28 24 20 16 12 8 4 0} P1 directed:True) (track "Track2" {29 25 21 17 13 9 5 1} P2 directed:True) (track "Track3" {30 26 22 18 14 10 6 2} P3 directed:True) (track "Track4" {31 27 23 19 15 11 7 3} P4 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Shared) (hand Each size:2)}) (rules (start {(place "PIECE_ALPHA1" 28) (place "PIECE_ALPHA2" 29) (place "PIECE_ALPHA3" 30) (place "PIECE_ALPHA4" 31)}) phases:{(phase "Hiding" (play (move Add (piece (id "PIECE_BETA" Shared)) (to Cell (sites Hand Mover)) (then (set Hidden Cell at:(last To) to:Next)))) (nextPhase "Guessing")) (phase "Guessing" (play (move Select (from Cell (sites Hand Prev)) (then (and (if (is Empty (last To)) (and (fromTo (from (where "PIECE_ALPHA" Prev)) (to (if (is Prev P1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track1" steps:1) (if (is Prev P2) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track2" steps:1) (if (is Prev P3) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track3" steps:1) (trackSite Move from:(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)) ### SUF: ) {(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: (count Sites in:(forEach (sites Centre) if:(is Occupied (site))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "PIECE_ALPHA" Each (or (move Hop (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 (to if:(is Empty (to))) (then (set Value Mover 1))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_BETA" Each (or (move Hop (between 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 Slide (then (set Value Mover 1)))))}) (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 (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (move Hop (between if:(is Enemy (who at: ### SUF: )) (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)))))))) next:(forEach Piece)))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (between)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 16)) (piece "PIECE_ALPHA" Each) (regions "Home" P1 (difference (expand (intersection (sites Bottom) (sites Right)) steps:(+ 1 (/ 16 4)) Orthogonal) (sites {(ahead (coord row:0 column:(- 16 1)) steps:(+ 1 (/ 16 4)) N) (ahead (coord row:0 column:(- 16 1)) steps:(+ 1 (/ 16 4)) W)}))) (regions "Home" P2 (difference (expand (intersection (sites Top) (sites Left)) steps:(+ 1 (/ 16 4)) Orthogonal) (sites {(ahead (coord row:(- 16 1) column:0) steps:(+ 1 (/ 16 4)) E) (ahead (coord row:(- 16 1) column:0) steps:(+ 1 (/ 16 4)) S)}))) (map {(pair P1 P2) (pair P2 P1)})}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2))}) phases:{(phase "Movement" (play (forEach Piece (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player ### SUF: )))))))) (moveAgain)))) (move Step (to if:(and (is Empty (to)) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))))) (nextPhase (is Mover (next)) "MultiJump")) (phase "MultiJump" (play (or (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Pass))) (nextPhase (not (is Mover (next))) "Movement"))} (end (if (= (sites Occupied by:Mover) (sites (player (mapEntry (mover))))) (result Mover Win))))) ### MID: (mapEntry (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 (and {(custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA2" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))) (surround (from (last To)) Orthogonal (between if:(= (what at:(between)) (id "PIECE_BETA" P2)) (apply (trigger "Surrounded" P2))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))})))) (piece "PIECE_ALPHA" P2 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))))) (piece "PIECE_BETA" P2 (move Slide Orthogonal (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))))))}) (rules ### SUF: (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: (start {(place "PIECE_ALPHA1" {"D1" "E1" "F1" "G1" "H1" "F2" "A4" "A5" "A6" "A7" "A8" "B6" "K4" "K5" "K6" "K7" "K8" "J6" "F10" "D11" "E11" "F11" "G11" "H11" "F10"}) (place "PIECE_ALPHA2" {"F4" "E5" "F5" "G5" "D6" "E6" "G6" "H6" "E7" "F7" "G7" "F8"}) (place "PIECE_BETA2" (centrePoint))})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) 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 ### SUF: (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: (is In (last To) (sites Next))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Hop (directions {N S}) (between (exact (- (count Sites in:(difference (sites Column (column 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 {W E}) (between (exact (- (count Sites in:(difference (sites Row (row of:(from))) ### SUF: )) 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: (sites Empty)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9)) ### SUF: (piece "PIECE_BETA" P2 (move Slide Orthogonal (then (or (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 In (between) (sites Corners)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))))))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_BETA2" (sites Top))}) (play (forEach Piece)) (end (if (= (count Pieces Next) 1) (result Mover Win))))) ### MID: (piece "PIECE_ALPHA" P1 (move Slide Orthogonal (then (or (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 In (between) (sites Corners)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(add (remove (rectangle 1 7) vertices:{3}) edges:{{2 3}}) (scale 2 (shift 0.5 -0.5 (rectangle 1 3))) (scale 2 (shift 0.5 0.5 (rectangle 1 3)))}) edges:{{0 9} {0 6} {11 5} {5 8} {1 6} {1 9} {4 11} {4 8} {9 2} {2 7} {6 2} {2 10} {10 3} {3 8} {7 3} {3 11}}) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" coord:"B2") (place "PIECE_BETA2" (sites {"A2" "B1" "B3"}))}) (play (forEach Piece)) (end {(if (no Moves P1) ### SUF: )}))) ### MID: (result P2 Win)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 13) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "51,W,S1,E,S1,W,S1,E" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (if (or (= (state at:(from)) 0) (and (= (count Pips) 1) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(count Pips)) -1) (if (or (is In (trackSite Move steps:(count Pips)) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(count Pips))))) (move (from) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (do (roll) next:(forEach Piece))) (end {(if (no Pieces Next) (result Next Loss)) (if (and (= (count Sites in: ### SUF: ) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites P1))) 0)) (result Mover Draw))}))) ### MID: (difference (sites Occupied by:P1) (sites P2))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"E8") (place "PIECE_GAMMA2" coord:"D8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) ### SUF: ) (if (no Moves Mover) (result Mover Win)) (if (<= (count Pieces Next) 1) (result Next Loss))}))) ### MID: (result Mover Win)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (keep (square 8) (poly {{-3 4} {4 -3} {11 4} {4 11}}))) (piece "PIECE_ALPHA" P1 N (or (move Slide (between (max 2) trail:(id "PIECE_BETA0"))) (move Hop (between if:(= (what at:(between)) (id "PIECE_BETA0" Neutral))) (to if:(is Empty (to))) (then (add (piece "PIECE_BETA0") (to (last From))))))) (piece "PIECE_GAMMA" P2 (or {(move Slide (between (max 2) trail:(id "PIECE_BETA0"))) (move Hop (between if:(= (what at:(between)) (id "PIECE_BETA0" Neutral))) (to if:(is Empty (to))) (then (add (piece "PIECE_BETA0") (to (last From))))) (move Step (to if:(= (what at:(to)) (id "PIECE_ALPHA1" P1)) (apply (remove (to)))) (then (and (remove (last To)) (add (piece "PIECE_BETA0") (to (last From))))))})) (piece "PIECE_BETA" Neutral)}) (rules (start {(place "PIECE_GAMMA2" {"G2" "G7"}) (place "PIECE_ALPHA1" {"B2" "B7"})}) (play (forEach Piece)) (end {(if (= (count Sites in:(sites Occupied by:All)) 0) (result P2 Win)) (if (and (no Moves P1) (not (can Move (forEach Piece "PIECE_GAMMA" (step (to if:(= (what at:(to)) (id "PIECE_ALPHA1" P1)))))))) (result P1 Win)) ### SUF: }))) ### MID: (if (all Passed) (result P1 Win))
### 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) ### SUF: ) (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))))) (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: (sites Next)
### 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)) ### SUF: )) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to))))))) (if (not (all Sites (forEach (sites Around (sites To (hop Orthogonal (between if:True) (to if:True))) Orthogonal) if:(= 2 (count Steps (from) (site)))) if:(!= (what at:(site)) (id "PIECE_ALPHA" Mover)))) (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites "BlackenedSquares")))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to)))))))})) (piece "PIECE_BETA" Each) (hand Each) (regions "BlackenedSquares" (sites {"A2" "B3" "B5" "C6" "D4" "E5" "E7" "F8"})) (regions "PawnStart" P1 (sites {"E1" "E2" "F2" "D2" "D3" "E3"})) (regions "PawnStart" P2 (sites {"B9" "B8" "A8" "C8" "C7" "B7"}))}) (rules (start {(place "PIECE_ALPHA" "Hand" count:3) (place "PIECE_ALPHA1" (sites P1 "PawnStart")) (place "PIECE_ALPHA2" (sites P2 "PawnStart")) (place "PIECE_BETA1" coord:"F1") (place "PIECE_BETA2" coord:"A9")}) (play (or (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_BETA" Mover)))) (if (is Occupied (handSite Mover)) (move (from (sites Hand)) (to (sites Mover "PawnStart") if:(is Empty (to))))))) (end {(if (and (is Threatened (id "PIECE_BETA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_BETA" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))}))) ### MID: (not (is In (between) (sites "BlackenedSquares")))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each (move Step (to if:(and (or (= (id Neutral) (who at:(to))) (is Empty (to))) (= 1 (- (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral)))))) (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (to) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps ### SUF: (from) (sites Occupied by:Neutral))))))))) (apply (if (is Occupied (to)) (and (remove (to)) (addScore Mover 1))))))) (piece "PIECE_ALPHA" Neutral)}) (rules (start {(place "PIECE_ALPHA0" (difference (sites Board) (sites Corners))) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) NNW)) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) E)) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) SSW)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) NNE)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) W)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) SSE))}) (play (forEach Piece Mover)) (end (if (or (< (/ (- (count Sites in:(sites Board)) 6) 2) (score P1)) (< (/ (- (count Sites in:(sites Board)) 6) 2) (score P2))) (byScore))))) ### MID: (step (to if:(or (= (id Neutral) (who at:(to))) (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 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (or (move Pass (then (forEach Site (sites Next) (if (= (what at:(site)) (id "PIECE_ALPHA" Mover)) (promote (site) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (or (move Pass) (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (or (move Step (directions {FR FL}) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (move Hop (from) Diagonal (between if:(is Enemy (who at:(between))) (apply ### SUF: )) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))))) (forEach Piece "PIECE_BETA" (or (move Slide Diagonal) (move Hop (from) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (remove (between))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (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 ### SUF: ) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (priority {(forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (forEach Player if:(no Pieces Player) (result Player Win))))) ### MID: (last To)
### PRE: (game "GAME_NAME" (players 6) (equipment {(board (hex Star 4)) (piece "PIECE_ALPHA" Each) (regions "Home" P1 (expand origin:(coord row:0 column:4) steps:(- 4 1))) (regions "Home" P2 (expand origin:(coord row:4 column:(* 4 3)) steps:(- 4 1))) (regions "Home" P3 (expand origin:(coord row:(* 4 3) column:(* 4 4)) steps:(- 4 1))) (regions "Home" P4 (expand origin:(coord row:(* 4 4) column:(* 4 3)) steps: ### SUF: )) (regions "Home" P5 (expand origin:(coord row:(* 4 3) column:4) steps:(- 4 1))) (regions "Home" P6 (expand origin:(coord row:4 column:0) steps:(- 4 1))) (map {(pair 1 4) (pair 2 5) (pair 3 6) (pair 4 1) (pair 5 2) (pair 6 3)})}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2)) (place "PIECE_ALPHA3" (sites P3)) (place "PIECE_ALPHA4" (sites P4)) (place "PIECE_ALPHA5" (sites P5)) (place "PIECE_ALPHA6" (sites P6))}) phases:{(phase "Movement" (play (forEach Piece (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Step (to if:(and (is Empty (to)) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))))) (nextPhase (is Mover (next)) "MultiJump")) (phase "MultiJump" (play (or (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Pass))) (nextPhase (not (is Mover (next))) "Movement"))} (end (if (= (sites Occupied by:Mover) (sites (player (mapEntry (mover))))) (result Mover Win))))) ### MID: (- 4 1)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4)) (hand P1) (piece "PIECE_ALPHA" P1 (or (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step Orthogonal (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step Orthogonal (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:12) (place "PIECE_BETA2" (sites Corners))}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)) (then (forEach Site (sites Occupied by:Next) (if ### SUF: (remove (site))))))) (nextPhase (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) "MovementP1")) (phase "MovementP1" P1 (play (forEach Piece (then (forEach Site (sites Occupied by:Next) (if (not (can Move (or (step (from (site)) Orthogonal (to if:(is Empty (to)))) (hop (from (site)) Orthogonal (between if:(= (who at:(between)) P1) (apply (remove (between)))) (to if:(is Empty (to))))))) (remove (site)))))))) (phase "FirstTigerMovement" P2 (play (forEach Piece (if (= (count Steps (from) (last To)) (min (results from:(last To) to:(sites Corners) (count Steps (from) (to))))) (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))))) (nextPhase Mover "MovementP2")) (phase "MovementP2" P2 (play (forEach Piece)))} (end {(if (no Pieces P1) (result P2 Win)) (if (>= 2 (count Pieces P2)) (result P1 Win))}))) ### MID: (not (can Move (or (step (from (site)) Orthogonal (to if:(is Empty (to)))) (hop (from (site)) Orthogonal (between if:(= (who at:(between)) P1) (apply (remove (between)))) (to if:(is Empty (to)))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (play (if (= (count Moves) (var "MoveThatMustBePlant")) (move Add (to (sites Empty) if:(= 0 (count Sites in:(sites Around (to) Own Orthogonal)))) (then (set Score Mover (- (count Sites in:(sites Occupied by:Mover)) (* 10 (count Groups Orthogonal if:(is Mover (who at:(to))))))))) (if (= 0 (count MovesThisTurn)) (or (move Add (to (sites Empty) if:(= 0 (count Sites in:(sites Around (to) Own Orthogonal)))) (then (set Score Mover (- (count Sites in:(sites Occupied by:Mover)) (* 10 (count Groups Orthogonal if:(is Mover (who at:(to))))))))) (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own Orthogonal))))) ifAfterwards:(all Groups Orthogonal of:(is Mover (who at:(to))) if:(> 2 (count Sites in:(intersection (sites Around (sites) NotEmpty Orthogonal) (sites Occupied by:Neutral))))) (then (if (can Move (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own Orthogonal))))) ifAfterwards:(all Groups Orthogonal of:(is Mover (who at:(to))) if:(> 2 (count Sites in:(intersection (sites Around (sites) NotEmpty Orthogonal) (sites Occupied by:Neutral))))))) (moveAgain) (do (add (to (sites Occupied by:Neutral) (apply (remove (to)))) (then (if (!= 1 (var "HasGrown")) (and (set Var "HasGrown" 1) (if (= (id P2) (mover)) (and (set Var "MoveThatMustBePlant" (count Moves)) (moveAgain))))))) next:(set Score Mover (- (count Sites in:(sites Occupied by:Mover)) (* 10 (count Groups Orthogonal if:(is Mover (who at:(to)))))))))))) (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own Orthogonal))))) ifAfterwards:(all Groups Orthogonal of:(is Mover ### SUF: ) if:(> 2 (count Sites in:(intersection (sites Around (sites) NotEmpty Orthogonal) (sites Occupied by:Neutral))))) (then (if (can Move (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty) if:(< 0 (count Sites in:(sites Around (to) Own Orthogonal))))) ifAfterwards:(all Groups Orthogonal of:(is Mover (who at:(to))) if:(> 2 (count Sites in:(intersection (sites Around (sites) NotEmpty Orthogonal) (sites Occupied by:Neutral))))))) (moveAgain) (do (add (to (sites Occupied by:Neutral) (apply (remove (to)))) (then (if (!= 1 (var "HasGrown")) (and (set Var "HasGrown" 1) (if (= (id P2) (mover)) (and (set Var "MoveThatMustBePlant" (count Moves)) (moveAgain))))))) next:(set Score Mover (- (count Sites in:(sites Occupied by:Mover)) (* 10 (count Groups Orthogonal if:(is Mover (who at:(to)))))))))))))) (end (if (is Full) (byScore))))) ### MID: (who at:(to))
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (!= (value Player Mover) (mover)) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))) (then (set Value Mover (mover))))))) (piece "PIECE_EPSILON" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ZETA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (move Slide (to if:(is Enemy (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_GAMMA1" {"A1" "H1"}) (place "PIECE_ZETA1" {"B1" "G1"}) (place "PIECE_EPSILON1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"D1") (place "PIECE_DELTA1" coord:"E1") (place "PIECE_GAMMA2" {"A8" "H8"}) (place "PIECE_ZETA2" {"B8" "G8"}) (place "PIECE_EPSILON2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"E8") ### SUF: }) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Mover))) (then (if (!= (next) (value Player Next)) (if (is Threatened (id "PIECE_DELTA" Next)) (set Value Next (next))))))) (end {(if (and (is Threatened (id "PIECE_DELTA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (place "PIECE_DELTA2" coord:"D8")
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13)) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (sites Empty)))) (nextPhase "General")) (phase "General" (play (do (move Add (to (sites Empty)) (then (if (not (is Prev Mover)) (moveAgain)))) ifAfterwards:(and (not (is Line 5)) (!= 1 (+ {(if (is Line 4 N exact:True) 1 0) (if (is Line 4 NE exact:True) 1 0) (if (is Line 4 E exact:True) 1 0) (if (is Line 4 SE exact:True) 1 0)}))))))} (end (if (<= 2 (+ {(if (is Line 4 N exact:True) 1 0) (if ### SUF: 1 0) (if (is Line 4 E exact:True) 1 0) (if (is Line 4 SE exact:True) 1 0)})) (result Mover Win))))) ### MID: (is Line 4 NE exact:True)
### 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 ### SUF: ) (place "PIECE_ALPHA2" (sites {16 17 12 13})) (place "PIECE_ALPHA2" Cell 11) (place "PIECE_ALPHA2" Edge (sites {25 29 26 20}))}) (play (if (is Prev Mover) (move (from Cell (last To)) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Cell at:(from))) if:(and (= 1 (count Sites in:(intersection {(sites Empty Edge) (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))}))) (!= (last From) (to))))) (or {(forEach Piece on:Vertex (or (move Step (from Vertex) (to if:(is Empty Vertex (to))) (then (forEach Site (intersection (sites Incident Edge of:Vertex at:(last From)) (sites Incident Edge of:Vertex at:(last To))) (if (is Enemy (who Edge at:(site))) (remove Edge (site)))))) (move (from Vertex) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Vertex at:(from))))))) (forEach Piece on:Edge (or (move Step (from Edge) (to if:(is Empty Edge (to))) (then (forEach Site (intersection (sites Incident Vertex of:Edge at:(last From)) (sites Incident Vertex of:Edge at:(last To))) (if (is Enemy (who Vertex at:(site))) (remove Vertex (site)))))) (move (from Edge) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Edge at:(from))))))) (forEach Piece on:Cell (or {(move (from Cell) (to Cell (intersection (sites Empty Cell) (sites Incident Cell of:Cell at:(from)))) (then (forEach Site (intersection (sites Incident Edge of:Cell at:(last From)) (sites Incident Edge of:Cell at:(last To))) (if (is Enemy (who Edge at:(site))) (remove Edge (site)))))) (move (from Cell) (to Cell (sites Incident Cell of:Cell at:(from)) if:(and (is Enemy (who Cell at:(to))) (= 1 (count Sites in:(intersection {(sites Empty Edge) (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))})))) (apply (remove Cell (to)))) (then (moveAgain))) (move (from Cell) (to Cell (forEach (sites Empty Cell) if:(= 1 (count Sites in:(intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(site))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who Vertex at:(site))) (remove Vertex (site)))))) (move (from Cell) (to Edge (intersection (sites Empty Edge) (sites Incident Edge of:Cell at:(from))))) (move (from Cell) (to Vertex (intersection (sites Empty Vertex) (sites Incident Vertex of:Cell at:(from)))))}))}))) (end (if (>= 1 (+ {(count Pieces Vertex Next) (count Pieces Edge Next) (count Pieces Cell Next)})) (result Mover Win))))) ### MID: (sites {0 3 4 9})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(shift 2 2 (square 5 diagonals:Alternating)) (shift 2 0 (wedge 3)) (shift 5 3 (rotate 90 (wedge 3))) (shift 2 6 (rotate 180 (wedge 3))) (shift -1 3 (rotate 270 (wedge 3)))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if: ### SUF: (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom) steps:2) (expand (sites Right) steps:3) (sites {"F3" "G3" "E4" "F4" "F6" "F7" "G7"})})) (place "PIECE_ALPHA2" (union {(expand (sites Top) steps:2) (expand (sites Left) steps:3) (sites {"C3" "D3" "D4" "D6" "E6" "D7" "C7"})}))}) (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))) ### MID: (is Enemy (who at:(between)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 3) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (or ### SUF: (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:3)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (move Step (to if:(is Empty (to))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (play (move Add (to (sites Empty)))) (end (if (or {(= 3 (count Sites in:(forEach (sites Row (row of:(last To))) if:(is Friend (who at:(site)))))) (= 3 (count Sites in:(forEach (sites Column (column of:(last To))) if:(is Friend (who at:(site)))))) (= 3 (count Sites in:(forEach (union (sites Direction from:(last To) NE included:True) (sites Direction from:(last To) SW)) if:(is Friend (who at:(site)))))) (= 3 (count Sites in:(forEach (union (sites Direction from:(last To) NW included:True) (sites Direction from:(last To) SE)) if: ### SUF: )))}) (result Mover Loss))))) ### MID: (is Friend (who at:(site)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (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: ### SUF: )))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to)))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Board) (centrePoint)) if:(is Empty (to))))) (nextPhase Mover (is Empty (handSite Mover)) "Move")) (phase "Move" (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: (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 before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) ### SUF: )) (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: (sites ToClear)
### 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)))))) ### SUF: )) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (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))))) (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))))))})
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))})) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))}) (rules (start {(place "PIECE_GAMMA1" coord:"E1") (place "PIECE_GAMMA2" coord:"E8") (place "PIECE_ZETA1" coord:"D1") (place "PIECE_ZETA2" coord:"D8") (place "PIECE_DELTA1" {"C1" "F1"}) ### SUF: (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover))))) (end (if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win))))) ### MID: (place "PIECE_DELTA2" {"C8" "F8"})
### 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) ### SUF: (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: (or (move Pass) (priority (move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))) (then (addScore Mover 1))) (forEach Piece (do (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))))) (if (<= 5 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from))))))))))))))}) ifAfterwards:(can Move (add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to)))))))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (keep (splitCrossings (merge (rotate 45 (dual (square 12 diagonals:Concentric))) (shift 3 3 (scale 6 (square 1))))) (poly {{3 3} {3 9} {9 9} {9 3}})) vertices:{{6 6}})) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (regions "Holes" (union (difference (sites Board Vertex) (sites Outer Vertex)) (sites Corners Vertex))) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)})}) (rules (meta (swap)) (play (move Add (to Vertex (sites Empty Vertex) if:(is In (to) (sites "Holes"))) (then (forEach Site (sites Incident Cell of:Vertex at:(last To)) (if (if (is In (site) (sites Centre)) (>= (+ (count Sites in:(intersection (intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")) (sites Occupied by:Mover on:Vertex))) (if (= (mover) (who Vertex at:(centrePoint Vertex))) 1 0)) 3) (>= (count Sites in:(intersection (intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes")) (sites Occupied by:Mover on:Vertex))) (if ### SUF: (/ (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: (is Even (count Sites in:(intersection (sites Incident Vertex of:Cell at:(site)) (sites "Holes"))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (keep (rotate -45 (subdivide (tiling T33434 7 7) min:4)) (poly {{-6.5 1.75} {-6.5 12.75} {4.5 12.75} {4.5 1.75}})) use:Vertex) (piece "PIECE_ALPHA" Each) (regions P1 {(sites Side W) (sites Side E)}) (regions P2 {(sites Side N) (sites Side S)})}) (rules (start {(place "PIECE_ALPHA1" (sites {15 24 119 128})) (place "PIECE_ALPHA2" (sites {20 27 116 123}))}) (play (move Add (to (forEach (sites Empty) if:(if (is In (site) (forEach (sites Board) if:(and (= 4 (count Sites in:(sites Around (site)))) (not (is In (site) (sites Outer)))))) (all Sites (sites Around (site)) if:(is Empty (site))) True))) (then (forEach Site (forEach (sites Board) if:(and (= 4 (count Sites in:(sites Around (site)))) (not (is In (site) (sites Outer))))) (if (and {(is Empty (site)) (is In (last To) (sites Around (site))) (all Sites (sites Around (site)) if:(is Occupied ### SUF: )) (= 2 (count Sites in:(forEach (sites Around (site)) if:(is Enemy (who at:(site)))))) (= 2 (count Sites in:(forEach (sites Around (site)) if:(and (is In (site) (sites Around (last To))) (is Enemy (who at:(site)))))))}) (remove (forEach (sites Around (site)) if:(is Enemy (who at:(site)))))))))) (end (if (is Connected Mover) (result Mover Win))))) ### MID: (site)
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"E8") (place "PIECE_GAMMA2" coord:"D8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) ### SUF: (if (<= (count Pieces Next) 1) (result Next Loss))}))) ### MID: (if (no Moves Mover) (result Mover Win))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 12 3) (shift 1 -1 (rectangle 13 1))}) {(track "HomeTrack1" "0,N,E1,S" P1 directed:True) (track "HomeTrack2" "2,N,W1,S" P2 directed:True) (track "EnemyTrack1" "2,N,W1,S" P1 directed:True) (track "EnemyTrack2" "0,N,E1,S" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:4) (map "Throw" {(pair 0 6) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (map "FirstEnemySite" {(pair P1 2) (pair P2 0)}) (regions "Home" P1 (sites Left)) (regions "Home" P2 (sites Right))}) (rules (start {(place "PIECE_ALPHA1" (sites Left)) (place "PIECE_ALPHA2" (sites Right))}) (play (do (roll) next:(or (if (and (= 1 (mapEntry "Throw" (count Pips))) (= (mover) (who at:36))) (move (from 36) (to (mapEntry "FirstEnemySite" ### SUF: ) if:(not (is Friend (mapEntry "FirstEnemySite" (mover)))) (apply if:(is Enemy (who at:(to))) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home"))))))))))) (forEach Piece (or (if (is In (from) (sites Track Mover "HomeTrack")) (if (if (!= 0 (state at:(from))) True (= 1 (mapEntry "Throw" (count Pips)))) (if (not (is Friend (who at:(trackSite Move "HomeTrack" steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move "HomeTrack" steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) (if (is In (to) (sites Next "Home")) (remove (to)) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home")))))))))) (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (mapEntry "Throw" (count Pips)))) (set State at:(last To) 1))))))) (if (is In (from) (sites Track Mover "EnemyTrack")) (if (not (is Friend (who at:(trackSite Move "EnemyTrack" steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move "EnemyTrack" steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) (if (is In (to) (sites Next "Home")) (remove (to)) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home")))))))))))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (mover)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (rotate 30 (dual (tiling T3636 5))) cells:{0 4 5 73 81 97 142 143 152})) (tile "Rhombus" Each)}) (rules (play (move Select (from (sites Empty) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))) (to (sites Around (from) Empty Orthogonal) if:(not (all Sites (sites Around (to) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from)))))) (then (do (forEach Site (forEach (sites Empty) if:(and {(= (count Sites in:(sites Around (site) Own Orthogonal)) (count Sites in:(sites Around (site) Enemy Orthogonal))) (not (can Move (move Select (from (sites Around (site) Empty Orthogonal) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))))))})) (set State at:(site) 1)) next:(do (add (to (intersection (sites Around (last From) Orthogonal includeSelf:True) (sites Around (last To) Orthogonal includeSelf:True)))) next:(addScore Mover (% (count Sites in:(forEach (forEach (sites Empty) if:(and {(= (count Sites in:(sites Around (site) Own Orthogonal)) (count Sites in:(sites Around (site) Enemy Orthogonal))) (not (can Move (move Select (from (sites Around (site) Empty Orthogonal) if:(not ### SUF: )))))})) if:(!= 1 (state at:(site))))) 2))))))) (end (if (no Moves Next) (byScore {(score P1 (+ {(score P1) (- (max (/ (count Sites in:(sites Occupied by:P1)) 3) (/ (count Sites in:(sites Occupied by:P2)) 3)) (/ (count Sites in:(sites Occupied by:P1)) 3)) (count Sites in:(forEach (sites Empty) if:(> (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P1))) (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P2))))))})) (score P2 (+ {(score P2) (- (max (/ (count Sites in:(sites Occupied by:P1)) 3) (/ (count Sites in:(sites Occupied by:P2)) 3)) (/ (count Sites in:(sites Occupied by:P2)) 3)) (count Sites in:(forEach (sites Empty) if:(> (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P2))) (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:P1))))))}))}))))) ### MID: (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from)))))))
### 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)) (= 0 (state at:(between)))) (apply (and (flip (between)) (custodial (from (between)) Orthogonal ### SUF: (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: (between (max 1) if:(and (= (what at:(between)) (mover)) (= 1 (state at:(between)))) (apply (flip (between))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (merge {(rectangle 3 3 diagonals:Alternating) (shift 1.5 0.5 (rotate -90 (wedge 2))) (shift -1.5 0.5 (rotate 90 (wedge 2)))})) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_ALPHA" P2 N (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))))) (regions "Home" P2 (sites {"B1" "C2" "A2"})) ### SUF: }) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (is In (where "PIECE_ALPHA" P1) (sites P2)) (result P1 Win))}))) ### MID: (regions "Home" P1 (sites {"B2"}))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:5)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if ### SUF: (result Mover Win))))) ### MID: (is Line 5)
### 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 ### SUF: ) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1")) (apply (remove (between)))) (to if:(or {(is Friend (who at:(to))) (is In (to) (sites "Fortresses")) (and (is In (to) (sites Centre)) (is Empty (to)))}))))))}) (rules (start {(place "PIECE_ALPHA1" {"D1" "D2" "A4" "B4" "F4" "G4" "D6" "D7"}) (place "PIECE_ALPHA2" {"D3" "C4" "E4" "D5"}) (place "PIECE_BETA2" (centrePoint))}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA2") in:(sites "Fortresses")) (result P2 Win)) (if (is Triggered "Surrounded" P2) (result P1 Win))}))) ### MID: (apply if:(not (= (to) (centrePoint))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty ### SUF: )) (then (if (is Line 3) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (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 (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: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 3 3) (shift 1.5 0.5 (rotate -90 (wedge 2))) (shift -1.5 0.5 (rotate 90 (wedge 2)))}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:3) (place "PIECE_BETA2" (handSite P2))}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 ### SUF: )) "Movement")) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves P2) (result P1 Win))}))) ### MID: (count Cell at:(site))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (piece "PIECE_ALPHA" Each)}) (rules (play (if (= 1 (var)) (or (move Swap Players P1 P2) (move Add (to (sites Empty)) (then (set Var 0)))) (move Add (to (sites Empty)) (then (if (= 1 (count Moves)) (set Var 1)))))) (end (if (>= (count Sites in:(sites Board)) (max (results from:(difference (sites Board) (sites Group at:(last To))) to:2 (* ### SUF: (count Sites in:(intersection (sites Board) (sites Group at:(from) if:(not (is In (to) (sites Group at:(last To))))))))))) (result Mover Win))))) ### MID: (to)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (add (hole (merge (shift 0 8 (rectangle 4 20)) (shift 8 0 (rectangle 20 4))) (poly {{8 8} {8 11} {11 11} {11 8}})) cells:{{8 28 48 68 69 70 71 51 31 11 10 9}}) vertices:{{9.5 4} {15 4} {15 9.5} {15 15} {9.5 15} {4 15} {4 9.5} {4 4}}) {(track "Track" {144 145 146 147 148 149 150 151} loop:True)} use:Vertex) (dice d:2 from:0 num:7) (piece "PIECE_ALPHA" Each (move (from (from) level:(level)) (to (trackSite Move from:(from) "Track" steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (remove (to) level:(level)))))))) (hand Each) (map "Throw" {(pair 0 7) (pair 1 10) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 25) (pair 6 36) (pair 7 14)}) (map "Entry" {(pair P1 144) (pair P2 148)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:4) (place Stack "PIECE_ALPHA2" (handSite P2) count:4)}) (play (do (roll) next:(or (if (is Occupied (handSite Mover)) (move (from (handSite Mover)) (to (trackSite Move from:(mapEntry "Entry" Mover) "Track" steps:(- (mapEntry "ThrowDiceValue" (count Pips)) 1)) (apply (if (is Enemy (who at:(to))) ### SUF: ))))) (forEach Piece)))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (forEach Level (to) FromTop (remove (to) level:(level)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:2) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:2) (sites Phase 1)))}) (play (priority (forEach Piece "PIECE_ALPHA" (move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (sites Direction from:(from) Diagonal distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))}) (apply (remember Value (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to)))))))) count:(size Stack at:(from)) stack:True (then (if (can Move (move (from (last To)) (to (sites Direction from:(from) (difference Diagonal (directions Cell from:(last To) to:(last From))) distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from: ### SUF: 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)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each)}) (rules (play (move Add (to (sites Empty)))) (end {(if (is Connected {(sites Side S) (sites Side NW) (sites Side NE)}) (result Mover Win)) (if (is Connected {(sites Side N) (sites Side SW) (sites Side SE)}) (result Mover Win)) (if (is Connected {(sites Side N) (sites Side S)}) (result Mover Loss)) (if (is Connected {(sites Side NW) (sites Side SE)}) (result Mover Loss)) ### SUF: }))) ### MID: (if (is Connected {(sites Side NE) (sites Side SW)}) (result Mover Loss))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (merge {(rectangle 3 3 diagonals:Alternating) (shift 0 -1 (rotate 180 (wedge 2))) (shift 0 2 (wedge 2)) (shift -1.5 0.5 (rotate 90 (wedge 2))) (shift 1.5 0.5 (rotate -90 (wedge 2)))}) edges:{{{1 1} {0 0}} {{1 1} {2 2}} {{1 1} {2 0}} {{1 1} {0 2}}}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (custodial (from (last To)) (between (max 1) if:(is Enemy (who at:(between))) ### SUF: ) (to if:(= (what at:(to)) (what at:(last To))))))))}) (rules (start {(place "PIECE_ALPHA1" {"A3" "B3" "B4" "B2"}) (place "PIECE_ALPHA2" {"D2" "D3" "E3" "D4"})}) (play (forEach Piece)) (end (if (<= (count Pieces Next) 1) (result Next Loss))))) ### MID: (apply (remove (between)))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:2) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:2) (sites Phase 1)))}) (play (priority (forEach Piece "PIECE_ALPHA" (move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (sites Direction from:(from) Diagonal distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))}) (apply (remember Value (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to)))))))) count:(size Stack at:(from)) stack:True (then (if (can Move (move (from (last To)) (to (sites Direction from:(from) (difference Diagonal (directions Cell from:(last To) to:(last From))) distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))})))) (moveAgain) (do (forEach Site (sites (values Remembered)) (remove (site) count:(size Stack at:(site)))) next:(and (if (or (and (is Odd (size Stack at:(last To))) (is In (last To) (sites (player (+ 1 (% (mover) 2)))))) (and (is Even (size Stack at:(last To))) (is In (last To) (sites (player (mover)))))) (add (to (last To)) stack:True)) (forget Value All)))))) top:True) (forEach Piece "PIECE_ALPHA" (move Step (from) (if (is Odd (size Stack at:(from))) (directions {FL FR}) (directions {BL BR})) (to if:(is Empty (to))) stack:True (then ### SUF: )) top:True))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (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))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (hand Shared size:16)}) (rules (start {(place "PIECE_ALPHA1" (handSite Shared 0)) (place "PIECE_ALPHA1" (handSite Shared 1) value:1) (place "PIECE_ALPHA1" (handSite Shared 2) state:1) (place "PIECE_ALPHA1" (handSite Shared 3) state:1 value:1) (place "PIECE_ALPHA2" (handSite Shared 4)) (place "PIECE_ALPHA2" (handSite Shared 5) value:1) (place "PIECE_ALPHA2" (handSite Shared 6) state:1) (place "PIECE_ALPHA2" ### SUF: state:1 value:1) (place "PIECE_BETA1" (handSite Shared 8)) (place "PIECE_BETA1" (handSite Shared 9) value:1) (place "PIECE_BETA1" (handSite Shared 10) state:1) (place "PIECE_BETA1" (handSite Shared 11) state:1 value:1) (place "PIECE_BETA2" (handSite Shared 12)) (place "PIECE_BETA2" (handSite Shared 13) value:1) (place "PIECE_BETA2" (handSite Shared 14) state:1) (place "PIECE_BETA2" (handSite Shared 15) state:1 value:1)}) phases:{(phase "Select" (play (move Select (from Cell (difference (sites Hand Shared) (sites Empty 1))))) (nextPhase "Place")) (phase "Place" (play (move (from Cell (last From)) (to (sites Empty)) (then (moveAgain)))) (end {(if (is Line 4 All whats:{(id "PIECE_ALPHA" P1) (id "PIECE_ALPHA" P2)}) (result Mover Win)) (if (is Line 4 All whats:{(id "PIECE_BETA" P1) (id "PIECE_BETA" P2)}) (result Mover Win)) (if (is Line 4 All P1) (result Mover Win)) (if (is Line 4 All P2) (result Mover Win)) (if (is Line 4 All whats:{(id "PIECE_ALPHA" P1) (id "PIECE_ALPHA" P2) (id "PIECE_BETA" P1) (id "PIECE_BETA" P2)} if:(= 0 (state at:(to)))) (result Mover Win)) (if (is Line 4 All whats:{(id "PIECE_ALPHA" P1) (id "PIECE_ALPHA" P2) (id "PIECE_BETA" P1) (id "PIECE_BETA" P2)} if:(= 1 (state at:(to)))) (result Mover Win)) (if (is Line 4 All whats:{(id "PIECE_ALPHA" P1) (id "PIECE_ALPHA" P2) (id "PIECE_BETA" P1) (id "PIECE_BETA" P2)} if:(= 0 (value Piece at:(to)))) (result Mover Win)) (if (is Line 4 All whats:{(id "PIECE_ALPHA" P1) (id "PIECE_ALPHA" P2) (id "PIECE_BETA" P1) (id "PIECE_BETA" P2)} if:(= 1 (value Piece at:(to)))) (result Mover Win))}) (nextPhase "Select"))})) ### MID: (handSite Shared 7)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 12) use:Vertex) (piece "PIECE_ALPHA" Each) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)})}) (rules (meta (swap)) (play (if (< 0 (count MovesThisTurn)) (do (move Add (to (sites Around (sites Occupied by:Mover) Empty) (apply (set Var "NumberOfFriendlyGroupsBeforePlacement" (count Groups Orthogonal if:(is Mover (who at:(to)))))))) ifAfterwards:(< (count Groups Orthogonal if:(is Mover (who at:(to)))) (var "NumberOfFriendlyGroupsBeforePlacement"))) (move Add (to (sites Empty))) (then (if (can Move (do (move Add ### SUF: ) ifAfterwards:(< (count Groups Orthogonal if:(is Mover (who at:(to)))) (var "NumberOfFriendlyGroupsBeforePlacement")))) (moveAgain))))) (end (if (is Connected Orthogonal Mover) (result Mover Win))))) ### MID: (to (sites Around (sites Occupied by:Mover) Empty) (apply (set Var "NumberOfFriendlyGroupsBeforePlacement" (count Groups Orthogonal if:(is Mover (who at:(to)))))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Diamond 11)) (piece "PIECE_ALPHA" Each) (regions P1 {(sites Side NE) ### SUF: }) (regions P2 {(sites Side NW) (sites Side SE)})}) (rules (meta (swap)) (play (move Add (to (sites Empty)))) (end (if (is Connected Diagonal Mover) (result Mover Win))))) ### MID: (sites Side SW)
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Neutral) (regions P1 (difference (union (sites Bottom) (sites Top)) (union (sites Right) (sites Left)))) (regions P2 (difference (union (sites Right) (sites Left)) (union (sites Bottom) ### SUF: )))}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2)) (place "PIECE_ALPHA0" (difference (sites Board) (union (sites P1) (sites P2))))}) phases:{(phase "Init" (play (move Select (from (difference (sites Board) (union (sites P1) (sites P2)))) (then (remove (last To))))) (nextPhase "Remove")) (phase "Remove" (play (move Select (from (sites Around (last To)) if:(is Occupied (from))) (then (remove (last To))))))} (end {(if (no Pieces P1) (result P1 Loss)) (if (no Pieces P2) (result P2 Loss)) (if (no Moves Next) (byScore {(score P1 (count Pieces P1)) (score P2 (count Pieces P2))}))}))) ### MID: (sites Top)
### 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))) ### SUF: ) (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (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: (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))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (square 3) edges:{{0 1} {1 2}}) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (sites Left)) (place "PIECE_BETA2" (sites Right))}) ### SUF: (end {(if (no Moves P1) (result P2 Win)) (if (and (all Sites (difference (sites Occupied by:P2) (sites Bottom)) if:(= 0 (count at:(site)))) (no Moves P2)) (result P1 Win))}))) ### MID: (play (forEach Piece))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 12)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 5 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 5 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) ### 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 Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (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)))))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Limping 3) use:Cell) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2)}) (rules (start (set Score Each 0)) (play (or {(move Pass) (move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in: ### SUF: ))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))) (forEach Piece (or (move Step (to if:(and (is Empty (to)) (< (count Pieces Mover in:(sites Around (from))) (- (count Pieces Mover in:(sites Around (to))) 1)))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))) (if (and (not (was Pass)) (not (can Move (move Step (to if:(and (is Empty (to)) (< (count Pieces Mover in:(sites Around (from))) (- (count Pieces Mover in:(sites Around (to))) 1)))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2))))))))) (move Step (to if:(and (is Empty (to)) (> (count Pieces Next in:(sites Around (from))) (count Pieces Next in:(sites Around (to)))))) (then (do (forEach Site (sites Board) (apply if:(and (is Next (who at:(site))) (= 0 (count Sites in:(intersection (sites Empty) (sites Around (site) includeSelf:True))))) (remove (site)))) next:(and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2)))))))))})) (end {(if (and (all Passed) (> (score Mover) (score Next))) (result Mover Win)) (if (and (all Passed) (<= (score Mover) (score Next))) (result Next Win))}))) ### MID: (intersection (sites LineOfSight Piece at:(to)) (sites Direction from:(to) distance:3))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (remove (add (merge {(rotate 30 (tri 2)) (shift 0.2 0 (rotate -30 (tri 2)))}) vertices:{{0.6 0.3}}) edges:{{0 2} {0 1} {1 2} {3 5} {5 4} {4 3}}) vertices:{{0.6 0.625} {0.915 0.3} {0.285 0.3} {0.6 -0.01} {0.285 0.1725} {0.285 0.4375} {0.915 0.4375} {0.915 0.1725} {0.75 0.075} {0.45 0.075} {0.75 0.535} {0.45 0.535}} edges:{{1 13} {13 17} {17 7} {7 2} {2 12} {12 9} {9 11} {11 0} {5 13} {13 8} {8 14} {14 4} {1 14} {14 15} {15 10} {10 0} {5 7} {7 18} {18 12} {12 3} {3 11} {11 16} {16 10} {10 4} {0 16} {16 6} {6 17} {17 5} {4 15} {15 6} {6 18} {18 2} {3 9} {9 6} {6 8} {8 1}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:9)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move ### SUF: (to (difference (sites Empty) (sites Centre))) (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 (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: (from (handSite Mover))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (play (or (do (move Add (to (sites Empty))) ifAfterwards:(> (count Liberties Orthogonal) 0) (then (enclose (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (and (addScore Mover 1) (remove (between)))))))) (move Pass))) (end (if (all Passed) (byScore {(score P1 (+ (score P1) (size Territory P1))) (score P2 ### SUF: )}))))) ### MID: (+ (score P2) (size Territory P2))
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) ### SUF: }) (rules (play (move Add (piece "PIECE_ALPHA") (to (sites Empty) if:(all Sites (sites Direction from:(to) Adjacent) if:(is Empty (site)))))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (piece "PIECE_ALPHA" Shared)