text
stringlengths 218
3.08k
|
---|
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (piece "PIECE_ALPHA" Each (or (move Slide) (move Slide Diagonal (between if:(is Empty (between))) (to if:(and (is Empty (to)) (= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site)))))) (apply if:(or (= (between) (to)) (!= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site))))))))) (then (moveAgain)))) (piece "PIECE_BETA" Neutral)}) (rules (start {(place "PIECE_ALPHA1" {"B2" "G2" "E5" "B7"}) (place "PIECE_ALPHA2" {"L12" "G12" "L7" "I9"})}) phases:{(phase "Opening" P1 (play (forEach Piece (or (move Slide) (move Slide Diagonal (between if:(is Empty (between))) (to if:(and (is Empty (to)) (= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site)))))) (apply if:(or (= (between) (to)) (!= 2 (count Sites in:(forEach (intersection (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site)))))))))))) (nextPhase Mover "Playing")) (phase "Playing" (play (if (is Prev Mover) (or (move Shoot (piece "PIECE_BETA0")) (move Shoot (piece "PIECE_BETA0") Diagonal (between if:(is Empty (between))) (to if:(and (is Empty (to)) (!= 2 (count Sites in:(forEach (intersection ### SUF: (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site))))))))) (forEach Piece))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) ### SUF: (shift 7 6 (rectangle 1 6))}) {(track "Track1" {0 1 2 3 4 5 6 7 8 9 10 11 23 22 21 20 19 18 17 16 15 14 13 12 -2} P1 directed:True) (track "Track2" {12 13 14 15 16 17 18 19 20 21 22 23 11 10 9 8 7 6 5 4 3 2 1 0 -2} P2 directed:True)} use:Vertex) (dice d:6 num:3) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -2) (move Remove (from)) (move (from) (to (trackSite Move steps:(pips)) if:(< (size Stack at:(trackSite Move steps:(pips))) 2) (apply (if (is Enemy (who at:(to))) (remove (to))))))))) (map "StartTrack" {(pair P1 0) (pair P2 12)})}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {0 1 2 3 4 5}) count:2 state:1) (place Stack "PIECE_ALPHA2" (sites {12 13 14 15 16 17}) count:2 state:1)}) phases:{(phase "UnStacking" (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 1) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and {(set State at:(last To) 0) (if (not (all DiceUsed)) (moveAgain))}))))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(site)) 1))) "BearingOff")) (phase "BearingOff" (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Piece top:True) (then (if (and (not (was Pass)) (not (all DiceUsed))) (moveAgain))))))} (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (shift 0 6 (rectangle 1 6)) |
### PRE: (game "GAME_NAME" (players {(player S) (player N)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 (or (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (then (if (is In (last To) (sites Mover "Promotion")) (and ### SUF: (fromTo (from (last To)) (to (last From)))))))) (piece "PIECE_GAMMA" P1 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" P1 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" P1 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ZETA" P1 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" P1 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" P2 (or (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites Around (where "King-noCross" Next))))) (apply (remove (to))))) (move Slide (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites Around (where "King-noCross" Next)))) (remove (to))))))) (regions "Promotion" P1 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 6)) (place "PIECE_GAMMA1" {"A8" "H8"}) (place "PIECE_ZETA1" {"B8" "G8"}) (place "PIECE_EPSILON1" {"C8" "F8"}) (place "PIECE_BETA1" coord:"E8") (place "PIECE_DELTA1" coord:"D8") (place "PIECE_DELTA2" coord:"E1")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Mover))))) (end (if (and (is Threatened (id "PIECE_DELTA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Next))))))) (result Mover Win))))) ### MID: (promote (last To) (piece "PIECE_BETA") Mover) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each (move Step (to if:(and (or (= (id Neutral) (who at:(to))) (is Empty (to))) (= 1 (- (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (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 (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral))))))))) (apply (if (is Occupied (to)) (and (remove (to)) (addScore Mover 1))))))) (piece "PIECE_ALPHA" Neutral)}) (rules (start {(place "PIECE_ALPHA0" (difference (sites Board) (sites Corners))) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) NNW)) ### SUF: (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: (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) E)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5 diagonals:Solid) use:Vertex) ### SUF: }) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Board) if:(< (site) (centrePoint)))) (place "PIECE_ALPHA2" (forEach (sites Board) if:(> (site) (centrePoint))))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (piece "PIECE_ALPHA" Each (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 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 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 5 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (or (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (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 Hop (from (last To)) (if (is In (last To) (sites Outer)) (difference Diagonal OppositeDirection) SameDirection) (between before:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (if (is In (last To) (sites Outer)) (difference Diagonal OppositeDirection) SameDirection) (between before:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or (forEach Piece "PIECE_ALPHA" (or ### SUF: (move Step Diagonal (to if:(is Empty (to)))))) (forEach Piece "PIECE_BETA" (or (move Hop Diagonal (between before:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (if (is In (last To) (sites Outer)) (difference Diagonal OppositeDirection) SameDirection) (between before:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))) (move Slide (directions Diagonal))))) (then (if (and (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (is In (last To) (sites Next))) (promote (last To) (piece "PIECE_BETA") Mover))))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (if (= (where "PIECE_BETA" Mover) -1) (promote (last To) (piece "PIECE_BETA") Mover) (remove (last To))))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (move Step Diagonal (to if: ### SUF: (apply (remove (to)))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ETA" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "PIECE_ETA" Next))))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (board (square 10))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 2)) (place "PIECE_ALPHA2" (sites Row 7)) (place "PIECE_ZETA1" (sites {"A1" "J1"})) (place "PIECE_ZETA2" (sites {"A10" "J10"})) (place "PIECE_DELTA1" (sites {"B1" "I1"})) (place "PIECE_DELTA2" (sites {"B10" "I10"})) (place "PIECE_ETA1" (sites {"C1" "H1"})) (place "PIECE_ETA2" (sites {"C10" "H10"})) (place "PIECE_EPSILON1" (sites {"D1" "G1"})) (place "PIECE_EPSILON2" (sites {"D10" "G10"})) (place "PIECE_BETA1" coord:"E1") (place "PIECE_BETA2" coord:"F10") (place "PIECE_GAMMA1" coord:"F1") (place "PIECE_GAMMA2" coord:"E10")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover))))) (end {(if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (not (is Friend (who at:(to)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (regions "AllSites" (sites Board)) (regions "Arc" P1 (sites {1 2 3 4 5})) (regions "Arc" P2 (sites {41 42 43 44 45})) (dice d:2 facesByDie:{{0 4} {0 6} {0 14} {0 15}} num:4) (piece "PIECE_ALPHA" Each (if (or (!= (from) (handSite Mover)) (and (= (from) (handSite Mover)) (all Sites (sites Occupied by:Mover) if:(not (is In (site) (sites Mover "Arc")))))) (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -2) (move Remove (from)) (if (!= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -1) (if (not (is Friend (who at:(trackSite Move steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next))))))))))) (hand Each) (map "Throw" {(pair 0 10) (pair 39 5) (pair 24 3) (pair 25 3) (pair 35 3) (pair 33 3) (pair 10 2) (pair 18 2) (pair 19 2) (pair 20 2) (pair 21 2) (pair 29 2)})}) (rules (start (place "PIECE_ALPHA" "Hand" count:2)) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (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) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- 7 3) 2) (rectangle 3 7 diagonals:Alternating)) (shift (/ (- 7 3) 2) 0 (rectangle 7 3 diagonals:Alternating))) use:Vertex) (hand P1) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" ### SUF: ) (place "PIECE_ALPHA1" (handSite P1))}) 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: (union (expand (sites Bottom)) (sites Row 2)) |
### 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)) (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 {(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 ### SUF: at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (between) |
### PRE: (game "GAME_NAME" (players 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)) (count Sites in: ### 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: (forEach (sites Centre) if:(is Occupied (site))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N (or {(move Step Forward (to if:(is Empty (to)))) (move Step Forward (to if:(and (is Enemy (who at:(to))) (is Hidden at:(to) to:Mover))) (then (fromTo (from (last To)) (to (last From)) (then (and {(add (piece (next)) (to (last To))) (set Hidden at:(last To) False to:Next) (set Hidden at:(last To) False to:Mover)}))))) (move Step (directions {FR FL}) (to if:(is Empty (to)) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (set Hidden at:(last To) to:Next)))})) (piece "PIECE_ALPHA" P2 S ### SUF: ) (regions P2 (sites Top)) (regions P1 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top))) (set Hidden (difference (sites Board) (sites Occupied by:P1)) to:P1) (set Hidden (difference (sites Board) (sites Occupied by:P2)) to:P2)}) (play (forEach Piece)) (end (if (not (= (count Sites in:(sites Occupied by:Mover)) (count Sites in:(difference (sites Occupied by:Mover) (sites Next))))) (result Mover Win))))) ### MID: (or {(move Step Forward (to if:(is Empty (to)))) (move Step Forward (to if:(and (is Enemy (who at:(to))) (is Hidden at:(to) to:Mover))) (then (fromTo (from (last To)) (to (last From)) (then (and {(add (piece (next)) (to (last To))) (set Hidden at:(last To) False to:Next) (set Hidden at:(last To) False to:Mover)}))))) (move Step (directions {FR FL}) (to if:(is Empty (to)) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (set Hidden at:(last To) to:Next)))}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (hand Each size:2) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (regions "HomeP1" P1 (difference (expand (sites Bottom) steps:1) (union (sites Side E) (sites Side W)))) (regions "HomeP2" P2 (difference (expand (sites Top) steps:1) (union (sites Side E) (sites Side W)))) (regions "EscapeP1" P1 {30 35}) (regions "EscapeP2" P2 {0 5}) (map "Where" {(pair (id "PIECE_ALPHA" P1) (handSite P1)) (pair (id "PIECE_BETA" P1) (handSite P1 1)) (pair (id "PIECE_ALPHA" P2) (handSite P2)) ### SUF: })}) (rules (start {(place "PIECE_ALPHA1" 36 count:4) (place "PIECE_BETA1" 37 count:4) (set Hidden (sites Hand P1) to:P2) (place "PIECE_ALPHA2" 38 count:4) (place "PIECE_BETA2" 39 count:4) (set Hidden (sites Hand P2) to:P1)}) phases:{(phase "Placement" (play (move (from (sites Occupied by:Mover container:(mover))) (to (forEach (sites Mover "Home") if:(is Empty (site)))) (then (if (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) (and {(set Hidden (sites P2 "Home") False to:P1) (set Hidden (sites P1 "Home") False to:P2) (set Hidden What (sites P2 "Home") to:P1) (set Hidden What (sites P1 "Home") to:P2)}))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece {"PIECE_ALPHA" "PIECE_BETA"} (or (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (add (piece (what at:(to))) (to (mapEntry "Where" (what at:(to))))))))) (move Select (from (intersection (sites Occupied by:Mover component:"PIECE_ALPHA") (sites Mover "Escape"))) (then (trigger "Escaped" (mover))))))) (end {(if (or {(no Pieces Mover "PIECE_BETA" in:(sites Board)) (no Pieces Next "PIECE_ALPHA" in:(sites Board)) (is Triggered "Escaped" Mover)}) (result Mover Win)) (if (or (no Pieces Next "PIECE_BETA" in:(sites Board)) (no Pieces Mover "PIECE_ALPHA" in:(sites Board))) (result Mover Loss))}))})) ### MID: (pair (id "PIECE_BETA" P2) (handSite P2 1)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) (shift 0 6 (rectangle 1 6)) (shift 7 6 (rectangle 1 6))}) {(track "Track1" {24 23 22 21 20 19 18 -2} P1 directed:True) (track "Track2" {25 23 22 21 20 19 18 -2} P2 directed:True)} use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (or (forEach Die replayDouble:True if:(!= (pips) 0) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo ### SUF: (to (handSite Next)))))) (then (if (not (all DiceUsed)) (moveAgain)))) (if (is Empty (handSite Mover)) (forEach Die replayDouble:True if:(and (!= (pips) 0) (= (trackSite Move from:(from) steps:(pips)) -2)) (move Remove (from)) (then (if (not (all DiceUsed)) (moveAgain))))))) (hand Each)}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:15) (place Stack "PIECE_ALPHA2" (handSite P2) count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (from (to)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 6 10) {(track "Track1" "0,E,N1,W,N1,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "59,W,S1,E,S1,W,S1,E,S1,W,S1,E" P2 directed:True)}) (piece "PIECE_ALPHA" Each (if (= (state at:(from)) 1) (or (if (!= (trackSite Move steps:(mapEntry (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1)))))))) (if (!= (trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))) -1) (if (is Enemy (who at:(trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))))) (move (from) (to (trackSite Move steps:(+ (value Player Mover) (mapEntry (count Pips)))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) (then (set Value Mover 0)))))))) (dice d:2 from:0 num:3) (map {(pair 1 1) (pair 2 2) (pair 3 4) ### SUF: })}) (rules (start {(place "PIECE_ALPHA1" (union (intersection (sites Bottom) (expand (sites Left) steps:2)) (intersection (sites Bottom) (expand (sites Right) steps:2)))) (place "PIECE_ALPHA2" (union (intersection (sites Top) (expand (sites Left) steps:2)) (intersection (sites Top) (expand (sites Right) steps:2))))}) (play (do (roll) next:(if (= (mapEntry (count Pips)) 1) (or (move Pass (then (and (if (> (value Player Mover) 0) (set Value Mover (+ 1 (value Player Mover))) (set Value Mover 1)) (moveAgain)))) (move Select (from (sites Occupied by:Mover) if:(= (state at:(from)) 0)) (then (and (set State at:(last From) 1) (moveAgain))))) (if (= (mapEntry (count Pips)) 2) (forEach Piece) (forEach Piece (then (moveAgain))))))) (end (if (and (= (count Sites in:(difference (sites Occupied by:P1) (sites Top))) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites Bottom))) 0)) (byScore))))) ### MID: (pair 0 6) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (add (merge {(rectangle 3 5) (shift 1 0 (scale 0.5 (rectangle 5 1))) (shift 3 0 (scale 0.5 (rectangle 5 1))) (shift -1 1 (rectangle 1 7))}) edges:{{0 15} {15 7} {7 18} {18 14} {17 4} {7 17} {7 16} {16 10} {19 10} {0 19} {20 14} {20 4} {12 16} {16 5} {5 15} {15 2} {2 17} {17 9} {9 18} {18 12}}) edges:{{11 6} {6 1} {13 8} {8 3}}) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if: ### SUF: ))) (piece "PIECE_BETA" P2 E (move Step Forwards (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" coord:"C3") (place "PIECE_BETA2" (sites {"B3" "B1" "A3" "B5"}))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win))}))) ### MID: (is Empty (to)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 4 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (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)) ### SUF: ))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (promote (last To) (piece "PIECE_BETA") Mover) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (rectangle 4 20) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "79,W,S1,E,S1,W,S1,E" P2 directed:True) (track "Track3" "0,E,N1,W,N1,E,N1,W" P3 directed:True) (track "Track4" "79,W,S1,E,S1,W,S1,E" P4 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:8) (map "Throw" {(pair 0 8) (pair 1 1) (pair 2 6) (pair 3 5) (pair 4 4) (pair 5 5) (pair 6 6) (pair 7 1) (pair 8 8)}) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (regions "Home" P3 (sites Bottom)) (regions "Home" P4 (sites Top))}) (rules (start {(set Team 1 {P1 P3}) (set Team 2 {P2 P4}) (place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (roll) next:(if (or (is Mover P1) (is Mover P3)) (forEach Site (sites Occupied by:Team1) (move (from (site)) (to (trackSite Move steps:(mapEntry (count Pips))) if:(and (or (is Empty (to)) (and (not (is In (to) (sites Next "Home"))) (is Enemy (who at:(to))))) (= 1 (count Sites in:(intersection (sites Occupied by:Team1) (sites Track Mover "Track" from:(from) to:(trackSite Move steps:(mapEntry (count Pips)))))))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (forEach Site (sites Occupied by:Team2) (move (from (site)) (to (trackSite Move steps:(mapEntry (count Pips))) if:(and (or (is Empty (to)) (and ### SUF: (is Enemy (who at:(to))))) (= 1 (count Sites in:(intersection (sites Occupied by:Team2) (sites Track Mover "Track" from:(from) to:(trackSite Move steps:(mapEntry (count Pips)))))))) (apply if:(is Enemy (who at:(to))) (remove (to))))))) (then (if (is In (mapEntry (count Pips)) (sites {1 4})) (moveAgain))))) (end (if (and (= 0 (count Sites in:(difference (sites Occupied by:Team1) (sites P2 "Home")))) (= 0 (count Sites in:(difference (sites Occupied by:Team2) (sites P1 "Home"))))) {(if (= (count Sites in:(sites Occupied by:Team1)) (count Sites in:(sites Occupied by:Team2))) (result Mover Draw)) (if (< (count Sites in:(sites Occupied by:Team1)) (count Sites in:(sites Occupied by:Team2))) (result Team2 Win)) (if (> (count Sites in:(sites Occupied by:Team1)) (count Sites in:(sites Occupied by:Team2))) (result Team1 Win))})))) ### MID: (not (is In (to) (sites Next "Home"))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) ### SUF: ) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (apply (remove (between))) |
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 2) (equipment {(board (add (scale 15 1 (rectangle 32 2)) edges:{{0 3} {2 5} {4 7} {6 9} {8 11} {10 13} {12 15} {14 17} {16 19} {18 21} {20 23} {22 25} {24 27} {26 29} {28 31} {30 33} {32 35} {34 37} {36 39} {38 41} {40 43} {42 45} {44 47} {46 49} {48 51} {50 53} {52 55} {54 57} {56 59} {58 61} {60 63}}) use:Vertex) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P1 (move Step (to if:(and (is Empty (to)) (>= 1 (- (from) (to)))))))}) (rules (start {(place "PIECE_ALPHA2" 1) (place "PIECE_BETA1" (sites {0 3}))}) (play (forEach Piece)) (end {(if (and (is Mover P2) (= 1 (where "PIECE_ALPHA2" P2))) (result P2 Win)) (if (= 62 (where "PIECE_ALPHA2" P2)) (result P1 Win))}))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (meta (swap)) (play (or (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty))) ifAfterwards:(or (not (all Sites (sites Around (last To) Enemy Orthogonal) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Next (who at:(to)))))))) (not (all Sites ### SUF: if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))))))) (then (and (forEach Site (sites Around (last To) Enemy Orthogonal) (if (= 0 (count Liberties at:(site) Orthogonal if:(is Next (who at:(to))))) (remove (sites Group at:(site) Orthogonal if:(is Next (who at:(to))))))) (forEach Site (sites Around (last To) Own Orthogonal) (if (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))) (remove (sites Group at:(site) Orthogonal if:(is Mover (who at:(to)))))))))) (do (move Add (to (sites Empty))) ifAfterwards:(not (or (not (all Sites (sites Around (last To) Enemy Orthogonal) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Next (who at:(to)))))))) (not (all Sites (sites Around (last To) Own Orthogonal includeSelf:True) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))))))))))) (end {(if (and (> (count Moves) 2) (no Pieces Next)) (result Next Loss)) (if (and {(> (count Moves) 2) (no Pieces Mover) (not (no Pieces Next))}) (result Mover Loss))}))) ### MID: (sites Around (last To) Own Orthogonal) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (square 9) edges:{{0 10} {10 20} {20 30} {30 40} {40 50} {50 60} {60 70} {70 80} {8 16} {16 24} {24 32} {32 40} {40 48} {48 56} {56 64} {64 72} {4 12} {12 20} {20 28} {28 36} {36 46} {46 56} {56 66} {66 76} {76 68} {68 60} {60 52} {52 44} {44 34} {34 24} {24 14} {14 4}}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (hand P2)}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:4) (sites {36 37 38 39 40}))) ### SUF: }) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:4) (sites {40 41 42 43 44}))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "PIECE_ALPHA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (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: ### SUF: )) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_ZETA") Mover))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_EPSILON1" (sites Row 1)) (place "PIECE_EPSILON2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end (if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) {(if (no Pieces Next "PIECE_EPSILON") (result Mover Win)) (if (!= (count Pieces Next "PIECE_EPSILON") 0) (result Mover Draw))})))) ### MID: (is Empty (to)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 11)) (regions "Fortresses" (sites Corners)) (piece "PIECE_ALPHA" P1 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (or {(custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA2")) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_BETA" P2)) (apply (trigger "Surrounded" P2))) ### SUF: )})))) (piece "PIECE_ALPHA" P2 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1")) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (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")) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))))))}) (rules (start {(place "PIECE_ALPHA1" {"D1" "E1" "F1" "G1" "H1" "F2" "A4" "A5" "A6" "A7" "A8" "B6" "K4" "K5" "K6" "K7" "K8" "J6" "F10" "D11" "E11" "F11" "G11" "H11" "F10"}) (place "PIECE_ALPHA2" {"F3" "F4" "F5" "C6" "D6" "E6" "G6" "H6" "I6" "F7" "F8" "F9"}) (place "PIECE_BETA2" (centrePoint))}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA2") in:(sites Outer)) (result P2 Win)) (if (is Triggered "Surrounded" P2) (result P1 Win))}))) ### MID: (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" P2 (move Step (if (= (value Player Mover) 1) (directions {S SE SW E W}) (directions {N NE NW E W})) (to if:(is Empty (to))))) (piece "PIECE_BETA" P1 (or (move Hop (from (from)) Adjacent (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)))) (move Step ### SUF: )))}) (rules (start {(place "PIECE_ALPHA2" (union (intersection (union (sites Left) (sites Right)) (sites Row 2)) (expand (sites Bottom)))) (place "PIECE_BETA1" (sites Centre))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) Adjacent (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)))) (move Pass)) (forEach Piece) (then (if (not (can Move (forEach Piece (move Step (if (= (value Player P2) 1) (directions {S SE SW}) (directions {N NE NW})) (to if:(is Empty (to)))) P2))) (set Value P2 (if (= (value Player P2) 1) 0 1)))))) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (to if:(is Empty (to))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 12)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 5 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 5 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (or (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) ### SUF: (move Hop (from (last To)) (if (is In (last To) (sites Outer)) (difference Diagonal OppositeDirection) SameDirection) (between before:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (if (is In (last To) (sites Outer)) (difference Diagonal OppositeDirection) SameDirection) (between before:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or (forEach Piece "PIECE_ALPHA" (or (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)))) (move Step Diagonal (to if:(is Empty (to)))))) (forEach Piece "PIECE_BETA" (or (move Hop Diagonal (between before:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (if (is In (last To) (sites Outer)) (difference Diagonal OppositeDirection) SameDirection) (between before:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))) (move Slide (directions Diagonal))))) (then (if (and (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (is In (last To) (sites Next))) (promote (last To) (piece "PIECE_BETA") Mover))))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (or (or (move Add (piece (id "PIECE_ALPHA" P2)) (to (sites Empty)) (then (if (< (count MovesThisTurn) 2) (moveAgain)))) (move Set NextPlayer (player (next)))) (if (= (count MovesThisTurn) 0) (move Pass (then (if (is Mover P1) (swap Players P1 P2 (then (note "Player 1 is now Black. Player 2 is now White." to:All))) (note "Player 1 remains White. Player 2 remains Black." to:All) (then (do (set NextPlayer (player 1)) next:(set Var 1))))))))) (nextPhase (= 1 (var)) "Playing")) (phase "Playing" (play (move Add (to (sites Empty)))))} (end {(if ### SUF: (result Mover Win)) (if (and {(= (id P2) (mover)) (or (is Connected Orthogonal {(sites Side N) (sites Side S)}) (is Connected Orthogonal {(sites Side E) (sites Side W)}))}) (result P2 Win)) (if (and {(= (id P1) (mover)) (is Connected All {(sites Side N) (sites Side S) (sites Side E) (sites Side W)})}) (result P1 Win))}))) ### MID: (and (not (= 1 (var))) (or (is Connected Orthogonal {(sites Side N) (sites Side S)}) (is Connected Orthogonal {(sites Side E) (sites Side W)}))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:2) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) ### SUF: ))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:6)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (forEach Piece))))} (end (if (<= (count Pieces Next) 2) (result Mover Win))))) ### MID: (moveAgain) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 4 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (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 ### SUF: (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) |
### 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))) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:6)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move (from (handSite Mover)) (to ### SUF: ) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (sites Empty) |
### PRE: (game "GAME_NAME" (players {(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 ### SUF: ))))})) (piece "PIECE_BETA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" coord:"E1") (place "PIECE_BETA2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_BETA" Mover))))) (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))))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (sites Empty)))) (nextPhase "Playing")) (phase "Playing" (play (move Add (to (sites Empty)) (then (if (is Even (count Moves)) (moveAgain))))) (nextPhase "Playing"))} ### SUF: )) ### MID: (end (if (is Line 6 All) (result Mover Win))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (merge (shift 0 2 (square 5 diagonals:Alternating)) (wedge 3)) (rotate 45 (shift 1.5 6.2 (square 2 diagonals:Solid)))) use:Vertex) (hand P1) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_BETA2" (sites {"C3" "C7"})) (place "PIECE_ALPHA1" (difference (expand (sites Centre)) (centrePoint))) (place "PIECE_ALPHA1" (handSite P1) count:16)}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} ### SUF: )) ### MID: (end {(if (no Moves P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win))}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (play (move Add (to (sites Empty)))) (end {(if (is Line 5 All) (result Mover Win)) ### SUF: }))) ### MID: (if (is Line 4 All) (result Mover Loss)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- (* 3 3) 3) 2) (rectangle 3 (* 3 3))) (shift (/ (- (* 3 3) 3) 2) 0 (rectangle (* 3 3) 3))) use:Cell) (hand Each) (piece "PIECE_ALPHA" Each ### SUF: )}) (rules (start (place "PIECE_ALPHA" "Hand" count:6)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (expand (sites Centre) steps:(- (/ 3 2) (if (is Even 3) 1 0))))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between (range 1 6) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8) {(track "Track1" "3,E,N,W,S,E1,N6,E5,S5,W4,N4,E3,S3,W1" 1 directed:True) (track "Track2" "60,W,S,E,N,W1,S6,W5,N5,E4,S4,W3,N3,E1" 2 directed:True) (track "Track3" "31,N,W,S,E,N1,W6,N5,E5,S4,W4,N3,E3,S1" 3 directed:True) (track "Track4" "32,S,E,N,W,S1,E6,S5,W5,N4,E4,S3,W3,N1" 4 directed:True)}) (dice d:2 from:0 num:4) (hand Each) (map "DieValue" {(pair 4 8)}) (map "Entry" {(pair P1 "D1") (pair P2 "E8")}) (map "Exit" {(pair P1 "E3") (pair P2 "D6")}) (regions "Protect" (sites {"A1" "A4" "A5" "A8" "D1" "D4" "D5" "D8" "E1" "E4" "E5" "E8" "H1" "H4" "H5" "H8"})) (piece "PIECE_ALPHA" Each (if (!= (trackSite Move steps:(mapEntry "DieValue" (count Pips))) -1) (if (if (is In (trackSite Move steps:(mapEntry "DieValue" (count Pips))) (sites "Protect")) (not (is Enemy (who at:(trackSite Move steps:(mapEntry "DieValue" (count Pips)))))) True) (move (from) (to (trackSite Move steps:(mapEntry "DieValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:2) (place "PIECE_ALPHA2" (handSite P2) count:2)}) (play (do (if (not (is Prev Mover)) (roll)) next: ### SUF: )) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (if (is Prev Mover) (or (forEach Piece (if (= (from) (mapEntry "Exit" Mover)) (move Remove (from)) (if (!= (trackSite Move steps:1) -1) (if (if (is In (trackSite Move steps:1) (sites "Protect")) (not (is Enemy (who at:(trackSite Move steps:1)))) True) (move (from) (to (trackSite Move steps:1) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))))) (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (mapEntry "Entry" Mover) if:(not (is Enemy (who at:(to)))))))) (if (can Move (forEach Piece)) (forEach Piece (then (if (= (count Pips) 3) (moveAgain)))) (move Pass (then (if (= (count Pips) 3) (moveAgain)))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10)) (piece "PIECE_ALPHA" Each (move Slide Orthogonal (to (apply if:(all Sites (sites Around ### SUF: ) if:(!= (what at:(site)) (id "PIECE_GAMMA" Next))))))) (piece "PIECE_BETA" Each (move Slide All (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_ALPHA" Next))))))) (piece "PIECE_GAMMA" Each (move Slide Diagonal (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_BETA" Next))))))) (regions "Water" (sites {"D4" "D7" "G4" "G7"}))}) (rules (start {(place "PIECE_BETA1" (sites {"E1" "F1"})) (place "PIECE_GAMMA1" (sites {"D2" "G2"})) (place "PIECE_ALPHA1" (sites {"E2" "F2"})) (place "PIECE_BETA2" (sites {"E10" "F10"})) (place "PIECE_GAMMA2" (sites {"D9" "G9"})) (place "PIECE_ALPHA2" (sites {"E9" "F9"}))}) (play (priority {(and {(forEach Piece "PIECE_ALPHA" (if (is In (from) (sites Around (sites Occupied by:Next component:"PIECE_GAMMA"))) (move Slide Orthogonal (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_GAMMA" Next)))))))) (forEach Piece "PIECE_BETA" (if (is In (from) (sites Around (sites Occupied by:Next component:"PIECE_ALPHA"))) (move Slide All (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_ALPHA" Next)))))))) (forEach Piece "PIECE_GAMMA" (if (is In (from) (sites Around (sites Occupied by:Next component:"PIECE_BETA"))) (move Slide Diagonal (to (apply if:(all Sites (sites Around (to)) if:(!= (what at:(site)) (id "PIECE_BETA" Next))))))))}) (forEach Piece)})) (end (if (= 3 (count Sites in:(intersection (sites Occupied by:Mover) (sites "Water")))) (result Mover Win))))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 3) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each (move Slide Orthogonal (to (apply if:(!= (mover) (mapEntry "PlayerPhase" (phase of:(to)))))) (then (and {(forEach Site (sites Around (last To) Orthogonal) (if (is Enemy (what at:(site))) (remove (site)))) (set Var (mapEntry "PlayerPhase" (phase of:(last To)))) (moveAgain)})))) (map "PlayerPhase" {(pair 1 1) (pair 0 2) (pair 2 3)})}) (rules (start {(place "PIECE_ALPHA1" (expand origin:(coord "A5") steps:2)) (place "PIECE_ALPHA2" (expand origin:(coord "I9") steps:2)) (place "PIECE_ALPHA3" (expand origin:(coord "E1") steps:2))}) (play (if (is Prev Mover) (move Add (piece (if (= (mover) 1) (if (= (var) 2) 3 2) (if ### SUF: (if (= (var) 1) 3 1) (if (= (var) 1) 2 1)))) (to (sites Empty)) (then (set NextPlayer (player (var))))) (max Captures (forEach Piece)))) (end (if (or {(no Pieces P1) (no Pieces P2) (no Pieces P3)}) (byScore {(score P1 (count Pieces P1)) (score P2 (count Pieces P2)) (score P3 (count Pieces P3))}))))) ### MID: (= (mover) 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))))))) (piece "PIECE_BETA" (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (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_GAMMA" (move Slide Diagonal (between if:(or (is In (between) (sites Around (from))) (is Empty (between)))) (to if:(and (not (= (what at:(to)) (id "PIECE_GAMMA" Next))) (is Enemy (who at:(to)))) (apply if:(not (is In ### SUF: (sites Around (from)))) (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ZETA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (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"}) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1") (place "PIECE_EPSILON2" {"A8" "H8"}) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8")}) (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 Loss))}))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (rotate 30 (dual (tiling T3636 5))) cells:{0 4 5 73 81 97 142 143 152})) (tile "Rhombus" Each)}) (rules (play (move Select (from (sites Empty) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))) (to (sites Around (from) Empty Orthogonal) if:(not (all Sites (sites Around (to) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from)))))) (then (do (forEach Site (forEach (sites Empty) if:(and {(= ### SUF: (count Sites in:(sites Around (site) Enemy Orthogonal))) (not (can Move (move Select (from (sites Around (site) Empty Orthogonal) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))))))})) (set State at:(site) 1)) next:(do (add (to (intersection (sites Around (last From) Orthogonal includeSelf:True) (sites Around (last To) Orthogonal includeSelf:True)))) next:(addScore Mover (% (count Sites in:(forEach (forEach (sites Empty) if:(and {(= (count Sites in:(sites Around (site) Own Orthogonal)) (count Sites in:(sites Around (site) Enemy Orthogonal))) (not (can Move (move Select (from (sites Around (site) Empty Orthogonal) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))))))})) if:(!= 1 (state at:(site))))) 2))))))) (end (if (no Moves Next) (byScore {(score P1 (+ {(score P1) (- (max (/ (count Sites in:(sites Occupied by:P1)) 3) (/ (count Sites in:(sites Occupied by:P2)) 3)) (/ (count Sites in:(sites Occupied by:P1)) 3)) (count Sites in:(forEach (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: (count Sites in:(sites Around (site) Own Orthogonal)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 6)) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (or (move Add (piece (id "PIECE_ALPHA" P2)) (to (intersection (sites Empty) (sites Inner)))) (move Pass (then (if (is Mover P1) (swap Players P1 P2 (then (note "Player 1 is now Black. Player 2 is now White." to:All))) (note "Player 1 remains White. Player 2 remains Black." to:All) (then (do (set NextPlayer (player 1)) next:(set Var 1)))))))) (nextPhase (= 1 (var)) "Playing")) (phase "Playing" (play (move Add (to (sites Empty)))))} (end {(if (and {(= 1 (var)) (= (id P1) (mover)) (or (is Connected {(sites Side S) (sites Side NW) (sites Side NE)}) (is Connected {(sites Side N) ### SUF: (sites Side SE)})) (not (or {(is Connected {(sites Side S) (sites Side N)}) (is Connected {(sites Side SW) (sites Side NE)}) (is Connected {(sites Side SE) (sites Side NW)})}))}) (result P1 Loss)) (if (and {(= 1 (var)) (= (id P2) (mover)) (or {(is Connected {(sites Side S) (sites Side N)}) (is Connected {(sites Side SW) (sites Side NE)}) (is Connected {(sites Side SE) (sites Side NW)})}) (not (or (is Connected {(sites Side S) (sites Side NW) (sites Side NE)}) (is Connected {(sites Side N) (sites Side SW) (sites Side SE)})))}) (result P2 Loss)) (if (and {(= 1 (var)) (= (id P1) (mover)) (or {(is Connected {(sites Side S) (sites Side N)}) (is Connected {(sites Side SW) (sites Side NE)}) (is Connected {(sites Side SE) (sites Side NW)})})}) (result P1 Win)) (if (and {(= 1 (var)) (= (id P2) (mover)) (or (is Connected {(sites Side S) (sites Side NW) (sites Side NE)}) (is Connected {(sites Side N) (sites Side SW) (sites Side SE)}))}) (result P2 Win))}))) ### MID: (sites Side SW) |
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (merge (shift 0 (/ (- 7 3) 2) (rectangle 3 7 diagonals:Alternating)) (shift (/ (- 7 3) 2) 0 (rectangle 7 3 diagonals:Alternating))) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (directions {Rightward Leftward Forwards}) (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (union (sites Top) (expand (sites Row 4)))) (place "PIECE_ALPHA1" (intersection (union (sites Column 4) (sites Column 2)) (sites Bottom)))}) (play (forEach Piece)) (end {(if (all Sites (expand (sites Bottom) steps:2) if:(= (who at:(site)) P2)) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(rectangle 1 10) (shift 0 9 (rectangle 1 10)) (shift -1 -1 (square 2)) (shift 9 -1 (square 2)) (rectangle 10 1) (shift 9 0 (rectangle 10 1)) (shift -1 9 (square 2)) (shift 9 9 (square 2)) (shift 5 0 (rectangle 6 1)) (shift 0 5 (rectangle 1 6)) (shift 4 4 (rectangle 1 6)) (shift 4 4 (rectangle 6 1))}) vertices:{{1 1} {1 8} {8 1} {8 8} {4.5 4.5}}) {(track "Track1" "69,5,N,W,N,W,S,65,11,E,N,W,67,41,S,E,N,66,8,W,S,E,64,26,N4,E3,68,56" P1 directed:True) (track "Track2" "70,14,S,E,S,E,N,66,8,W,S,E,64,26,N,W,S,65,11,E,N,W,67,41,S4,W3,68,56" P2 directed:True)} use:Vertex) (dice d:2 from:0 num:4) (piece "PIECE_ALPHA" Each (if (= (trackSite Move from:(from) steps:(if (= 1 (count Pips)) 1 (if (= 4 (count Pips)) 5 (if (= 0 (count Pips)) 10 (if (= 2 (count Pips)) (if (or (= 0 (face 73)) (= 0 (face 74))) 2 35) (if (or (= 0 (face 73)) (= 0 (face 74))) 3 (if (= 0 (face 71)) 20 15))))))) -1) (move Remove (from) level:(level)) (move (from (from) level:(level)) (to (trackSite Move from:(from) steps:(if (= 1 (count Pips)) 1 (if (= 4 (count Pips)) 5 (if (= 0 (count Pips)) 10 (if (= 2 (count Pips)) (if (or (= 0 (face 73)) (= 0 (face 74))) 2 35) (if ### SUF: 3 (if (= 0 (face 71)) 20 15))))))) if:True (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (fromTo (from (to) level:(level)) (to (handSite (who at:(to) level:(level))))))))) (then (if (is In (last To) (sites "RemoveSites")) (fromTo (from (last To)) (to (handSite (mover))))))))) (hand Each) (regions "RemoveSites" (sites {51 56}))}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:4) (place Stack "PIECE_ALPHA2" (handSite P2) count:4)}) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (or (= 0 (face 73)) (= 0 (face 74))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Orthogonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step Orthogonal (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(sites Row 0) (sites Row 1) (sites {"A3" "B3"})})) (place "PIECE_ALPHA2" (union {(sites Row 3) (sites Row 4) (sites {"D3" "E3"})}))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) Orthogonal (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)) Orthogonal (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) ### SUF: )))) ### MID: (result Next Loss) |
### 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 (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: ### SUF: )) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (between) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply ### SUF: )) (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: (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))))))) ### SUF: })))) (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: (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {"B2" "D2" "B4" "D4"}) counts:{5 5 5 5}) (place "PIECE_BETA2" (sites {"C1" "C5"}))}) (play (if (is Prev Mover) (or (move Pass) (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty ### SUF: )) (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))))) (forEach Piece top:True))) (end {(if (no Moves P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win))}))) ### MID: (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))))) ### SUF: (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_GAMMA2" coord:"E8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover)))))) (end {(if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) (then (if (can Move (step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))))) (moveAgain))))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:24)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (if (no Pieces Mover in:(sites Board)) (forEach (sites Around (centrePoint) Orthogonal) if:(is Empty (site))) (difference (sites Board) (centrePoint))) if:(is Empty (to))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Capture")) (phase "Capture" (play (if (is Prev Mover) (or (move Step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))) (then (custodial ### SUF: Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) (then (if (can Move (step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))))) (moveAgain)))))) (move Pass)) (forEach Piece))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (from (last To)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 (rectangle 1 6)) (shift 0 6 (rectangle 1 6)) (shift 7 6 (rectangle 1 6))}) (track "Track1" {11 10 9 8 7 6 5 4 3 2 1 0 12 13 14 15 16 17 18 19 20 21 22 23} directed:True) use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (if (not (is Enemy (who at:(trackSite Move steps:(pips))))) (move (from) (to (trackSite Move steps:(pips))))))))}) (rules (start {(place Stack "PIECE_ALPHA1" 11 count:14) (place Stack "PIECE_ALPHA1" 23) (place Stack "PIECE_ALPHA2" (sites {7 8 9 10}) count:3) (place Stack "PIECE_ALPHA2" 6 count:2) (place Stack "PIECE_ALPHA2" 12)}) (play (do (if (and (not (is Pending)) (not (is Prev Mover))) (roll)) next:(if (can Move ### SUF: ) (forEach Piece top:True (then (if (not (all DiceUsed)) (moveAgain)))) (move Pass (then (set Pending)))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (forEach Piece) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 6)) (hand Each) (piece "PIECE_ALPHA" Each (if (not (is Line 3 Orthogonal through:(from))) (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal) (if (= (value Player Mover) -1) (set Value Mover 1) (set Value Mover (+ (value Player Mover) 1))))))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (do (move (from (handSite Mover)) ### SUF: ) ifAfterwards:(not (is Line 3 Orthogonal)))) (nextPhase (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site))))) "Movement")) (phase "Movement" (play (do (forEach Piece) ifAfterwards:(not (is Line 4 Orthogonal)))))} (end (if (= (value Player Mover) 3) (result Mover Win))))) ### MID: (to (sites Empty)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(boardless Hexagonal) (tile "Hex" Each numSides:6) (tile "SecondHex" Each numSides:6) (hand Each size:2)}) (rules (start {(place "Hex1" (centrePoint)) (place "Hex2" (ahead (centrePoint) E)) (place "Hex1" (handSite P1 0)) (place "Hex2" (handSite P2 0)) (place "SecondHex1" (handSite P1 1)) (place "SecondHex2" (handSite P2 1))}) (play (move (from (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: ### SUF: ))})})) (result Mover Win))))) ### MID: (ahead (last To) steps:3 NNE) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (rotate 45 (concentric {1 4})) edges:{{1 4}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:2)) phases:{ ### SUF: (phase "Movement" (play (forEach Piece)))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "11,W,N1,E,N1,W,N1,E,S1,W,S1,E" loop:True P1) (track "Track2" "36,E,S1,W,S1,E,S1,W,N1,E,N1,W" loop:True P2)}) (dice d:2 from:0 num:6) (piece "PIECE_ALPHA" Each (move (from (from) if:(if (= (state at:(from)) 0) True (= (mapEntry (count Pips)) 1))) (to (trackSite Move steps:(mapEntry (count Pips))) if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (= 1 (state at:(last To))) (set State at:(last To) 0))))) (map {(pair 0 4) (pair 1 5) (pair 2 2) (pair 3 3) (pair 4 1) (pair 5 5) (pair 6 6)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (do (roll) next:(forEach Piece) (then (if (and (is In (mapEntry (count Pips)) ### SUF: ) (!= 5 (count Pips))) (moveAgain))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (sites {1 4 6 5}) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "PIECE_ALPHA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (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))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_ZETA") Mover))))) ### SUF: (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_EPSILON1" (sites Row 1)) (place "PIECE_EPSILON2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end (if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) {(if (no Pieces Next "PIECE_EPSILON") (result Mover Win)) (if (!= (count Pieces Next "PIECE_EPSILON") 0) (result Mover Draw))})))) ### MID: (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) |
### 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)))) (place "PIECE_ALPHA2" ### 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: (forEach (sites Board) if:(and (> (site) (centrePoint)) (< (site) (* 9 9)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 10 2)) (piece "PIECE_ALPHA" Each) (dice d:7 from:0 num:1) (map {(pair 0 -10) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 5) (pair 6 6) (pair 7 10)})}) (rules (play (do (roll (then (addScore Mover (mapEntry (count Pips))))) next:(move Pass ### SUF: ))) (end (if (>= (score Mover) 100) (result Mover Win))))) ### MID: (then (and (remove (sites Column (- (mover) 1))) (if (>= (score Mover) 10) (add (piece (id "PIECE_ALPHA" Mover)) (to (intersection (sites Column (- (mover) 1)) (sites Row (- (/ (score Mover) 10) 1)))))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 3) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move (from) (to (sites Empty))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:3)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites ### SUF: if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (is Line 3 Orthogonal) (result Mover Win))))) ### MID: (sites Hand P2) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,23,E,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23" loop:True P1) (track "Track2" "47,W,S1,E,S1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24" loop:True P2)} use:Vertex) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "PIECE_BETA" P2 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In ### SUF: (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (map "ThrowDiceValue" {(pair 0 6) (pair 1 5) (pair 2 0) (pair 3 3) (pair 4 0) (pair 5 5) (pair 6 6)}) (map "Sir" {(pair 1 1) (pair 2 5)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_BETA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain)))) (move Pass (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) |
### 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 ### SUF: ) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (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: (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:(- 4 1))) (regions "Home" P5 (expand origin:(coord row:(* 4 3) column:4) steps:(- 4 1))) (regions "Home" P6 (expand origin:(coord row:4 column:0) steps:(- 4 1))) (map {(pair 1 4) (pair 2 5) (pair 3 6) (pair 4 1) (pair 5 2) (pair 6 3)})}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2)) (place "PIECE_ALPHA3" (sites P3)) (place "PIECE_ALPHA4" (sites P4)) (place "PIECE_ALPHA5" (sites P5)) (place "PIECE_ALPHA6" (sites P6))}) phases:{(phase "Movement" (play (forEach Piece (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Step (to if:(and (is Empty (to)) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))))) (nextPhase (is Mover (next)) "MultiJump")) (phase "MultiJump" (play (or (move Hop (from (last To)) (between if:(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))) ### SUF: )} (end (if (= (sites Occupied by:Mover) (sites (player (mapEntry (mover))))) (result Mover Win))))) ### MID: (nextPhase (not (is Mover (next))) "Movement") |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 4 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (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: ) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (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))))) |
### 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 ### SUF: ) (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: (from) |
### 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 ### SUF: )}) (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: (move Step (to if:(is Empty (to))) (then (custodial (from (last To)) (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(= (what at:(to)) (what at:(last To))))))) |
### PRE: (game "GAME_NAME" (players {(player S) (player N)}) (equipment {(board (add (remove (merge {(rectangle 3 3 diagonals:Alternating) (shift 0 2 (wedge 2)) (shift 0 -1 (rotate 180 (wedge 2)))}) vertices:{3 5 1}) edges:{{0 3} {1 5} {2 7} {0 1}}) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step Adjacent (to if:(and (if (= 1 (count Turns)) (!= (centrePoint) (to)) True) (is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))))) (hand P1) (regions "Home" P2 (intersection (sites Outer) (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" (play (move (from ### SUF: ) (to (expand (sites Top))) (then (moveAgain)))) (nextPhase "Main")) (phase "Main" (play (forEach Piece)))} (end {(if (no Moves P1) (result P2 Win)) (if (is In (where "PIECE_ALPHA" P1) (sites P2)) (result P1 Win))}))) ### MID: (handSite Mover) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 11) (shift 0 5 (rotate 90 (rectangle 1 11))) (shift 0 5 (rectangle 1 11)) (shift -5 10 (rotate 90 (rectangle 1 11))) (shift 5 10 (rotate 90 (rectangle 1 11))) (shift 0 15 (rectangle 1 11))}) {(track "Track1" "0,E5,N5,W,N,E,S,W5,N,End" P1 directed:True) (track "Track2" "10,W5,N5,E,N,W,S,E5,N,End" P2 directed:True)}) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(count Pips)) -2) (move Remove (from)) (if (!= (trackSite Move steps:(count Pips)) -1) (if (if (not (is Enemy (who at:(trackSite Move steps:(count Pips))))) True (not (is In (trackSite Move steps:(count Pips)) (sites "Protect")))) (move (from (from) level:(level)) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))) count:(count at:(to)))))))))) (dice d:2 from:0 num:7) (hand Each) (regions "Protect" (sites {0 10 5 16 21 23 30 36 46 56 51 42})) (map {(pair P1 0) (pair P2 10)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:5) (place Stack "PIECE_ALPHA2" (handSite P2) count:5)}) (play (do (roll) next:(if (can Move (or {(forEach Piece) (forEach Piece container:(mover)) (if (and {(or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) ### SUF: (or (is Empty (mapEntry (mover))) (is Friend (who at:(mapEntry (mover)))))}) (move (from (handSite (mover))) (to (mapEntry (mover)))))} (then (if (or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (moveAgain))))) (or {(forEach Piece) (forEach Piece container:(mover)) (if (and {(or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (or (is Empty (mapEntry (mover))) (is Friend (who at:(mapEntry (mover)))))}) (move (from (handSite (mover))) (to (mapEntry (mover)))))} (then (if (or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (moveAgain)))) (move Pass (then (if (or {(= (count Pips) 1) (= (count Pips) 5) (= (count Pips) 7)}) (moveAgain))))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 9)) (piece "PIECE_ALPHA" Each (or (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (move Hop (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (piece "PIECE_BETA" Each (or (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (move Hop (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (piece "PIECE_GAMMA" Each (or (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (move Hop (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (piece "PIECE_DELTA" Each (or (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (move Hop (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (piece "PIECE_EPSILON" Each (or (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (move Hop (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (piece "PIECE_ZETA" Each (or (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (move Hop (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" coord:"E1") (place "PIECE_BETA1" {"D1" "F1"}) (place "PIECE_GAMMA1" {"C1" "G1"}) (place "PIECE_DELTA1" {"B1" "H1"}) (place "PIECE_EPSILON1" {"A1" "I1"}) (place "PIECE_ZETA1" (sites Row 1)) (place "PIECE_ALPHA2" coord:"E9") (place "PIECE_BETA2" {"D9" "F9"}) (place "PIECE_GAMMA2" {"C9" "G9"}) (place "PIECE_DELTA2" {"B9" "H9"}) (place "PIECE_EPSILON2" {"A9" "I9"}) (place "PIECE_ZETA2" (sites Row 7))}) (play (forEach Piece)) (end ### SUF: ))) ### MID: (if (no Pieces Next) (result Next Loss)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and ### SUF: (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece "PIECE_ALPHA" (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to)))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (not (is In (between) (sites ToClear))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Orthogonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step Orthogonal (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(sites Row 0) (sites Row 1) (sites {"A3" "B3"})})) (place "PIECE_ALPHA2" (union {(sites Row 3) (sites Row 4) (sites {"D3" "E3"})}))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) Orthogonal (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)) Orthogonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty ### SUF: )))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "47,W,S1,E,S1,W,S1,E" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (if (and (not (is In (from) (sites Next "Home"))) (!= 0 (mapEntry "Throw" (count Pips)))) (or (if (not (= 1 (var))) (move (from (from) if:(if (= (state at:(from)) 1) True (= 2 (mapEntry "Throw" (count Pips))))) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (not (= (state at:(last To)) 1)) ### SUF: )))) (move (from (from) if:(if (= (state at:(from)) 1) True (= 2 (mapEntry "Throw" (count Pips))))) (to (trackSite Move steps:(/ (mapEntry "Throw" (count Pips)) 2)) if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (and (if (not (= (state at:(last To)) 1)) (set State at:(last To) 1)) (if (not (= 1 (var))) (and (set Var 1) (moveAgain)) (set Var 0)))))))) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map "Throw" {(pair 0 8) (pair 1 0) (pair 2 0) (pair 3 2) (pair 4 12)}) (dice d:2 from:0 num:4)}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (if (not (= 1 (var))) (roll)) next:(if (can Move (forEach Piece)) (forEach Piece) (move Pass (then (set Var 0)))) (then (if (is In (mapEntry "Throw" (count Pips)) (sites {2 8 12})) (moveAgain))))) (end (if (and (= 0 (count Sites in:(forEach (sites Occupied by:P1) if:(not (is In (site) (sites P2 "Home")))))) (= 0 (count Sites in:(forEach (sites Occupied by:P2) if:(not (is In (site) (sites P1 "Home"))))))) (byScore {(score P1 (count Sites in:(forEach (sites P2 "Home") if:(= (who at:(site)) P1)))) (score P2 (count Sites in:(forEach (sites P1 "Home") if:(= (who at:(site)) P2))))}))))) ### MID: (set State at:(last To) 1) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) ### SUF: (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 (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_GAMMA2" coord:"E8")}) phases:{(phase "Opening" (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover))) (then (and (set Value Mover (+ 1 (value Player Mover))) (if (!= (value Player Mover) 1) (moveAgain)))))) (nextPhase Mover (= 2 (value Player Mover)) "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Promote (last To) (piece {"PIECE_ZETA" "PIECE_EPSILON" "PIECE_DELTA" "PIECE_BETA"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover)))))))} (end (if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win))))) ### MID: (move Step Forward (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 (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)))) ### SUF: ) 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: (then (if (!= 1 (var "HasGrown")) (and (set Var "HasGrown" 1) (if (= (id P2) (mover)) (and (set Var "MoveThatMustBePlant" (count Moves)) (moveAgain)))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {6 0 1 2 3 4 5 7 8 9 10 11 12 25 24 23 22 21 20 18 17 16 15 14 13} P1 directed:True) (track "Track2" {19 13 14 15 16 17 18 20 21 22 23 24 25 12 11 10 9 8 7 5 4 3 2 1 0} P2 directed:True)} use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (move (from (from)) (to (trackSite Move from:(from) steps:(min (face 26) (face 27))) if:(and (or (is Empty (to)) (and (= (to) (mapEntry "FinalPoint" Mover)) (no Pieces Next in:(sites {(mapEntry "FinalPoint" Mover)})))) (if (< 1 (min (face 26) (face 27))) (no Pieces Mover in:(sites Track Mover from:(trackSite Move from:(from) steps:1) to:(trackSite Move from:(from) steps: ### SUF: ))) True)) (apply (if (and (is Enemy (who at:(mapEntry "Opposite" (to)))) (= 1 (size Stack at:(mapEntry "Opposite" (to))))) (fromTo (from (mapEntry "Opposite" (to))) (to (mapEntry "Bar" Next)))))))) (map "FinalPoint" {(pair P1 13) (pair P2 0)}) (map "Bar" {(pair P1 6) (pair P2 19)}) (map "Opposite" {(pair 0 13) (pair 1 14) (pair 2 15) (pair 3 16) (pair 4 17) (pair 5 18) (pair 7 20) (pair 8 21) (pair 9 22) (pair 10 23) (pair 11 24) (pair 12 25) (pair 13 0) (pair 14 1) (pair 15 2) (pair 16 3) (pair 17 4) (pair 18 5) (pair 20 7) (pair 21 8) (pair 22 9) (pair 23 10) (pair 24 11) (pair 25 12)})}) (rules (start {(place Stack "PIECE_ALPHA1" 6 count:3) (place Stack "PIECE_ALPHA2" 19 count:3)}) (play (do (roll) next:(forEach Piece top:True))) (end (if (= 3 (count Pieces Mover in:(sites {(mapEntry "FinalPoint" Mover)}))) (result Mover Win))))) ### MID: (- (min (face 26) (face 27)) 1) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Diamond 7)) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each (move Step ### SUF: (then (promote (last To) (piece "PIECE_ALPHA") Mover)))) (piece "PIECE_GAMMA" Each (move Step (to if:(or (= (what at:(to)) (id "PIECE_BETA1")) (= (what at:(to)) (id "PIECE_BETA2")))) (then (promote (last To) (piece "PIECE_ALPHA") Mover)))) (hand Each size:2) (regions P1 {(sites Side NE) (sites Side SW)}) (regions P2 {(sites Side NW) (sites Side SE)})}) (rules (start {(place "PIECE_BETA1" (handSite P1 0) count:25) (place "PIECE_GAMMA1" (handSite P1 1) count:25) (place "PIECE_BETA2" (handSite P2 0) count:25) (place "PIECE_GAMMA2" (handSite P2 1) count:25)}) phases:{(phase "Placement" (play (move (from (sites Hand P1)) (to (sites Empty)) (then (moveAgain)))) (nextPhase "Game")) (phase "Game" (play (if (is Odd (count Moves)) (or (move (from (handSite Mover 0)) (to (sites Empty)) (then (moveAgain))) (forEach Piece "PIECE_BETA")) (or (move (from (handSite Mover 1)) (to (sites Empty))) (forEach Piece "PIECE_GAMMA")))))} (end (if (is Connected Mover) (result Mover Win))))) ### MID: (to if:(or (= (what at:(to)) (id "PIECE_GAMMA1")) (= (what at:(to)) (id "PIECE_GAMMA2")))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4) {(track "Track1" {14 14 11 10 9 8 8 13 9 5 1 1 4 5 6 7 7 2 6 10} loop:True directed:True) (track "Track2" {11 11 14 10 6 2 2 7 6 5 4 4 1 5 9 13 13 8 9 10} loop:True directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each ### SUF: )}) (rules (start {(place "PIECE_ALPHA1" {"A3" "B3" "A4" "B4"}) (place "PIECE_ALPHA2" {"C1" "D1" "C2" "D2"})}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (or {(move Step Orthogonal (to if:(is Empty (to)))) (move Slide "AllTracks" (between if:(or (= (between) (from)) (is Empty (between)))) (to if:(is Enemy (who at:(to))) (apply if:False (remove (to)))))}) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 9 9 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) (move Step Forwards (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 ### SUF: (move Slide (then (set Value Mover 1))))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Board) if:(< (site) (centrePoint)))) (place "PIECE_ALPHA2" (forEach (sites Board) if:(> (site) (centrePoint))))}) (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 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 Moves Mover) (result Next Win))))) ### MID: (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))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 3) use:Vertex) (hand Each) ### SUF: }) (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: (piece "PIECE_ALPHA" Each (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4 pyramidal:True) use:Vertex) (piece "PIECE_ALPHA" Each) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:15)) (play (if (is Prev Mover) (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (handSite Mover)) (then (if (= (var) 1) (and (set Var 0) (moveAgain))))) (or (do (move (from ### SUF: if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (sites Empty) if:(and (is Flat) (< (layer of:(from)) (layer of:(to)))))) ifAfterwards:(is Flat (last To))) (move (from (sites Occupied by:Mover container:(mover))) (to (sites Empty) if:(is Flat))) (then (if (is Pattern {F R F R F} whats:{(id "PIECE_ALPHA" Mover)}) (and (set Var 1) (moveAgain))))))) (end (if (= (layer of:(last To)) 3) (result Mover Win))))) ### MID: (sites Occupied by:Mover) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) ### SUF: (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (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: (piece "PIECE_ALPHA" P2 S) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (rectangle 3 4) (shift 0 1 (rectangle 1 12))) {(track "Track1" "20,3,W,N1,E,End" P1 directed:True) (track "Track2" "21,12,W,S1,E,End" P2 directed:True)}) (dice facesByDie:{{1 2 3 4} {0 1}} num:2) (hand Each) (regions "Replay" (sites {"A1" "A3" "D2" "H2" "L2"})) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) -2) (move Remove (from)) (if (!= (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ ### SUF: 7) (+ (face 22) 10)))))) -1) (if (or (is Empty (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10))))))) (and (not (is Friend (who at:(trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10))))))))) (not (is In (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) (sites "Replay"))))) (move (from) (to (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to))))))) (then (if (is In (last To) (sites "Replay")) (moveAgain))))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:7) (place "PIECE_ALPHA2" (handSite P2) count:7)}) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (face 22) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {7 8 9 10 11 12} P1 directed:True) (track "Track2" {18 17 16 15 14 13} P2 directed:True)} use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (move (from) (to (trackSite Move steps:(pips))))))) (map "StartTrack" {(pair P1 7) (pair P2 18)})}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {7 8 9 10 11 12}) count:2) (place Stack "PIECE_ALPHA2" (sites {13 14 15 16 17 18}) count:2)}) phases:{(phase "UnStacking" (play (do (if (or (is Pending) (not (is Prev Mover))) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 0) (move Select (from ### SUF: ) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 1)) (if (not (all DiceUsed)) (moveAgain))))))) (then (if (all DiceEqual) (and (set Pending) (moveAgain)))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(site)) 0))) "Stacking")) (phase "Stacking" (play (do (if (or (is Pending) (not (is Prev Mover))) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 1) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 0)) (if (not (all DiceUsed)) (moveAgain))))))) (then (if (all DiceEqual) (and (set Pending) (moveAgain)))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(site)) 1))) "BearingOff")) (phase "BearingOff" (play (do (if (or (all DiceEqual) (not (is Prev Mover))) (roll)) next:(forEach Piece top:True) (then (if (or (not (all DiceUsed)) (all DiceEqual)) (moveAgain))))) (end (if (no Pieces Mover) (result Mover Win))))})) ### MID: (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (hand Each) (map {(pair 0 "PIECE_BETA0") (pair 1 "PIECE_GAMMA0") (pair 2 "PIECE_DELTA0") (pair 3 "PIECE_EPSILON0")}) (piece "PIECE_ALPHA" Each (move Step (to if:(and (<= (- (size Stack at:(to)) (topLevel at:(from))) 1) (= (who at:(to)) 0))) (then (moveAgain)))) (piece "PIECE_BETA" Neutral) (piece "PIECE_GAMMA" Neutral) (piece "PIECE_DELTA" Neutral) (piece "PIECE_EPSILON" Neutral)}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:2) (place Stack "PIECE_ALPHA2" (handSite P2) count:2)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)) (then (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (moveAgain))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" ### SUF: )} (end {(if (and (= 3 (topLevel at:(last To))) (= (what at:(last To) level:(topLevel at:(last To))) (id "PIECE_ALPHA" Mover))) (result Mover Win)) (if (no Moves P1) (result P2 Win)) (if (no Moves P2) (result P1 Win))}))) ### MID: (play (if (is Prev Mover) (move Select (from (sites Around (last To) if:(and (< (size Stack at:(to)) 4) (= (who at:(to)) 0)))) (then (add (piece (mapEntry (size Stack at:(last To)))) (to (last To)) stack:True))) (forEach Piece))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 5) use:Vertex) (piece "PIECE_ALPHA" Each (or ### SUF: (move Step (directions {Rightward Leftward Forwards} of:All) (to if:(is Empty (to))) (then (set Value Mover 1))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_BETA" Each (or (move Hop All (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (set Value Mover 0))) (move Slide All (then (set Value Mover 1))))) (regions P1 (intersection (sites Corners) (sites Bottom))) (regions P2 (intersection (sites Corners) (sites Top)))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (or (if (= (value Player Prev) 1) (or (if (and (is In (last From) (sites Pending)) (is In (last From) (sites Empty))) (move Select (from (last To) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))) (move Select (from (sites Pending) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)}))))) (do (set Pending (sites From (or (forEach Piece "PIECE_ALPHA" (move Hop (directions {Rightward Leftward Forwards} of:All) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (move Hop All (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))))) next:(forEach Piece)))) (end (if (no Pieces Mover) (result Mover Loss))))) ### MID: (move Hop (directions {Rightward Leftward Forwards} of:All) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 8)) (piece "PIECE_ALPHA" Each (or {(move Hop Orthogonal (between if:(and (is Enemy (who at:(between))) (not (is In (between) (union (sites Bottom) (sites Top))))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step Orthogonal (to if:(is Empty (to)))) (if (= 1 (state at:(from))) (move Slide Orthogonal (between (exact 2) if:(is Empty (between))) ### SUF: ))}))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (forEach Piece)) (end (if (<= (count Pieces Next) 3) (result Next Loss))))) ### MID: (then (set State at:(last To) 0)) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (add (remove (concentric {44}) vertices:{43 21 0 22}) edges:{{20 18} {0 1} {19 21} {38 39}}) {(track "TrackCW" {39 35 33 31 29 27 25 23 21 19 38 17 15 13 11 9 7 5 3 1 37 0 2 4 6 8 10 12 14 16 36 18 20 22 24 26 28 30 32 34} loop:True) (track "TrackCCW" {39 34 32 30 28 26 24 22 20 18 36 16 14 12 10 8 6 4 2 0 37 1 3 5 7 9 11 13 15 17 38 19 21 23 25 27 29 31 33 35} loop:True)} use:Edge) (map "Throw" {(pair 0 10) (pair 1 3) (pair 2 2) (pair 3 5)}) (map "Start" {(pair 1 39) ### SUF: (pair 3 37) (pair 4 38)}) (regions "AllSites" (sites Board Vertex)) (piece "PIECE_ALPHA" Each) (dice d:2 from:0 num:3) (hand Each)}) (rules (start {(place "PIECE_ALPHA1" Edge (mapEntry "Start" P1)) (place "PIECE_ALPHA2" Edge (mapEntry "Start" P2)) (place "PIECE_ALPHA3" Edge (mapEntry "Start" P3)) (place "PIECE_ALPHA4" Edge (mapEntry "Start" P4))}) (play (do (roll) next:(if (or (is Mover P1) (is Mover P2)) (forEach Piece (move (from (from) level:(level)) (to (trackSite Move "TrackCCW" steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Start" (who at:(to))))))))) (forEach Piece (move (from (from) level:(level)) (to (trackSite Move "TrackCW" steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Start" (who at:(to)))))))))) (then (do (if (if (or (is Mover P1) (is Mover P2)) (is In (mapEntry "Start" Mover) (sites Track "TrackCCW" from:(trackSite Move from:(last From) "TrackCCW" steps:1) to:(last To))) (is In (mapEntry "Start" Mover) (sites Track "TrackCW" from:(trackSite Move from:(last From) "TrackCW" steps:1) to:(last To)))) (addScore Mover 1) (then (if (= (score Mover) 4) (remove (last To))))) next:(if (and (!= 4 (score Mover)) (= 10 (mapEntry "Throw" (count Pips)))) (moveAgain)))))) (end (if (>= (score Mover) 4) (result Mover Win))))) ### MID: (pair 2 36) |
### 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) ### SUF: ))) next:(addScore Mover (% (count Sites in:(forEach (forEach (sites Empty) if:(and {(= (count Sites in:(sites Around (site) Own Orthogonal)) (count Sites in:(sites Around (site) Enemy Orthogonal))) (not (can Move (move Select (from (sites Around (site) Empty Orthogonal) if:(not (all Sites (sites Around (from) Empty Orthogonal) if:(not (not (all Sites (sites Around (site) Empty Orthogonal) if:(not (is Related Orthogonal (site) (from))))))))))))})) if:(!= 1 (state at:(site))))) 2))))))) (end (if (no Moves Next) (byScore {(score P1 (+ {(score P1) (- (max (/ (count Sites in:(sites Occupied by:P1)) 3) (/ (count Sites in:(sites Occupied by:P2)) 3)) (/ (count Sites in:(sites Occupied by:P1)) 3)) (count Sites in:(forEach (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: (sites Around (last To) Orthogonal includeSelf:True) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (move Step (to if:(and {(is Empty (to)) (not (is In (to) (sites "RedDots"))) (can Move (do (set Var ### SUF: ) next:(forEach Site (difference (sites Occupied by:Mover) (from)) (step (from (site)) (directions Cell from:(from) to:(var)) (to if:(and (is Empty (to)) (not (is In (to) (sites "RedDots")))))))))})) (then (moveAgain)))) (regions "RedDots" (sites {"B2" "B4" "D2" "D4"}))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (if (is Prev Mover) (forEach Site (difference (sites Occupied by:Mover) (last To)) (move Step (from (site)) (directions Cell from:(last From) to:(last To)) (to if:(and (is Empty (to)) (not (is In (to) (sites "RedDots"))))))) (forEach Piece))) (end {(if (and (is Mover P1) (all Sites (sites Occupied by:P1) if:(is In (site) (sites Top)))) (result P1 Win)) (if (and (is Mover P2) (all Sites (sites Occupied by:P2) if:(is In (site) (sites Bottom)))) (result P2 Win))}))) ### MID: (to) |
### 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 (and (not (is Next Mover)) (is Full)) (and {(forEach Site (forEach (sites Occupied by:P1 container:"Board") if: ### SUF: ) (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: (= (size Stack at:(site)) 2) |
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each) (regions P1 {(sites Top) (sites Bottom)}) (regions P2 {(sites Left) (sites Right)})}) (rules (play (move Add (to (if (is Mover P1) (difference (sites Empty) (union (sites Left) (sites Right))) (difference (sites Empty) (union (sites Top) (sites Bottom))))) (then (custodial (from (last To)) (between if:(is Enemy (who at:(between))) (apply (and (remove (between)) (add (piece (id "PIECE_ALPHA" Mover)) (to (between)))))) (to if:(is Friend (who at:(to)))))))) (end {(if (!= 0 (count Sites in:(forEach (sites Occupied by:P1) if:(is Connected at:(site) Orthogonal P1)))) (result P1 Win)) (if (!= 0 (count Sites in:(forEach (sites Occupied by:P2) if:(is Connected at:(site) Orthogonal P2)))) (result P2 Win))}))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 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 ### SUF: (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or (forEach Piece "PIECE_ALPHA" (or (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (forEach Piece "PIECE_BETA" (or (move Step Diagonal (to if:(is Empty (to)))) (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (scale 1 2 (wedge 4)) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:1) (place "PIECE_BETA2" (handSite P2) count:7)}) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)) (end { ### SUF: (if (<= (count Pieces P2) 3) (result P2 Loss))}))})) ### MID: (if (no Moves Next) (result Next Loss)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4) {(track "Track1" {14 14 11 10 9 8 8 13 9 5 1 1 4 5 6 7 7 2 6 10} loop:True directed:True) (track "Track2" {11 11 14 10 6 2 2 7 6 5 4 4 1 5 9 13 13 8 9 10} loop:True directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (or {(move Step Orthogonal (to if:(is Empty (to)))) (move Slide "AllTracks" (between if:(or ### SUF: (is Empty (between)))) (to if:(is Enemy (who at:(to))) (apply if:False (remove (to)))))}))}) (rules (start {(place "PIECE_ALPHA1" {"A3" "B3" "A4" "B4"}) (place "PIECE_ALPHA2" {"C1" "D1" "C2" "D2"})}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (= (between) (from)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) ### SUF: (hand Each) (regions "HalfBoard" P1 (expand (sites Bottom) steps:3)) (regions "HalfBoard" P2 (expand (sites Top) steps:3))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:13) (place "PIECE_ALPHA2" (handSite P2) count:10)}) phases:{(phase "CentrePlacing" P1 (play (move (from (handSite P1)) (to (centrePoint)))) (nextPhase "Placement")) (phase "Placement" P2 (play (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (intersection (sites Empty) (sites Mover)))) (move Pass))) (nextPhase (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site))))) "Movement")) (phase "Movement" (play (forEach Piece)) (end {(if (no Moves P2) (result P1 Win)) (if (< (count Pieces P1) 2) (result P2 Win))}))})) ### MID: (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (and (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))) (surround (from (last To)) Orthogonal (between if:(and (is Enemy (who at:(between))) (is In (between) (sites Corners))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (meta (swap)) (play (or (do (move Add (piece "PIECE_ALPHA0") (to (sites Empty))) ifAfterwards:(or (not (all Sites (sites Around (last To) Enemy Orthogonal) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Next (who at:(to)))))))) (not (all Sites (sites Around (last To) Own Orthogonal) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))))))) (then (and (forEach Site (sites Around (last To) Enemy Orthogonal) (if (= 0 (count Liberties at:(site) Orthogonal if: ### SUF: )) (remove (sites Group at:(site) Orthogonal if:(is Next (who at:(to))))))) (forEach Site (sites Around (last To) Own Orthogonal) (if (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))) (remove (sites Group at:(site) Orthogonal if:(is Mover (who at:(to)))))))))) (do (move Add (to (sites Empty))) ifAfterwards:(not (or (not (all Sites (sites Around (last To) Enemy Orthogonal) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Next (who at:(to)))))))) (not (all Sites (sites Around (last To) Own Orthogonal includeSelf:True) if:(not (= 0 (count Liberties at:(site) Orthogonal if:(is Mover (who at:(to))))))))))))) (end {(if (and (> (count Moves) 2) (no Pieces Next)) (result Next Loss)) (if (and {(> (count Moves) 2) (no Pieces Mover) (not (no Pieces Next))}) (result Mover Loss))}))) ### MID: (is Next (who at:(to))) |
### 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 ### SUF: (is Empty (to))))) (to) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral))))))))) (apply (if (is Occupied (to)) (and (remove (to)) (addScore Mover 1))))))) (piece "PIECE_ALPHA" Neutral)}) (rules (start {(place "PIECE_ALPHA0" (difference (sites Board) (sites Corners))) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) NNW)) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) E)) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) SSW)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) NNE)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) W)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) SSE))}) (play (forEach Piece Mover)) (end (if (or (< (/ (- (count Sites in:(sites Board)) 6) 2) (score P1)) (< (/ (- (count Sites in:(sites Board)) 6) 2) (score P2))) (byScore))))) ### MID: (= (id Neutral) (who at:(to))) |
### 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)) ### SUF: (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))}) (apply (remember Value (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to)))))))) count:(size Stack at:(from)) stack:True (then (if (can Move (move (from (last To)) (to (sites Direction from:(from) (difference Diagonal (directions Cell from:(last To) to:(last From))) distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))})))) (moveAgain) (do (forEach Site (sites (values Remembered)) (remove (site) count:(size Stack at:(site)))) next:(and (if (or (and (is Odd (size Stack at:(last To))) (is In (last To) (sites (player (+ 1 (% (mover) 2)))))) (and (is Even (size Stack at:(last To))) (is In (last To) (sites (player (mover)))))) (add (to (last To)) stack:True)) (forget Value All)))))) top:True) (forEach Piece "PIECE_ALPHA" (move Step (from) (if (is Odd (size Stack at:(from))) (directions {FL FR}) (directions {BL BR})) (to if:(is Empty (to))) stack:True (then (if (or (and (is Odd (size Stack at:(last To))) (is In (last To) (sites (player (+ 1 (% (mover) 2)))))) (and (is Even (size Stack at:(last To))) (is In (last To) (sites (player (mover)))))) (add (to (last To)) stack:True)))) top:True))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:9)) phases:{(phase "Placement" (play (if (is Prev Mover) (if (can Move (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site)))))) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move Remove (sites Occupied by:Enemy container:"Board"))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (if (can Move (move Remove (forEach (sites Occupied by:Enemy container:"Board") if: ### SUF: ))) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move Remove (sites Occupied by:Enemy container:"Board"))) (if (> (count Pieces Mover) 3) (forEach Piece) (move (from (sites Occupied by:Mover)) (to (sites Empty)))))))} (end (if (<= (count Pieces Next) 2) (result Next Loss))))) ### MID: (not (is Line 3 Orthogonal through:(site))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 13) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "51,W,S1,E,S1,W,S1,E" P2 directed:True)}) (dice d:2 from:0 num:4) (map {(pair 0 6) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (piece "PIECE_ALPHA" Each (if (or (= (state at:(from)) 0) (and (= 1 (mapEntry (count Pips))) (= (state at:(from)) 1))) ### SUF: )) (regions "AnotherThrow" (sites {1 4 6})) (regions "CentralRows" (union (sites Row 1) (sites Row 2))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (is In (mapEntry (count Pips)) (sites "AnotherThrow")) (moveAgain)))) (move Pass (then (if (is In (mapEntry (count Pips)) (sites "AnotherThrow")) (moveAgain))))))) (end (if (or (and (= (count Sites in:(difference (sites Occupied by:P1) (sites P2))) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites P1))) 0)) (no Pieces Mover)) (byScore))))) ### MID: (if (!= (trackSite Move steps:(mapEntry (count Pips))) -1) (if (or (not (is In (from) (sites Next))) (and (is In (from) (sites Next)) (= (count Sites in:(intersection (sites Occupied by:Next) (sites Next))) 0))) (if (or (is In (trackSite Move steps:(mapEntry (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry (count Pips)))))) (or (if (= (+ (mapEntry (count Pips)) 1) (count at:(from))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) count:(mapEntry (count Pips)))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) count:(count at:(from)))) (if (and (is In (trackSite Move steps:(mapEntry (count Pips))) (sites "CentralRows")) (is Friend (who at:(trackSite Move steps:(mapEntry (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips)))))))) (then (set State at:(last To) 0))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,23,E,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23" loop:True P1) (track "Track2" "47,W,S1,E,S1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24" loop:True P2)} use:Vertex) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) ### SUF: ))))) (piece "PIECE_BETA" P2 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (map "ThrowDiceValue" {(pair 0 6) (pair 1 5) (pair 2 0) (pair 3 3) (pair 4 0) (pair 5 5) (pair 6 6)}) (map "Sir" {(pair 1 1) (pair 2 5)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_BETA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain)))) (move Pass (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (set State at:(last To) 0) |