text
stringlengths 218
3.08k
|
---|
### 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 ### SUF: ) (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)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "PIECE_GAMMA" Next))))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_EPSILON1" (sites Row 1)) (place "PIECE_EPSILON2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8")}) phases:{(phase "OpeningCounselor" (play (forEach Piece "PIECE_ZETA" (move Hop Forward (between if:True) (to if:(is Empty (to)) (apply (remove (to))))))) (nextPhase Mover "OpeningSoldier")) (phase "OpeningSoldier" (play (forEach Piece "PIECE_EPSILON" (if (is In (from) (sites {"D2" "D7"})) (move Hop Forward (between if:True) (to if:(is Empty (to)) (apply (remove (to)))))))) (nextPhase Mover "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover)))))))} (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (who at:(to)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(boardless Square) (piece "PIECE_ALPHA" Each (move (from (from) level:(level)) (to (sites Occupied by:All component:"PIECE_BETA") level:0 if:(= 1 (size Stack at:(to)))) (then (moveAgain)))) (piece "PIECE_BETA" Each)}) (rules (start {(place "PIECE_BETA1" (ahead (centrePoint) NE)) (place "PIECE_BETA1" (ahead (centrePoint) SE)) (place "PIECE_BETA1" (ahead (centrePoint) SW)) (place "PIECE_BETA1" (ahead (centrePoint) NW)) ### SUF: (place "PIECE_BETA2" (ahead (centrePoint) E)) (place "PIECE_BETA2" (ahead (centrePoint) S)) (place "PIECE_BETA2" (ahead (centrePoint) W))}) phases:{(phase "PlacePhase" (play (do (if (not (is Prev Mover)) (move Add (piece (id "PIECE_ALPHA" Mover)) (to (sites Occupied by:All component:"PIECE_BETA") level:0 if:(= 1 (size Stack at:(to)))) stack:True (then (moveAgain))) (move (from (last To)) (to (sites Around (difference (sites Occupied by:All component:"PIECE_BETA") (last To)) Orthogonal if:(is Empty (to)))))) ifAfterwards:(= 1 (count Groups)))) (nextPhase Mover (and (not (is Prev Mover)) (>= (count Turns) (- (* (count Players) 10) 1))) "MovePhase")) (phase "MovePhase" (play (do (if (not (is Prev Mover)) (forEach Piece) (move (from (last To)) (to (sites Around (difference (sites Occupied by:All component:"PIECE_BETA") (last To)) Orthogonal if:(is Empty (to)))))) ifAfterwards:(= 1 (count Groups)))))} (end {(if (is Line 4 what:(id "PIECE_ALPHA" P1)) (result P1 Win)) (if (is Line 4 what:(id "PIECE_BETA" P1)) (result P1 Win)) (if (is Line 4 what:(id "PIECE_ALPHA" P2)) (result P2 Win)) (if (is Line 4 what:(id "PIECE_BETA" P2)) (result P2 Win))}))) ### MID: (place "PIECE_BETA2" (ahead (centrePoint) N)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each) (regions "Home" P1 (expand origin:(coord "A1") steps:3 Orthogonal)) (regions "Home" P2 (expand origin:(coord "H8") steps:3 Orthogonal)) (map {(pair P1 P2) (pair P2 P1)})}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2))}) phases:{(phase "Movement" (play (forEach Piece (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) ### SUF: )))))) (moveAgain)))) (move Step (to if:(and (is Empty (to)) (or (not (is In (from) (sites Next))) (is In (to) (sites Next))))))))) (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: (sites (player (mapEntry (mover)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 2 (square 5 diagonals:Alternating)) (wedge 3)) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_BETA2" (difference (expand (sites Top) steps:2) (sites {"C5"}))) (place "PIECE_ALPHA1" coord:"C5")}) (play (forEach Piece)) (end {(if (no Moves Next) (result Next Loss)) (if (<= (count Pieces P2) 0) ### SUF: )}))) ### MID: (result P2 Loss) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 11)) (regions "Fortresses" (sites Corners)) (piece "PIECE_ALPHA" P1 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (or {(custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA2")) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_BETA" P2)) (apply (trigger "Surrounded" P2))) (to if:(or (is Friend (who at:(to))) ### 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: (is In (to) (union (sites Centre) (sites "Fortresses"))) |
### 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))) ### SUF: ) (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 (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 (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (is Enemy (who at:(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 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 ### SUF: )) (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: (remove (between)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4)) (hand P1) (piece "PIECE_ALPHA" P1 (or (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step Orthogonal (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step Orthogonal (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:12) (place "PIECE_BETA2" (sites Corners))}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)) (then (forEach Site (sites Occupied by:Next) (if (not (can Move (or (step (from (site)) Orthogonal (to if:(is Empty (to)))) (hop (from (site)) Orthogonal (between if:(= (who at:(between)) P1) (apply (remove (between)))) (to if:(is Empty (to))))))) (remove (site))))))) (nextPhase (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) "MovementP1")) (phase "MovementP1" P1 (play (forEach Piece (then (forEach Site (sites Occupied by:Next) (if (not (can Move (or (step (from (site)) Orthogonal (to if:(is Empty (to)))) (hop (from (site)) Orthogonal (between if:(= (who at:(between)) P1) (apply (remove (between)))) (to if:(is Empty (to))))))) (remove (site)))))))) (phase "FirstTigerMovement" P2 ### SUF: (nextPhase Mover "MovementP2")) (phase "MovementP2" P2 (play (forEach Piece)))} (end {(if (no Pieces P1) (result P2 Win)) (if (>= 2 (count Pieces P2)) (result P1 Win))}))) ### MID: (play (forEach Piece (if (= (count Steps (from) (last To)) (min (results from:(last To) to:(sites Corners) (count Steps (from) (to))))) (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))))) |
### 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 ### SUF: )) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (hand P1)}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:20) (place "PIECE_BETA2" (sites Corners))}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Moving")) (phase "Moving" (play (forEach Piece)))} (end {(if (no Moves P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win))}))) ### MID: (remove (between)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (piece "PIECE_GAMMA" Neutral) (hand Each)}) (rules (start (place "PIECE_GAMMA0" (sites Board))) (play (if (is Prev Mover) (or {(move Select (from (difference (intersection (sites Left) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) E) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Right) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) W) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Bottom) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) N) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})))}) (move Select (from (sites Outer) if:(or (is Mover (who at:(from))) (= (who at:(from)) 0))) (then (and (fromTo ### SUF: (to (handSite (mover)))) (moveAgain)))))) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (from (last To)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) ### SUF: (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: (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))))))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_EPSILON1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_GAMMA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_EPSILON2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_GAMMA2" coord:"E8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "PIECE_ZETA") Mover) (do ### SUF: 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: (forEach Piece) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (hand Each) (piece "PIECE_ALPHA" Each (flips 0 1) (if (= 0 (state at:(from))) (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))))) (moveAgain)))) (then (and (custodial (from (last From)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to)))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) ### SUF: ) (apply (and (flip (between)) (custodial (from (between)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (mover)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Enemy (who at:(to))) (= 0 (state at:(to))))))))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to)))))))))))}) (rules (meta (no Repeat)) (start (place "PIECE_ALPHA" "Hand" count:16)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (or (move Hop (from (last To)) Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))) (then (and {(if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is Visited (to))))))) (moveAgain)) (custodial (from (last From)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to)))))) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (next)) (= 0 (state at:(between)))) (apply (and (flip (between)) (custodial (from (between)) Orthogonal (between (max 1) if:(and (= (what at:(between)) (mover)) (= 1 (state at:(between)))) (apply (flip (between)))) (to if:(and (is Enemy (who at:(to))) (= 0 (state at:(to))))))))) (to if:(and (is Friend (who at:(to))) (= 0 (state at:(to))))))}))) (move Pass)) (or (forEach Piece) (move Remove (forEach (sites Occupied by:Next) if:(= 1 (state at:(site)))))))))} (end (if (= (count Pieces Next) 1) (result Mover Win))))) ### MID: (= 0 (state at:(between))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Triangle 13)) (piece "PIECE_ALPHA" Each)}) (rules (meta (swap)) phases:{(phase "Opening" P1 (play (move Add (to (sites Empty)) (then (set Var (last To))))) ### SUF: ) (phase "Play" (play (move Add (to (sites LineOfSight Empty at:(var))) (then (set Var (last To))))))} (end (if (no Moves Next) (byScore {(score P1 (+ (if (is Mover P1) 1 0) (count Sites in:(intersection (sites Around (last To)) (sites Occupied by:P1))))) (score P2 (+ (if (is Mover P2) 1 0) (count Sites in:(intersection (sites Around (last To)) (sites Occupied by:P2)))))}))))) ### MID: (nextPhase) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10)) (piece "PIECE_ALPHA" Each (move Slide Orthogonal (to (apply if:(all Sites (sites Around (to)) 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 ### SUF: (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: (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"}))}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each) (regions "Home" P1 (expand origin:(coord "A1") steps:3 Orthogonal)) (regions "Home" P2 (expand origin:(coord "H8") steps:3 Orthogonal)) (map {(pair P1 P2) (pair P2 P1)})}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2))}) phases:{(phase "Movement" (play (forEach Piece (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or ### SUF: (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 Next))) (is In (to) (sites Next))))))))) (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: (not (is In (from) (sites (player (mapEntry (mover)))))) |
### PRE: (game "GAME_NAME" (players 4) (equipment { ### SUF: (hand Each) (dice d:2 from:0 num:6) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -1) (move Remove (from)) (move (from (from)) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (is In (to) (sites "SafeSites"))))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))) (map "Throw" {(pair 0 6) (pair 1 10) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 25) (pair 6 12)}) (regions "SafeSites" (sites {60 62 16 48 87 89 37 2}))}) (rules (start (place "PIECE_ALPHA" "Hand" count:4)) (play (do (roll) next:(or (forEach Piece) (if (and (is In (mapEntry "Throw" (count Pips)) (array {10 25})) (is Occupied (handSite Mover))) (move (from (handSite Mover)) (to (centrePoint) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (board (add (hole (merge (shift 0 (/ (- 19 3) 2) (rectangle 3 19)) (shift (/ (- 19 3) 2) 0 (rectangle 19 3))) (poly {{8 8} {8 11} {11 11} {11 8}})) cells:{{8 28 48 68 69 70 71 51 31 11 10 9}}) {(track "Track1" "96,9,S,E1,N,11,E,N,W,53,N,W,S,42,W,S,E,8,S,E1,N8" P1 directed:True) (track "Track2" "96,26,W,S,E,8,S,E,N,11,E,N,W,53,N,W,S,42,W,S1,E8" P2 directed:True) (track "Track3" "96,52,N,W,S,42,W,S,E,8,S,E,N,11,E,N,W,53,N,W1,S8" P3 directed:True) (track "Track4" "96,27,E,N,W,53,N,W,S,42,W,S,E,8,S,E,N,11,E,N1,W8" P4 directed:True)}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) (move Step (to if:(is Empty (to))) (then (set Value Mover 1))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_BETA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) (move Slide (then (set Value Mover 1)))))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (or (if (= (value Player Prev) 1) (or (if (and (is In (last From) (sites Pending)) (is In (last From) (sites Empty))) (move Select (from (last To) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))) (move Select (from (sites Pending) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)}))))) (do (set Pending (sites From (or (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if ### SUF: (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (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)))))))) next:(forEach Piece)))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (is In (last To) (sites Next)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {7 8 9 10 11 12} P1 directed:True) (track "Track2" {18 17 16 15 14 13} P2 directed:True)} use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move steps:(pips)) -1) (move Remove (from)) (move (from) (to (trackSite Move steps:(pips))))))) (map "StartTrack" {(pair P1 7) (pair P2 18)})}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {7 8 9}) count:2) (place Stack "PIECE_ALPHA1" (sites {10 11 12}) count:3) (place Stack "PIECE_ALPHA2" (sites {13 14 15}) count:3) (place Stack "PIECE_ALPHA2" (sites {16 17 18}) count:2)}) phases:{(phase "UnStacking" (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die if:(!= (pips) 0) (or (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 0) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (if (= 3 (size Stack at:(last To))) (forEach Level (last To) (set State at:(last To) level:(level) 1)) (forEach Level (last To) (set State at:(last To) level:(level) 2))) (if (not (all DiceUsed)) (moveAgain)))))) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 1) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and ### SUF: (if (not (all DiceUsed)) (moveAgain)))))))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (or (= (state at:(site)) 0) (= (state at:(site)) 1)))) "BearingOff")) (phase "BearingOff" (play (do (if (or (all DiceEqual) (not (is Prev Mover))) (roll)) next:(forEach Piece top:True) (then (if (not (all DiceUsed)) (moveAgain))))) (end (if (no Pieces Mover) (result Mover Win))))})) ### MID: (forEach Level (last To) (set State at:(last To) level:(level) 2)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (scale 1 2 (wedge 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 (sites Hand P2) if:(= 0 ### SUF: )) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (is Line 3) (result Mover Win))))) ### MID: (count Cell at:(site)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_GAMMA" Each ### SUF: ) (piece "PIECE_DELTA" Each (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (or (move Step (directions {FL FR Forward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step (directions {BL BR}) (to if:(is Empty (to)))))) (piece "PIECE_ZETA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (or (if (= (state at:(from)) 1) (move (from) (to (ahead (ahead (from) N) N) if:(is Empty (to)))) (then (set State at:(last To) 0))) (move Step (directions {BL BR FL FR Forward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 2)) (place "PIECE_ALPHA2" (sites Row 5)) (place "PIECE_GAMMA1" {"A1" "H1"}) (place "PIECE_ZETA1" {"B1" "G1"}) (place "PIECE_EPSILON1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"E1" state:1) (place "PIECE_DELTA1" coord:"D1") (place "PIECE_GAMMA2" {"A8" "H8"}) (place "PIECE_ZETA2" {"B8" "G8"}) (place "PIECE_EPSILON2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"D8" state:1) (place "PIECE_DELTA2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Mover))))) (end {(if (and (is Threatened (id "PIECE_DELTA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_DELTA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw)) (if (and {(= (count Pieces Next) 1) (= (count Pieces Mover) 2) (!= (where "PIECE_BETA" Mover) -1)}) (result Mover Draw))}))) ### MID: (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Triangle rings:3 joinMidpoints:False joinCorners:True) 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 (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 ### SUF: (result Next Loss))))) ### MID: (no Pieces Next) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board ### SUF: use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step All (to if:(is Empty (to)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:3)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (is Line 3 All) (result Mover Win))))) ### MID: (square 3) |
### 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 ### SUF: (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: (sites Occupied by:Enemy) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 (or (move Step Diagonal (to if:(is Empty (to)))) ### SUF: )) (piece "PIECE_BETA" P2 N (move Step (directions {FR FL}) (to if:(is Empty (to))))) (hand P1)}) (rules (start {(place "PIECE_ALPHA1" (handSite P1)) (place "PIECE_BETA2" (difference (expand (sites Bottom) steps:2) (sites Phase 0)))}) phases:{(phase "Placement" P1 (play (move (from (handSite Mover)) (to (difference (sites Empty) (sites Phase 0))))) (nextPhase "Movement")) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board ### SUF: use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (sites {"C6" "E6"})) (place "PIECE_ALPHA2" (union (expand (union (sites Right) (sites Left))) (expand (sites Bottom) steps:3)))}) (play (if (is Mover P1) (do (forEach Site (sites From (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (remember Value "From" (site))) next:(forEach Piece) (then (and (if (!= 0 (count Sites in:(sites (values Remembered "From")))) (if (= 1 (count Steps (last From) (last To))) (and (forEach Site (sites (values Remembered "From")) (remove (site))) (if (is In (last From) (sites (values Remembered "From"))) (remove (last To)))))) (forget Value All)))) (forEach Piece))) (end {(if (no Pieces P2) (result P1 Win)) (if (or (or (no Pieces P1) (no Moves P1)) (all Sites (expand (sites Top) steps:2) if:(= (who at:(site)) P2))) (result P2 Win))}))) ### MID: (merge (shift 0 (/ (- 7 3) 2) (rectangle 3 7 diagonals:Alternating)) (shift (/ (- 7 3) 2) 0 (rectangle 7 3 diagonals:Alternating))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rotate 30 (hex 4))) (piece "PIECE_ALPHA" Each (move Step Forwards (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" {0 1 2 3 4 5 6 7 9 10 11 15 16}) (place "PIECE_ALPHA2" {20 21 25 26 27 29 30 31 32 33 34 35 36})}) (play (forEach Piece)) ### SUF: )) ### MID: (end (if (no Moves Mover) (result Mover Win))) |
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (hand Each size:3) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between)))) (to if:(is Empty (to)))) (move Slide All))) (piece "PIECE_BETA" Each (or (move Hop (between if:(is Enemy (who at:(between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_GAMMA" Each (or (move Hop (between if:(is Enemy (who at:(between)))) (to if:(is Empty (to)))) (move Slide Orthogonal)))}) (rules (start {(place "PIECE_ALPHA" "Hand") (place "PIECE_BETA" "Hand") (place "PIECE_GAMMA" "Hand")}) phases:{(phase "Placement" (play (move (from (sites Occupied by:Mover container:(mover))) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (is Line 3 Mover) (result Mover Win))))) ### MID: (board (square 3)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (piece "PIECE_GAMMA" Neutral) (hand Each)}) (rules (start (place "PIECE_GAMMA0" (sites Board))) (play (if (is Prev Mover) (or {(move Select (from (difference (intersection (sites Left) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) E) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to ### SUF: ))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Right) (sites Row (row of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) W) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Bottom) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) N) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))}))) (move Select (from (difference (intersection (sites Top) (sites Column (column of:(last To)))) (sites {(last To)}))) (then (and {(push (from (last To)) S) (if (or (= (what at:(handSite (mover))) (id "PIECE_GAMMA0")) (= (what at:(handSite (mover))) (mover))) (add (piece (mover)) (to (last To))) (add (piece (next)) (to (last To)))) (remove (handSite (mover)))})))}) (move Select (from (sites Outer)) (then (and (fromTo (from (last To)) (to (handSite (mover)))) (moveAgain)))))) (end {(if (is Line 5 throughAny:(sites LastTo) what:(next)) (result Next Win)) (if (is Line 5 throughAny:(sites LastTo) what:(mover)) (result Mover Win))}))) ### MID: (last To) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 ### SUF: )) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(sites Row 0) (sites Row 1) (sites Row 2) (sites Row 3) (sites {13 14})})) (place "PIECE_ALPHA2" (union {(sites Row 5) (sites Row 6) (sites Row 7) (sites Row 8) (sites {10 11})}))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (wedge 3) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex {3 4 3 4 3})) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2) (piece "PIECE_BETA" Neutral)}) (rules (start (set Score Each 0)) (play (or { ### SUF: (forEach Piece (move Hop (between if:(is Within (id "PIECE_BETA" Neutral) at:(between)) (apply (and (remove (between)) (add (piece (id "PIECE_ALPHA" Mover)) (to (between)))))) (to if:(and (is Empty (to)) (< (count Sites in:(intersection (sites Around (to)) (union (sites Occupied by:Next) (sites Occupied by:Neutral)))) (count Sites in:(intersection (sites Around (from)) (union (sites Occupied by:Next) (sites Occupied by:Neutral))))))) (then (and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2))))) Mover) (forEach Piece (move Hop (between if:(is Next (who at:(between))) (apply (and (remove (between)) (add (piece (id "PIECE_BETA" Neutral)) (to (between)))))) (to if:(and (is Empty (to)) (< (count Sites in:(intersection (sites Around (to)) (union (sites Occupied by:Next) (sites Occupied by:Neutral)))) (count Sites in:(intersection (sites Around (from)) (union (sites Occupied by:Next) (sites Occupied by:Neutral))))))) (then (and (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)) (set Score Next (/ (+ (results from:(sites Occupied by:Next) to:(sites Around (from) if:(is Next (who at:(to)))) 1)) 2))))) Mover) (move Add (piece (id "PIECE_ALPHA" Mover)) (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites Around (to)))))) (move Pass)})) (end (if (all Passed) {(if (> (score Mover) (score Next)) (result Mover Win)) (if (< (score Mover) (score Next)) (result Next Win)) (if (> (count Pieces Mover) (count Pieces Next)) (result Mover Win)) (if (< (count Pieces Mover) (count Pieces Next)) (result Next Win))} (result Next Win))))) ### MID: (forEach Piece (move Step (to (sites Around (from)) if:(and (is Empty (to)) (< (count Sites in:(intersection (sites Around (to)) (union (sites Occupied by:Next) (sites Occupied by:Neutral)))) (count Sites in:(intersection (sites Around (from)) (union (sites Occupied by:Next) (sites Occupied by:Neutral))))))) (then (set Score Mover (/ (+ (results from:(sites Occupied by:Mover) to:(sites Around (from) if:(is Mover (who at:(to)))) 1)) 2)))) Mover) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:2) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:2) (sites Phase 1)))}) (play (priority (forEach Piece "PIECE_ALPHA" (move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (sites Direction from:(from) Diagonal distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))}) (apply (remember Value (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to)))))))) count:(size Stack at:(from)) stack:True (then (if (can Move (move (from (last To)) (to (sites Direction from:(from) (difference Diagonal (directions Cell from:(last To) to:(last From))) distance:(+ 1 (size Stack at:(from)))) if:(and {(is Empty (to)) (= 1 (count Sites in:(intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Between from:(from) to:(to))))) (= 1 (count Steps (to) (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) (not (is In (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))) (values Remembered)))})))) (moveAgain) (do (forEach Site (sites (values Remembered)) (remove (site) count:(size Stack at:(site)))) next:(and (if (or (and (is Odd (size Stack at:(last To))) (is In (last To) (sites ### SUF: ))) (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: (player (+ 1 (% (mover) 2))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules ### SUF: (end (if (all Passed) (byScore {(score P1 (+ (score P1) (size Territory P1))) (score P2 (+ (score P2) (size Territory P2)))}))))) ### MID: (play (or (move Select (from (union (sites Empty) (sites Hidden to:Mover))) (then (priority {(if (not (is In (last To) (sites Empty))) (and {(note player:Mover "made an illegal move") (note player:Mover "to play") (moveAgain)})) (do (add (to (last To)) (then (and {(enclose (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (and (addScore Mover 1) (remove (between)))))) (set Hidden at:(last To) to:Next) (note player:Mover "has moved") (note player:Next "to play")}))) ifAfterwards:(> (count Liberties Orthogonal) 0)) (and {(note player:Mover "made an illegal move") (note player:Mover "to play") (moveAgain)})}))) (move Pass))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "PIECE_ALPHA" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step Forward (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_ZETA") Mover))))) (piece "PIECE_ZETA" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at: ### SUF: )) (move Hop Forward (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (regions "Promotion" P1 (sites Row 5)) (regions "Promotion" P2 (sites Row 2))}) (rules (start {(place "PIECE_EPSILON1" (sites Row 2)) (place "PIECE_EPSILON2" (sites Row 5)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1" state:1) (place "PIECE_ALPHA1" coord:"E1" state:1) (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8" state:1) (place "PIECE_ALPHA2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Draw))}))) ### MID: (from) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (hex 6) cells:{7 9 11 22 24 26 28 41 43 45 47 49 62 64 66 68 79 81 83})) (piece "PIECE_ALPHA" Neutral (flips 1 2))}) (rules phases:{(phase "Placement" (play (move Add (piece "PIECE_ALPHA0" state:(mover)) (to (intersection (sites Empty) (sites Centre))))) (nextPhase Mover (>= (count Moves) 5) "Playing")) (phase "Playing" (play (forEach Site (sites Empty) (append (custodial (from (site)) (between if:(is Enemy (state at:(between))) (apply (allCombinations (add (piece "PIECE_ALPHA0" state:(mover)) (to (site))) (flip (between))))) (to if: ### SUF: )) (then (and (set Score P1 (count Sites in:(sites State 1))) (set Score P2 (count Sites in:(sites State 2)))))))))} (end (if (all Passed) (byScore))))) ### MID: (is Friend (state at:(to))) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Neutral)}) (rules (start {(place "PIECE_ALPHA0" coord:"D5" state:1) (place "PIECE_ALPHA0" coord:"E5" state:2) (place "PIECE_ALPHA0" coord:"E4" state:3) (place "PIECE_ALPHA0" coord:"D4" state:4)}) (play (priority (forEach Site (sites Empty) (append (custodial (from (site)) (between if:(is Enemy (state at:(between))) (apply (allCombinations (add ### SUF: (to (site))) (set State at:(between) (mover))))) (to if:(is Friend (state at:(to))))))) (move Add (piece "PIECE_ALPHA0" state:(mover)) (to (sites Around (sites Occupied by:Neutral) Empty))) (then (forEach Player (set Score Player (count Sites in:(sites State (player)))))))) (end (if (all Passed) (byScore))))) ### MID: (piece "PIECE_ALPHA0" state:(mover)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (remove (merge (scale 1 2 (wedge 5 3)) (shift 0 2 (scale 8 2 (rectangle 3 2)))) edges:{{17 18} {15 16} {13 14}}) edges:{{13 7} {15 4} {17 1} {3 18} {6 16} {9 14}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P1 (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA2" (handSite P2) count:5) (place "PIECE_BETA1" (handSite P1) count:1)}) phases:{(phase "Opening" P1 (play (move (from (handSite Mover)) (to (if (= 0 ### SUF: ) (sites Top) (intersection (sites Empty) (sites {1 2 3})))) (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 "Opening" P2 (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (count Sites in:(intersection (sites Top) (sites Occupied by:Mover))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (remove (hex 7) cells:{0 1 2 4 5 6 7 8 9 12 13 14 15 16 22 23 57 45 70 34 58 82 46 71 69 81 56 44 68 92 55 80 120 121 122 124 125 126 112 113 114 117 118 119 103 104 110 111})) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" P2) (regions "GoalKing" (difference (sites Corners) (expand (sites Centre) steps:4)))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Centre) steps:4) (expand (sites Centre) steps:3))) (place "PIECE_ALPHA2" (difference (expand (sites Centre) steps:2) (sites Centre))) (place "PIECE_ALPHA1" (difference (expand (sites Centre) steps:4) (expand (sites Centre) steps:3))) (place "PIECE_BETA2" (sites Centre))}) (play (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between)))) (to if:(and (not (is In (to) (sites "GoalKing"))) (is Empty (to))) (apply (remove (between)))))) (forEach Piece "PIECE_BETA" (move Hop (between if:(is Enemy (who at:(between)))) (to if:(is Empty (to)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (to if:(and (not (is In (to) (sites "GoalKing"))) (is Empty (to))) (apply (remove (between)))))) (forEach Piece "PIECE_BETA" (move Step (to if:(is Empty ### SUF: )))))})) (end {(if (= (where "PIECE_BETA" P2) -1) (result P1 Win)) (if (is Within (id "PIECE_BETA2") in:(sites "GoalKing")) (result P2 Win))}))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (piece "PIECE_ALPHA" P1)}) (rules (start {(place "PIECE_ALPHA1" (sites Board)) (set Score P1 (count Sites in:(sites Phase 1))) (set Score P2 (count Sites in:(sites Phase 0)))}) (play (do (or (move Select (from (sites Occupied by:P1)) (to (sites Around (from) NotEmpty) if:(and (or (<= (size Stack at:(from)) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from))))) (= 0 (count Sites in:(intersection (sites Empty) (sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from))))))) (all Sites (sites Around (from) NotEmpty) if:(not (and (< (count Sites in:(sites Direction from:(from) ### SUF: stop:(is Empty (to)) distance:(size Stack at:(from)))) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(site)) stop:(is Empty (to)) distance:(size Stack at:(from))))) (or (<= (size Stack at:(from)) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(site)) distance:(size Stack at:(from))))) (= 0 (count Sites in:(intersection (sites Empty) (sites Direction from:(from) (directions Cell from:(from) to:(site)) distance:(size Stack at:(from)))))))))))) (then (forEach Site (sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From))) (if (= (count Sites in:(sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From)))) (count Steps (last From) (site))) (add (piece "PIECE_ALPHA1") (to (site)) count:(- (size Stack at:(last From)) (- (count Sites in:(sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From)))) 1)) stack:True) (add (piece "PIECE_ALPHA1") (to (site)) stack:True))))) (move Select (from (sites Occupied by:P1)) (to (sites Around (from)) if:(and (not (<= (size Stack at:(from)) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from)))))) (not (= 0 (count Sites in:(intersection (sites Empty) (sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from))))))))) (then (forEach Site (sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) distance:(size Stack at:(last From))) (add (piece "PIECE_ALPHA1") (to (site)) stack:True)))) (then (remove (last From) count:(size Stack at:(last From))))) ifAfterwards:(= 1 (count Groups)) (then (and (set Score P1 (count Sites in:(forEach (sites Phase 1) if:(is Occupied (site))))) (set Score P2 (count Sites in:(forEach (sites Phase 0) if:(is Occupied (site))))))))) (end (if (= 0 (* (score P1) (score P2))) (byScore))))) ### MID: (directions Cell from:(from) to:(to)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each ### SUF: )}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom) steps:2)) (place "PIECE_ALPHA2" (expand (sites Top) steps:2))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (or (move Step (directions {Rightward Leftward Forwards}) (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 (hex Triangle 13)) (piece "PIECE_ALPHA" Each)}) (rules (meta (swap)) phases:{(phase "Opening" P1 (play (move Add (to (sites Empty)) (then (set Var (last To))))) (nextPhase)) (phase "Play" (play ### SUF: ))} (end (if (no Moves Next) (byScore {(score P1 (+ (if (is Mover P1) 1 0) (count Sites in:(intersection (sites Around (last To)) (sites Occupied by:P1))))) (score P2 (+ (if (is Mover P2) 1 0) (count Sites in:(intersection (sites Around (last To)) (sites Occupied by:P2)))))}))))) ### MID: (move Add (to (sites LineOfSight Empty at:(var))) (then (set Var (last To)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (tiling T3464 2)) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (play (or (do (move Add (to (sites Empty)) (then (enclose (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (and (remove (between)) (add (to (between))))))))) ifAfterwards:(> (count Liberties) 0)) (move Pass (then (addScore Mover 1))))) ### SUF: )) ### MID: (end (if (all Passed) (byScore {(score P1 (+ {(score P1) (size Territory P1) (count Sites in:(sites Occupied by:P1))})) (score P2 (+ {(score P2) (size Territory P2) (count Sites in:(sites Occupied by:P2))}))}))) |
### 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) count:12) (place Stack "PIECE_ALPHA2" (handSite P2) count:12)}) phases:{(phase "Placement" (play (if (is Prev Mover) (move (from (handSite Mover)) (to (forEach (sites Occupied by:Next container:"Board") if:(= (size Stack at:(site)) 1)))) (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 if:(= 1 (size Stack at:(to)))) (moveAgain))))) (then (if (and (not (is Next Mover)) (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))))) (and (forEach Site (forEach (sites Occupied by:P1 container:"Board") if:(= (size Stack at:(site)) 2)) (and {(remove (site)) (remove (site)) (add (piece (id "PIECE_ALPHA" P1)) (to (site)))})) (forEach Site (forEach (sites Occupied by:P2 container:"Board") if:(= (size Stack at:(site)) 2)) (and { ### SUF: (remove (site)) (add (piece (id "PIECE_ALPHA" P2)) (to (site)))}))))))) (nextPhase (and (not (is Next Mover)) (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (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 (no Moves Next) (result Mover Win))))})) ### MID: (remove (site)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (from (from) level:(level)) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_BETA" Each (move Slide (from (from) level:(level)) Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_GAMMA" Each (move Hop (from (from) level:(level)) Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_DELTA" Each (move Leap (from (from) level:(level)) {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_EPSILON" Each (move Step (from (from) level:(level)) Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_ZETA" Each (or (move Step (from (from) level:(level)) Forward (to if:(is Empty (to)))) (move Step (from (from) level:(level)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (forEach Level (to) (remove (to) level:(level)))))) (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (id "PIECE_EPSILON" Mover))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_GAMMA1" (sites {"C1" "F1"})) (place "PIECE_BETA1" (sites {"C2" "F2"})) (place "PIECE_DELTA1" (sites {"D2" "E2"})) (place "PIECE_ALPHA1" coord:"E1") ### SUF: (place Stack "PIECE_EPSILON1" (sites {"D3"})) (place "PIECE_GAMMA2" (sites {"C8" "F8"})) (place "PIECE_BETA2" (sites {"C7" "F7"})) (place "PIECE_DELTA2" (sites {"D7" "E7"})) (place "PIECE_ALPHA2" coord:"E8") (place Stack "PIECE_ZETA2" (sites Row 5)) (place Stack "PIECE_EPSILON2" (sites {"D6"}))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win))}))) ### MID: (place Stack "PIECE_ZETA1" (sites Row 2)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- 7 3) 2) (rectangle 3 7 diagonals:Alternating)) (shift (/ (- 7 3) 2) 0 (rectangle 7 3 diagonals:Alternating))) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_ALPHA" P2 (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" ### SUF: ) (place "PIECE_ALPHA2" (union (expand (union (sites Right) (sites Left))) (expand (sites Bottom) steps:3)))}) (play (if (is Mover P1) (do (forEach Site (sites From (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (remember Value "From" (site))) next:(forEach Piece) (then (and (if (!= 0 (count Sites in:(sites (values Remembered "From")))) (if (= 1 (count Steps (last From) (last To))) (and (forEach Site (sites (values Remembered "From")) (remove (site))) (if (is In (last From) (sites (values Remembered "From"))) (remove (last To)))))) (forget Value All)))) (forEach Piece))) (end {(if (no Pieces P2) (result P1 Win)) (if (or (or (no Pieces P1) (no Moves P1)) (all Sites (expand (sites Top) steps:2) if:(= (who at:(site)) P2))) (result P2 Win))}))) ### MID: (sites {"C6" "E6"}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(shift 2 2 (square 5 diagonals:Alternating)) (shift 2 0 (wedge 3)) (shift 5 3 (rotate 90 (wedge 3))) (shift 2 6 (rotate 180 (wedge 3))) (shift -1 3 (rotate 270 (wedge 3)))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom) steps:2) (expand (sites Right) steps:3) (sites {"F3" "G3" "E4" "F4" "F6" "F7" "G7"})})) (place "PIECE_ALPHA2" (union { ### SUF: (expand (sites Left) steps:3) (sites {"C3" "D3" "D4" "D6" "E6" "D7" "C7"})}))}) (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))) ### MID: (expand (sites Top) steps:2) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (from (from) level:(level)) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_BETA" Each (move Slide (from (from) level:(level)) Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_GAMMA" Each (move Hop (from (from) level:(level)) Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_DELTA" Each (move Leap (from (from) level:(level)) {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_EPSILON" Each (move Step (from (from) level:(level)) Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) (remove (to) level:(level)))))))) (piece "PIECE_ZETA" Each (or (move Step (from (from) level:(level)) Forward (to if:(is Empty (to)))) (move Step (from (from) level:(level)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (forEach Level (to) (remove (to) level:(level)))))) (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (id "PIECE_EPSILON" Mover))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_GAMMA1" (sites {"C1" "F1"})) (place "PIECE_BETA1" (sites {"C2" "F2"})) (place "PIECE_DELTA1" (sites {"D2" "E2"})) (place "PIECE_ALPHA1" coord:"E1") (place Stack "PIECE_ZETA1" (sites Row 2)) (place Stack "PIECE_EPSILON1" (sites {"D3"})) (place "PIECE_GAMMA2" (sites {"C8" "F8"})) (place "PIECE_BETA2" (sites {"C7" "F7"})) (place "PIECE_DELTA2" (sites {"D7" "E7"})) (place "PIECE_ALPHA2" coord:"E8") (place Stack "PIECE_ZETA2" (sites Row 5)) (place Stack "PIECE_EPSILON2" (sites {"D6"}))}) (play (do (forEach Piece) ifAfterwards: ### SUF: )) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win))}))) ### MID: (not (is Threatened (id "PIECE_ALPHA" Mover))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (remove (merge {(shift 0.4 -1 (scale 0.6 (rectangle 1 3))) (shift 0.2 0 (scale 0.8 2 (wedge 2))) (shift 0 -0.5 (scale 1 2.5 (wedge 2)))}) edges:{{3 8} {3 7} {3 9}}) edges:{{6 9} {4 7} {1 8}}) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 (move Step (to if: ### SUF: )))}) (rules (start {(place "PIECE_ALPHA1" (sites Top)) (place "PIECE_BETA2" (sites Bottom))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (is Empty (to)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 13) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "51,W,S1,E,S1,W,S1,E" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (if (or (= (state at:(from)) 0) (and (= (count Pips) 1) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(count Pips)) -1) (if (or (is In (trackSite Move steps:(count Pips)) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(count Pips))))) (move (from) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (do (roll) next:(forEach Piece))) (end {(if ### SUF: (result Next Loss)) (if (and (= (count Sites in:(difference (sites Occupied by:P1) (sites P2))) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites P1))) 0)) (result Mover Draw))}))) ### MID: (no Pieces Next) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (intersect {(hex 7) (shift -5.2 0 (hex Rectangle 7 14))})) (piece "PIECE_ALPHA" Each)}) (rules (play (do (move Add (to (sites Empty)) (then (enclose (from (last To)) (between if:(is Enemy (who at:(between))) (apply (remove (between))))))) ifAfterwards: ### SUF: )) (end (if (is Line 5) (result Mover Win))))) ### MID: (> (count Liberties Orthogonal) 0) |
### 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 (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (set Value Mover 0))) (move Slide (then (set Value Mover 1))))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (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)))) ### SUF: (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: (to if:(is Empty (to))) |
### 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 (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 ### SUF: ))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (forEach Piece)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" P1 (move Step (to if:(is Empty (to))))) (piece "PIECE_BETA" P2 ### SUF: ) (hand P1)}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:20) (place "PIECE_BETA2" (sites Corners))}) phases:{(phase "Placement" P1 (play (move (from (handSite P1)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Moving")) (phase "Moving" (play (forEach Piece)))} (end {(if (no Moves P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win))}))) ### MID: (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))))) |
### 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 { ### SUF: (place Stack "PIECE_ALPHA2" (sites {13 14 15 16 17 18}) count:2)}) phases:{(phase "UnStacking" (play (do (if (or (is Pending) (not (is Prev Mover))) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 0) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 1)) (if (not (all DiceUsed)) (moveAgain))))))) (then (if (all DiceEqual) (and (set Pending) (moveAgain)))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(site)) 0))) "Stacking")) (phase "Stacking" (play (do (if (or (is Pending) (not (is Prev Mover))) (roll)) next:(forEach Die if:(!= (pips) 0) (if (= (state at:(trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) 1) (move Select (from (trackSite Move from:(mapEntry "StartTrack" (mover)) steps:(- (pips) 1))) (then (and (forEach Level (last To) (set State at:(last To) level:(level) 0)) (if (not (all DiceUsed)) (moveAgain))))))) (then (if (all DiceEqual) (and (set Pending) (moveAgain)))))) (nextPhase Mover (all Sites (sites Occupied by:Mover) if:(not (= (state at:(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: (place Stack "PIECE_ALPHA1" (sites {7 8 9 10 11 12}) count:2) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Step ### SUF: ) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (to if:(is Empty (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" {24 11 10 9 8 7 6 5 4 3 2 1 0 12 13 14 15 16 17 18 19 20 21 22 23 -2} P1 directed:True) (track "Track2" {25 23 22 21 20 19 18 17 16 15 14 13 12 0 1 2 3 4 5 6 7 8 9 10 11 -2} P2 directed:True)} use:Vertex) (dice d:6 num:2) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (= (trackSite Move from:(from) steps:(pips)) -2) (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "FinalQuadrant"))) (move Remove (from))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next))))))) (then (if (not (all DiceUsed)) (moveAgain))))) (hand Each) (regions "FinalQuadrant" P1 (sites {18 19 20 21 22 23})) (regions "FinalQuadrant" P2 (sites {6 7 8 9 10 11}))}) (rules (start {(place Stack "PIECE_ALPHA1" 6 count:5) (place Stack "PIECE_ALPHA1" 4 count:3) (place Stack "PIECE_ALPHA1" 12 count:5) (place Stack "PIECE_ALPHA1" 23 count:2) (place Stack "PIECE_ALPHA2" 18 count:5) (place Stack "PIECE_ALPHA2" 16 count:3) (place Stack "PIECE_ALPHA2" 0 count:5) (place Stack "PIECE_ALPHA2" 11 count:2)}) (play (do (if (not (is Prev Mover)) (roll)) next:(priority {(if (is Occupied (handSite Mover)) (forEach Die if:(!= (pips) 0) (move (from ### SUF: ) (to (trackSite Move from:(handSite Mover) steps:(pips)) if:(< (size Stack at:(to)) 2) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next)))))) (then (if (not (all DiceUsed)) (moveAgain))))) (if (is Empty (handSite Mover)) (max Distance (forEach Piece top:True)))}))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (handSite Mover) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at: ### SUF: )) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(sites Row 0) (sites Row 1) (sites Row 2) (sites Row 3)})) (place "PIECE_ALPHA2" (union {(sites Row 5) (sites Row 6) (sites Row 7) (sites Row 8)}))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (between) |
### 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 0 1 2 3 4 5 7 8 9 10 11 12 25 24 23 22 21 20 18 17 16 15 14 13} P2 directed:True)} use:Vertex) (dice num:2) (map {(pair 1 19) (pair 2 6)}) (piece "PIECE_ALPHA" Each)}) (rules (start {(place Stack "PIECE_ALPHA1" 12 count:15) (place Stack "PIECE_ALPHA2" 11 count:14) (place Stack "PIECE_ALPHA2" 10)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (all DiceUsed) (forEach Site (sites Occupied by:Mover) (if (= (trackSite Move from:(site) steps:6) -1) (move Remove (site)) ### SUF: )) (forEach Die if:(!= (pips) 0) (forEach Site (sites Occupied by:Mover) (if (= (trackSite Move from:(site) steps:(pips)) -1) (move Remove (site)) (move (from (site)) (to (trackSite Move from:(site) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry (mover))))))))) (then (moveAgain)))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (move (from (site)) (to (trackSite Move from:(site) steps:6) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry (mover))))))) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (add (hole (merge (shift 0 (/ (- 19 3) 2) (rectangle 3 19)) (shift (/ (- 19 3) 2) 0 (rectangle 19 3))) (poly {{8 8} {8 11} {11 11} {11 8}})) cells:{{8 28 48 68 69 70 71 51 31 11 10 9}}) {(track "Track1" "96,9,S,E1,N,11,E,N,W,53,N,W,S,42,W,S,E,8,S,E1,N8" P1 directed:True) (track "Track2" "96,26,W,S,E,8,S,E,N,11,E,N,W,53,N,W,S,42,W,S1,E8" P2 directed:True) (track "Track3" "96,52,N,W,S,42,W,S,E,8,S,E,N,11,E,N,W,53,N,W1,S8" P3 directed:True) (track "Track4" "96,27,E,N,W,53,N,W,S,42,W,S,E,8,S,E,N,11,E,N1,W8" P4 directed:True)}) (hand Each) (dice d:2 from:0 num:6) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -1) (move Remove (from)) (move (from (from)) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not ### SUF: ))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))) (map "Throw" {(pair 0 6) (pair 1 10) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 25) (pair 6 12)}) (regions "SafeSites" (sites {60 62 16 48 87 89 37 2}))}) (rules (start (place "PIECE_ALPHA" "Hand" count:4)) (play (do (roll) next:(or (forEach Piece) (if (and (is In (mapEntry "Throw" (count Pips)) (array {10 25})) (is Occupied (handSite Mover))) (move (from (handSite Mover)) (to (centrePoint) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (is In (to) (sites "SafeSites")) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "PIECE_ALPHA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between (exact 2) if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_ZETA") Mover))))) (piece "PIECE_ZETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_EPSILON1" (sites Row 1)) (place "PIECE_EPSILON2" (sites Row 6)) (place "PIECE_BETA1" {"A1" "H1"}) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1") (place "PIECE_BETA2" {"A8" "H8"}) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))) (then (if (and (> (count Pieces P1) 1) (> (count Pieces P2) 1)) (set Counter))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) ### SUF: ) (if (and (or (= (count Pieces P1) 1) (= (count Pieces P2) 1)) (= (counter) 20)) (result Mover Draw))}))) ### MID: (result Mover Win) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (or (move Step Orthogonal (to if:(is Empty ### SUF: ))) (move Hop Orthogonal (between (range 1 (count Rows)) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(or (and (is In (to) (sites Outer)) (is Enemy (who at:(to)))) (is Empty (to))))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:20)) (play (or (move (from (handSite Mover)) (to (sites Empty)) count:2) (forEach Piece))) (end (if (and (all Sites (sites Hand Next) if:(= 0 (count Cell at:(site)))) (no Pieces Next)) (result Mover Win))))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (hand Each) (piece "PIECE_ALPHA" Each (if (is Line 4 Orthogonal through:(from) exact:True) (move Step Orthogonal (to if:(is Empty (to))) (then (and {(if (and (!= (last From) (ahead (last From) N)) (= (mover) (who at:(ahead (last From) N)))) (if (is Line 3 Orthogonal through:(ahead (last From) N) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) S)) (= (mover) (who at:(ahead (last From) S)))) (if (is Line 3 Orthogonal through:(ahead (last From) S) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) E)) (= (mover) (who at:(ahead ### SUF: E)))) (if (is Line 3 Orthogonal through:(ahead (last From) E) exact:True) (and (moveAgain) (addScore Mover 1)))) (if (and (!= (last From) (ahead (last From) W)) (= (mover) (who at:(ahead (last From) W)))) (if (is Line 3 Orthogonal through:(ahead (last From) W) exact:True) (and (moveAgain) (addScore Mover 1))))}))) (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (and (moveAgain) (addScore Mover 1)))))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "PlacementCenter" (play (move (from (handSite Mover)) (to (forEach (sites Centre) if:(is Empty (site)))))) (nextPhase (= (count Moves) 4) "Placement")) (phase "Placement" (play (if (!= 0 (score Mover)) (move Remove (sites Occupied by:Next container:"Board") (then (and (set Score Mover (- (score Mover) 1)) (if (< 1 (score Mover)) (moveAgain))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal exact:True) (and (moveAgain) (addScore Mover 1))))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (!= 0 (score Mover)) (move Remove (sites Occupied by:Next container:"Board") (then (and (set Score Mover (- (score Mover) 1)) (if (< 1 (score Mover)) (moveAgain))))) (forEach Piece))) (end (if (<= (count Pieces Next) 2) (result Next Loss))))})) ### MID: (last From) |
### 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 ### SUF: (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 (sites Incident Cell of:Cell at:(if (!= (between) -1) (between) (from))) (sites Incident Cell of:Cell at:(to))) if:(is Occupied (site))))))))) (forEach Piece))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (between if:(is Empty (between))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4) {(track "Track1" {14 14 11 10 9 8 8 13 9 5 1 1 4 5 6 7 7 2 6 10} loop:True directed:True) (track "Track2" {11 11 14 10 6 2 2 7 6 5 4 4 1 5 9 13 13 8 9 10} loop:True directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (or {(move Step Orthogonal (to if:(is Empty (to)))) (move Slide "AllTracks" (between if:(or (= (between) (from)) (is Empty (between)))) (to if:(is Enemy ### SUF: ) (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: (who at:(to)) |
### 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 Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (hand P1)}) (rules (start {(place Stack "PIECE_BETA2" (centrePoint)) (place Stack "PIECE_ALPHA1" (handSite P1) count:24)}) phases:{(phase "Placement" P1 (play (move (from ### SUF: ) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))))) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves P2) (result P1 Win)) (if (no Pieces P1) (result P2 Win))}))) ### MID: (handSite P1) |
### 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: ### SUF: )) (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 (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: (not (is Line 3 Orthogonal through:(site))) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (merge {(add (merge {(square 2) (shift 4 0 (square 2)) (shift 0 4 (square 2)) (shift 4 4 (square 2))}) edges:{{2 9} {5 12} {8 15} {6 18} {8 20} {15 27} {17 29} {20 27} {23 30} {26 33} {7 19} {16 28}})}) {(track "Track1" "2,E,N,W,S,E1,N3,E2,S2,W1,N1" P1 directed:True) (track "Track2" "6,S,E,N,W,S1,E3,S2,W2,N1,E1" P2 directed:True) (track "Track3" "20,W,S,E,N,W1,S3,W2,N2,E1,S1" P3 directed:True) (track "Track4" "14,N,W,S,E,N1,W3,N2,E2,S1,W1" P4 directed:True)}) (dice d:2 from:0 num:4) (piece "PIECE_ALPHA" Each (move (from (from) level:(level)) (to (trackSite Move from:(from) steps:(mapEntry "Throw" (count Pips))) if:True (apply (if (< 1 (mapEntry "Throw" (count Pips))) (forEach Site (sites Track Mover "Track" from:(trackSite Move from:(from) steps:1) to:(trackSite Move from:(from) steps:(- (mapEntry "Throw" (count Pips)) 1))) (if (not (is In (sites "SafeSites"))) (forEach Level ### SUF: FromTop (if (is Enemy (who at:(site) level:(level))) (fromTo (from (site) level:(level)) (to (mapEntry "Entry" (who at:(site) level:(level)))))))))))))) (regions "SafeSites" (sites {2 6 14 20})) (map "Throw" {(pair 0 8) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (map "Entry" {(pair P1 2) (pair P2 6) (pair P3 20) (pair P4 14)})}) (rules (start {(place Stack "PIECE_ALPHA1" 2 count:4) (place Stack "PIECE_ALPHA2" 6 count:4) (place Stack "PIECE_ALPHA3" 20 count:4) (place Stack "PIECE_ALPHA4" 14 count:4)}) (play (do (roll) next:(forEach Piece) (then (if (and (= (mapEntry "Throw" (count Pips)) 4) (not (is Prev Mover))) (moveAgain))))) (end (if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites {(centrePoint)}))) (result Mover Win))))) ### MID: (site) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 17) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" (sites {"C7" "K15" "C15" "G3" "O11" "O3"}) state:1) (place "PIECE_ALPHA2" (sites {"C3" "K3" "C11" "G15" "O15" "O7"}) state:1)}) (play (move Add (to (sites Empty) if:(= (state at:(to)) 0)) (then (and (forEach Site (sites Empty) (if (!= 0 (state at:(site))) (set State at:(site) 0))) (enclose (from (last To)) Orthogonal (between if:(or (is Enemy (who at:(between))) (is Empty (between))) (apply (and (if (is Enemy (who at:(between))) (remove (between))) (set State at:(between) (mover)))))))))) (end (if (and (no Moves P1) (no Moves P2)) (byScore {(score P1 (+ (count Pieces P1) (size Territory P1))) ### SUF: }))))) ### MID: (score P2 (+ (count Pieces P2) (size Territory P2))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 9 6)) (piece "PIECE_ALPHA" Each (or {(if (not (all Sites (sites Around (from) Orthogonal) if:(not (= (what at:(site)) (id "PIECE_ALPHA" Mover))))) (move Slide Orthogonal (between if:(and (is Empty (between)) (not (is In (between) (sites "BlackenedSquares"))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to))))))) (if (not (all Sites (sites Around (from) Diagonal) if:(not (= (what at:(site)) (id "PIECE_ALPHA" Mover))))) (move Slide Diagonal (between if:(and (is Empty (between)) (not (is In (between) (sites "BlackenedSquares"))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy ### SUF: ) (remove (to))))))) (if (not (all Sites (forEach (sites Around (sites To (hop Orthogonal (between if:True) (to if:True))) Orthogonal) if:(= 2 (count Steps (from) (site)))) if:(!= (what at:(site)) (id "PIECE_ALPHA" Mover)))) (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites "BlackenedSquares")))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to)))))))})) (piece "PIECE_BETA" Each) (hand Each) (regions "BlackenedSquares" (sites {"A2" "B3" "B5" "C6" "D4" "E5" "E7" "F8"})) (regions "PawnStart" P1 (sites {"E1" "E2" "F2" "D2" "D3" "E3"})) (regions "PawnStart" P2 (sites {"B9" "B8" "A8" "C8" "C7" "B7"}))}) (rules (start {(place "PIECE_ALPHA" "Hand" count:3) (place "PIECE_ALPHA1" (sites P1 "PawnStart")) (place "PIECE_ALPHA2" (sites P2 "PawnStart")) (place "PIECE_BETA1" coord:"F1") (place "PIECE_BETA2" coord:"A9")}) (play (or (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_BETA" Mover)))) (if (is Occupied (handSite Mover)) (move (from (sites Hand)) (to (sites Mover "PawnStart") if:(is Empty (to))))))) (end {(if (and (is Threatened (id "PIECE_BETA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_BETA" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))}))) ### MID: (who at:(to)) |
### 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 ### SUF: ))) (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}))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:4) (sites {40 41 42 43 44})))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (between) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Diamond 11)) (piece "PIECE_ALPHA" Each)}) (rules (meta ### SUF: ) (play (move Add (to (sites Empty)))) (end (if (is Line 4 Diagonal) (result Mover Win))))) ### MID: (swap) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) ### SUF: (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom) steps:(- (/ 8 2) 2))) (place "PIECE_ALPHA2" (expand (sites Top) steps:(- (/ 8 2) 2)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions Forwards) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (piece "PIECE_BETA" Each) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4 pyramidal:True) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (play (move Add (to (sites Empty) if:(is Flat)))) ### SUF: )) ### MID: (end {(if (is Line (- (count Rows) (layer of:(last To))) SameLayer) (result Mover Win)) (if (is Line (- (- (count Rows) (layer of:(last To))) 1) SameLayer) (result Mover Loss))}) |
### 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" (union (expand (sites Bottom)) (sites Row 2))) (place "PIECE_ALPHA1" (handSite P1))}) phases:{(phase "Placement" P1 (play ### SUF: ) (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: (move (from (handSite P1)) (to (sites Empty))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13)) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (sites Empty)))) (nextPhase "General")) (phase "General" (play (do (move Add (to (sites Empty)) (then (if (not ### SUF: ) (moveAgain)))) ifAfterwards:(and (not (is Line 5)) (!= 1 (+ {(if (is Line 4 N exact:True) 1 0) (if (is Line 4 NE exact:True) 1 0) (if (is Line 4 E exact:True) 1 0) (if (is Line 4 SE exact:True) 1 0)}))))))} (end (if (<= 2 (+ {(if (is Line 4 N exact:True) 1 0) (if (is Line 4 NE exact:True) 1 0) (if (is Line 4 E exact:True) 1 0) (if (is Line 4 SE exact:True) 1 0)})) (result Mover Win))))) ### MID: (is Prev Mover) |
### 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) (pair 2 36) (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 ### SUF: 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: (trackSite Move "TrackCW" steps:(mapEntry "Throw" (count Pips))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (play (move Add (to (sites Empty)))) (end (if (or {(= 3 (count Sites in:(forEach (sites Row (row of:(last To))) if:(is Friend (who at:(site)))))) (= 3 (count Sites in:(forEach (sites Column (column of:(last To))) if:(is Friend (who at:(site)))))) (= 3 (count Sites in:(forEach (union (sites Direction from:(last To) NE included:True) (sites Direction from:(last To) SW)) if:(is Friend (who at:(site)))))) ### SUF: }) (result Mover Loss))))) ### MID: (= 3 (count Sites in:(forEach (union (sites Direction from:(last To) NW included:True) (sites Direction from:(last To) SE)) if:(is Friend (who at:(site)))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (and (not (is Prev Mover)) (is Line 3)) (moveAgain) (if (no Moves Next) (and (moveAgain) (set Pending))))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)) (then (and (if (and (< (var) 1) (is Line 3)) (set Var (mover))) (if (and (all Sites ### SUF: if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site))))) (if (< (var) 1) (moveAgain) (set NextPlayer (player (var))))))))) (nextPhase (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site))))) "Remove")) (phase "Remove" (play (move Remove (sites Occupied by:Next container:"Board"))) (nextPhase Mover "Move")) (phase "Move" (play (if (and (not (is Pending)) (is Prev Mover)) (move Remove (sites Occupied by:Next container:"Board") (then (if (no Moves Next) (and (moveAgain) (set Pending))))) (if (is Pending) (do (forEach Piece (move Step (to if:(is Empty (to))))) ifAfterwards:(can Move (forEach Piece Next))) (forEach Piece)) (then (if (= 2 (count Pieces P1)) (addScore P2 1 (then (if (!= (score P2) 5) (and {(remove (sites Occupied by:All)) (add (piece (id "PIECE_ALPHA" P1)) (to (handSite P1)) count:12) (add (piece (id "PIECE_ALPHA" P2)) (to (handSite P2)) count:12)})))) (if (= 2 (count Pieces P2)) (addScore P1 1 (then (if (!= (score P1) 5) (and {(remove (sites Occupied by:All)) (add (piece (id "PIECE_ALPHA" P1)) (to (handSite P1)) count:12) (add (piece (id "PIECE_ALPHA" P2)) (to (handSite P2)) count:12)}))))))))) (nextPhase (= 0 (count Sites in:(sites Occupied by:All container:"Board"))) "Placement"))} (end (if (= (score Mover) 5) (result Mover Win))))) ### MID: (sites Hand P1) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square Diamond 10)) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Phase 0) if:(is Odd (site)))) (place "PIECE_ALPHA2" (forEach (sites Phase 0) if: ### SUF: ))}) (play (or (move Add (to (sites Around (sites Occupied by:Mover) Empty Orthogonal))) (move Select (from (sites Occupied by:Enemy)) (then (forEach Site (sites Group at:(last From) Orthogonal) (remove (site))))))) (end {(if (= 1 (count Groups Orthogonal if:(= (who at:(to)) P1))) (result P1 Win)) (if (= 1 (count Groups Orthogonal if:(= (who at:(to)) P2))) (result P2 Win))}))) ### MID: (is Even (site)) |
### 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 (sites Hand P2) if:(= 0 (count Cell at: ### SUF: ))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (is Line 3 Orthogonal) (result Mover Win))))) ### MID: (site) |
### 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 0 1 2 3 4 5 7 8 9 10 11 12 25 24 23 22 21 20 18 17 16 15 14 13} P2 directed:True)} use:Vertex) (dice num:2) (map {(pair 1 19) (pair 2 6)}) (piece "PIECE_ALPHA" Each)}) (rules (start {(place Stack "PIECE_ALPHA1" 12 count:5) (place Stack "PIECE_ALPHA1" 20 count:4) (place Stack "PIECE_ALPHA1" 21 count:4) (place Stack "PIECE_ALPHA1" 14 count:2) (place Stack "PIECE_ALPHA2" 25 count:3) (place Stack "PIECE_ALPHA2" 24 count:3) (place Stack "PIECE_ALPHA2" 23 count:3) (place Stack "PIECE_ALPHA2" 22 count:3) (place Stack "PIECE_ALPHA2" 21 count:3)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (all DiceUsed) (forEach Site (sites Occupied by:Mover) (if (= (trackSite Move from:(site) steps:6) -1) (move Remove (site)) (move (from (site)) (to (trackSite Move from:(site) steps:6) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry (mover))))))))) (forEach Die if:(!= (pips) 0) (forEach Site (sites Occupied by:Mover) (if (= (trackSite Move from:(site) steps:(pips)) -1) (move Remove (site)) (move (from (site)) (to (trackSite Move from:(site) steps:(pips)) if:(or (not (is Enemy (who at:(to)))) (= 1 (size Stack at:(to)))) (apply if:(is Enemy ### SUF: ) (fromTo (from (to)) (to (mapEntry (mover))))))))) (then (moveAgain)))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (who at:(to)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove ### SUF: ))))) (piece "PIECE_GAMMA" (move Hop Orthogonal (between (exact 1) if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))})) (piece "PIECE_ZETA" (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_GAMMA1" {"A1" "H1"}) (place "PIECE_BETA1" {"B1" "G1"}) (place "PIECE_DELTA1" {"C1" "F1"}) (place "PIECE_ZETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1") (place "PIECE_GAMMA2" {"A8" "H8"}) (place "PIECE_BETA2" {"B8" "G8"}) (place "PIECE_DELTA2" {"C8" "F8"}) (place "PIECE_ZETA2" coord:"E8") (place "PIECE_ALPHA2" coord:"D8")}) (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 (= (count Pieces Next) 1) (result Mover Loss))}))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7) {(track "Track1" "27,N,W,S,E,N2,SW1,W4,N4,E4,S3,W3,N2,E2,S1,W1" P1 directed:True) (track "Track2" "21,S,E,N,W,S2,NE1,E4,S4,W4,N3,E3,S2,W2,N1,E1" P2 directed:True)}) (piece "PIECE_ALPHA" Each (if (and (is In (from) (sites Board)) (!= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -1)) (move (from (from) level:(level)) ### SUF: ) (then (if (= 24 (last To)) (remove (last To)))))) (hand Each) (dice d:2 from:0 num:4) (map {(pair 1 "G4") (pair 2 "A4") (pair 3 "D1") (pair 4 "D7")}) (map "Throw" {(pair 0 8)}) (regions "ProtectedSites" (sites {0 3 6 21 27 3 45 42 48 24}))}) (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) (move Pass) (if (and (is In (count Pips) (array {0 4})) (!= 0 (who at:(handSite Mover)))) (move (from (handSite Mover)) (to (mapEntry Mover))))}) (then (if (is In (count Pips) (array {0 4})) (moveAgain))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) (apply if:(and (not (is In (to) (sites "ProtectedSites"))) (is Enemy (who at:(to)))) (and (fromTo (from (to)) (to (handSite (who at:(to))))) (moveAgain)))) |
### 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 ### SUF: (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (if (can Move (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site)))))) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move Remove (sites Occupied by:Enemy container:"Board"))) (if (> (count Pieces Mover) 3) (forEach Piece) (move (from (sites Occupied by:Mover)) (to (sites Empty)))))))} (end (if (<= (count Pieces Next) 2) (result Next Loss))))) ### MID: (is Line 3 Orthogonal exact:True) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (regions P1 {(sites Side N) (sites Side S)}) (regions P2 {(sites Side W) (sites Side E)}) (piece "PIECE_ALPHA" P1) (piece "PIECE_ALPHA" P2)}) (rules (play (if (not (is Prev Mover)) (or (move Add (to (sites Empty)) (then (if (and (not (is Prev Mover)) (< 0 (count Sites in:(sites (results from:(last To) to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" (last To) (then (moveAgain))) (set Var "LT" -1)))) (forEach Site (sites Occupied by:Mover) (do (set Var "LT" (site)) next:(forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))) Orthogonal)) (move (from (var "LT")) (to (site) if:(!= (last From) (to)) (apply (remove (site)))) (then (and (add (piece (id "PIECE_ALPHA" Next)) (to (var "LT"))) ### SUF: ))))))) (if (<= 0 (var "LT")) (forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))) Orthogonal)) (move (from (var "LT")) (to (site) if:(!= (last From) (to)) (apply (remove (site)))) (then (and (add (piece (id "PIECE_ALPHA" Next)) (to (var "LT"))) (set Var "LT" (last To) (then (if (< 0 (count Sites in:(sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))))) (set NextPlayer (player (mover))) (set Var "LT" -1)))))))) (move Add (to (sites Empty)) (then (if (and (not (is Prev Mover)) (< 0 (count Sites in:(sites (results from:(last To) to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" (last To) (then (moveAgain))) (set Var "LT" -1))))))) (end {(if (is Connected Orthogonal Mover) (result Mover Win))}))) ### MID: (set Var "LT" (last To) (then (if (< 0 (count Sites in:(sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))))) (set NextPlayer (player (mover))) (set Var "LT" -1)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment { ### SUF: (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (custodial (from (last To)) (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(= (what at:(to)) (what at:(last To))))))))}) (rules (start {(place "PIECE_ALPHA1" {"A3" "B3" "B4" "B2"}) (place "PIECE_ALPHA2" {"D2" "D3" "E3" "D4"})}) (play (forEach Piece)) (end (if (<= (count Pieces Next) 1) (result Next Loss))))) ### MID: (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) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" P1 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then ### SUF: ))) (piece "PIECE_ALPHA" P2 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and {(surround (from (last To)) Orthogonal (between if:(and {(= (between) (centrePoint)) (= (what at:(between)) (id "PIECE_BETA" P1)) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:3) (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))})))) (piece "PIECE_BETA" P1 (move Step (to if:(is Empty (to))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) (regions "Fortresses" (sites Corners))}) (rules (start {(place "PIECE_BETA1" (centrePoint)) (place "PIECE_ALPHA2" (sites "Fortresses")) (place "PIECE_ALPHA1" {"D3" "C4" "E5"})}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA1") in:(sites "Fortresses")) (result P1 Win)) (if (= (where "PIECE_BETA" P1) -1) (result P2 Win))}))) ### MID: (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(shift 1 0 (rectangle 4 2)) (shift 0 1 (rectangle 2 4))}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(and (= 0 (state at:(to))) (if (< (count MovesThisTurn) 2) (is Empty (to)) (is In (to) (union (sites Occupied by:Next) (sites Empty))))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (= 2 (count Sites in:(forEach (sites Board) if: ### SUF: ))) (forEach Site (sites Board) (if (= 1 (state at:(site))) (set State at:(site) 0))) (and (set State at:(last From) 1) (moveAgain))))))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (if (is Prev Mover) (move Step (from (last To)) (to if:(and (= 0 (state at:(to))) (if (< (count MovesThisTurn) 2) (is Empty (to)) (is In (to) (union (sites Occupied by:Next) (sites Empty))))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (= 2 (count Sites in:(forEach (sites Board) if:(= 1 (state at:(site)))))) (forEach Site (sites Board) (if (= 1 (state at:(site))) (set State at:(site) 0))) (and (set State at:(last From) 1) (moveAgain))))) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (= 1 (state at:(site))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(rectangle 1 8) (shift -4 1.5 (rectangle 1 12)) (shift 0 3 (rectangle 1 8))}) vertices:{{-1 0.1} {-2 0.3} {-2.9 0.5} {-3.6 0.8} {-1 2.9} {-2 2.7} {-2.9 2.5} {-3.6 2.2}}) {(track "Track1" {31 30 29 28 0 1 2 3 4 5 6 7 19 18 17 16 15 14 13 12 11 10 9 8 35 34 33 32 20 21 22 23 24 25 26 27 19 18 17 16 15 14 13 12 11 10 9 8} loop:True P1) (track "Track2" {35 34 33 32 20 21 22 23 24 25 26 27 19 18 17 16 15 14 13 12 11 10 9 8 31 30 29 28 0 1 2 3 4 5 6 7 19 18 17 16 15 14 13 12 11 10 9 8} loop:True P2)} use:Vertex) (regions "AllSites" (sites Board)) (dice d:4 num:2) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 1) (and (= (state at:(from)) 0) (= 1 (pips)))) (move Slide "Track1" (between (exact (pips)) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply if:(not (is Friend (who at:(to)))) (remove (to)))) (then (if (= (state at:(last To)) 0) (set State at:(last To) 1)))))) (piece "PIECE_ALPHA" P2 (if (or (= (state at:(from)) 1) (and (= (state at:(from)) 0) (= 1 (pips)))) (move Slide "Track2" (between (exact (pips)) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply if:(not (is Friend (who at:(to)))) (remove (to)))) (then (if (= (state at:(last To)) 0) (set State at:(last To) 1))))))}) (rules (start {(place "PIECE_ALPHA1" (sites {0 1 2 3 4 5 6 7 28 29 30 31})) (place "PIECE_ALPHA2" (sites {20 21 22 23 24 25 26 27 32 33 34 35}))}) (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die replayDouble: ### SUF: (forEach Piece (then (if (not (all DiceUsed)) (if (can Move (forEach Die (forEach Piece))) (moveAgain)))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (and (= (face 36) 1) (= (face 37) 1)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 0))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 0)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (or (move Pass (then (forEach Site (sites Next) (if (= (what at:(site)) (id "PIECE_ALPHA" Mover)) (promote (site) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (or (move Pass) (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (or (move Step (directions {FR FL}) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (move Hop (from) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))))) (forEach Piece "PIECE_BETA" (or (move Slide Diagonal) (move Hop (from) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between before:(count Rows) (range 1 (count Rows)) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))))) ### SUF: )) ### MID: (end (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 (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply ### SUF: )) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move 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: (remove (between)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 11)) (regions "Fortresses" (sites Corners)) (piece "PIECE_ALPHA" P1 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (and { ### SUF: (surround (from (last To)) Orthogonal (between if:(= (what at:(between)) (id "PIECE_BETA" P2)) (apply (trigger "Surrounded" P2))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))})))) (piece "PIECE_ALPHA" P2 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))))) (piece "PIECE_BETA" P2 (move Slide Orthogonal (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))))))}) (rules (start {(place "PIECE_ALPHA1" {"D1" "E1" "F1" "G1" "H1" "F2" "A4" "A5" "A6" "A7" "A8" "B6" "K4" "K5" "K6" "K7" "K8" "J6" "F10" "D11" "E11" "F11" "G11" "H11" "F10"}) (place "PIECE_ALPHA2" {"F4" "E5" "F5" "G5" "D6" "E6" "G6" "H6" "E7" "F7" "G7" "F8"}) (place "PIECE_BETA2" (centrePoint))}) (play (forEach Piece)) (end {(if (is Within (id "PIECE_BETA2") in:(sites "Fortresses")) (result P2 Win)) (if (is Triggered "Surrounded" P2) (result P1 Win))}))) ### MID: (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA2" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7) {(track "Track1" "27,N,W,S,E,N2,SW1,W4,N4,E4,S3,W3,N2,E2,S1,W1" P1 directed:True) ### SUF: }) (piece "PIECE_ALPHA" Each (if (and (is In (from) (sites Board)) (!= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -1)) (move (from (from) level:(level)) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) (apply if:(and (not (is In (to) (sites "ProtectedSites"))) (is Enemy (who at:(to)))) (and (fromTo (from (to)) (to (handSite (who at:(to))))) (moveAgain))))) (then (if (= 24 (last To)) (remove (last To)))))) (hand Each) (dice d:2 from:0 num:4) (map {(pair 1 "G4") (pair 2 "A4") (pair 3 "D1") (pair 4 "D7")}) (map "Throw" {(pair 0 8)}) (regions "ProtectedSites" (sites {0 3 6 21 27 3 45 42 48 24}))}) (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) (move Pass) (if (and (is In (count Pips) (array {0 4})) (!= 0 (who at:(handSite Mover)))) (move (from (handSite Mover)) (to (mapEntry Mover))))}) (then (if (is In (count Pips) (array {0 4})) (moveAgain))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (track "Track2" "21,S,E,N,W,S2,NE1,E4,S4,W4,N3,E3,S2,W2,N1,E1" P2 directed:True) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 12 3) (shift 1 -1 (rectangle 13 1))}) {(track "HomeTrack1" "0,N,E1,S" P1 directed:True) (track "HomeTrack2" "2,N,W1,S" P2 directed:True) (track "EnemyTrack1" "2,N,W1,S" P1 directed:True) (track "EnemyTrack2" "0,N,E1,S" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:4) (map "Throw" {(pair 0 6) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (map "FirstEnemySite" {(pair P1 2) (pair P2 0)}) (regions "Home" P1 (sites Left)) (regions "Home" P2 (sites Right))}) (rules (start {(place "PIECE_ALPHA1" (sites Left)) (place "PIECE_ALPHA2" (sites Right))}) (play (do (roll) next:(or (if (and (= 1 (mapEntry "Throw" (count Pips))) (= (mover) (who at:36))) (move (from 36) (to (mapEntry "FirstEnemySite" (mover)) if:(not (is Friend (mapEntry "FirstEnemySite" (mover)))) (apply if:(is Enemy (who at:(to))) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home"))))))))))) (forEach Piece (or (if (is In (from) (sites Track Mover "HomeTrack")) (if (if (!= 0 (state at:(from))) True (= 1 (mapEntry "Throw" (count Pips)))) (if (not (is Friend (who at:(trackSite Move "HomeTrack" steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move "HomeTrack" steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) ### SUF: )) (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (mapEntry "Throw" (count Pips)))) (set State at:(last To) 1))))))) (if (is In (from) (sites Track Mover "EnemyTrack")) (if (not (is Friend (who at:(trackSite Move "EnemyTrack" steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move "EnemyTrack" steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) (if (is In (to) (sites Next "Home")) (remove (to)) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home")))))))))))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (if (is In (to) (sites Next "Home")) (remove (to)) (if (= (min (array (intersection (sites Empty) (sites Next "Home")))) -1) (remove (to)) (fromTo (from (to)) (to (min (array (intersection (sites Empty) (sites Next "Home")))))))) |
### 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 ### SUF: )))) (from) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral)))))) (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (to) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral))))))))) (apply (if (is Occupied (to)) (and (remove (to)) (addScore Mover 1))))))) (piece "PIECE_ALPHA" Neutral)}) (rules (start {(place "PIECE_ALPHA0" (difference (sites Board) (sites Corners))) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) NNW)) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) E)) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) SSW)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) NNE)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) W)) (place "PIECE_ALPHA2" (sites Around (centrePoint) distance:(- 5 1) SSE))}) (play (forEach Piece Mover)) (end (if (or (< (/ (- (count Sites in:(sites Board)) 6) 2) (score P1)) (< (/ (- (count Sites in:(sites Board)) 6) 2) (score P2))) (byScore))))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or {(move Step (if (!= 0 (count Moves)) (difference Adjacent Backwards) Forwards) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (move Hop (difference Adjacent Backwards) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))})) (piece "PIECE_BETA" Each (or {(move Step Adjacent (to if:(is Empty (to)))) (move Hop Adjacent (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Hop (from (from) if: ### SUF: ) Adjacent (between before:(count Rows) after:(count Rows) if:(and (is Enemy (who at:(between))) (is In (between) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True)))) (apply (remove (between)))) (to if:(and (is Empty (to)) (is In (to) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True))))))})) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (is In (from) (union (sites Direction from:4 NW included:True) (sites Direction from:0 NE included:True))) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (add (hole (merge (shift 0 (/ (- 19 3) 2) (rectangle 3 19)) (shift (/ (- 19 3) 2) 0 (rectangle 19 3))) (poly {{8 8} {8 11} {11 11} {11 8}})) cells:{{8 28 48 68 69 70 71 51 31 11 10 9}}) {(track "Track1" "96,9,S,W,N,7,W,N,E,51,N,E,S,43,E,S,W,10,S,W1,N7,End" P1 directed:True) (track "Track2" "96,26,W,N,E,51,N,E,S,43,E,S,W,10,S,W,N,7,W,N1,W7,End" P2 directed:True) (track "Track3" "96,52,N,E,S,43,E,S,W,10,S,W,N,7,W,N,E,51,N,E1,S7,End" P3 directed:True) ### SUF: }) (dice d:2 from:0 num:7) (piece "PIECE_ALPHA" Each (if (= (trackSite Move from:(from) steps:(mapEntry "Throw" (count Pips))) -2) (move Remove (from) level:(level)) (if (and (= (trackSite Move from:(from) steps:1) -2) (is In (mapEntry "Throw" (count Pips)) (sites {10 25 30}))) (move Remove (from) level:(level)) (move (from (from) level:(level)) (to (trackSite Move from:(from) steps:(mapEntry "Throw" (count Pips))) if:(not (and (is In (to) (sites "SafeSites")) (is Enemy (who at:(to))))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (fromTo (from (to) level:(level)) (to (centrePoint))))))))))) (hand Each) (regions "SafeSites" (sites {55 63 65 34 15 47 94 84 86 19 38 3})) (map "Throw" {(pair 0 7) (pair 1 10) (pair 2 2) (pair 3 3) (pair 4 4) (pair 5 25) (pair 6 30) (pair 7 12)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:4) (place Stack "PIECE_ALPHA2" (handSite P2) count:4) (place Stack "PIECE_ALPHA3" (handSite P3) count:4) (place Stack "PIECE_ALPHA4" (handSite P4) count:4)}) (play (do (roll) next:(or (if (and (is Occupied (handSite Mover)) (is In (mapEntry "Throw" (count Pips)) (sites {10 25 30}))) (move (from (handSite Mover)) (to (centrePoint)))) (forEach Piece)))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (track "Track4" "96,27,E,S,W,10,S,W,N,7,W,N,E,51,N,E,S,43,E,S1,W7,End" P4 directed:True) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (priority {(forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(= (what at:(between)) (id "PIECE_ALPHA" Next)) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))})) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In ### SUF: (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: (last To) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then ### SUF: )) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to))))))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) |
### 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)))))})) (piece "PIECE_BETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_DELTA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) ### SUF: ))) (piece "PIECE_ZETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "PIECE_ALPHA1" {"F4" "G4" "H4" "B3" "C3" "D3" "E3" "A2"}) (place "PIECE_ALPHA2" {"H7" "H6" "G6" "F6" "E6" "A5" "B5" "C5"}) (place "PIECE_BETA1" {"C2" "D1"}) (place "PIECE_EPSILON1" {"B1" "H2"}) (place "PIECE_DELTA1" {"E1" "F1"}) (place "PIECE_ZETA1" coord:"D2") (place "PIECE_GAMMA1" coord:"C1") (place "PIECE_BETA2" {"C7" "B8"}) (place "PIECE_EPSILON2" {"A7" "H8"}) (place "PIECE_DELTA2" {"F7" "G7"}) (place "PIECE_ZETA2" coord:"B7") (place "PIECE_GAMMA2" coord:"C8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover))))) (end (if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win))))) ### MID: (apply (if (is Enemy (who at:(to))) (remove (to)))) |