text
stringlengths 218
3.08k
|
---|
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (rectangle 3 4) (shift 0 1 (rectangle 1 12))) {(track "Track1" "20,3,W,N1,E,End" P1 directed:True) (track "Track2" "21,12,W,S1,E,End" P2 directed:True)}) (dice facesByDie:{{1 2 3 4} {0 1}} num:2) (hand Each) (regions "Replay" (sites {"A1" "A3" "D2" "H2" "L2"})) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) -2) (move Remove (from)) (if (!= (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) -1) (if (or (is Empty (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10))))))) (and (not (is Friend (who at:(trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10))))))))) (not (is In (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) (sites "Replay"))))) (move (from) (to (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to))))))) (then (if (is In (last To) (sites "Replay")) (moveAgain))))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:7) (place "PIECE_ALPHA2" (handSite P2) count:7)}) (play (do ### SUF: next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (roll) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union (sites Row 1) (sites Row 2))) (place "PIECE_ALPHA2" (union (sites Row 5) (sites Row 6)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from ### SUF: ) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (last To) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(shift -1.25 -0.34 (rotate 30 (rectangle 6 1))) (rectangle 1 5) (rectangle 5 1) (shift 0 6 (rectangle 5 1)) (shift 0 10 (rectangle 1 5)) (shift 7 0 (rectangle 1 5)) (shift 7 10 (rectangle 1 5)) (shift 11 0 ### SUF: ) (shift 11 6 (rectangle 5 1)) (shift 12.25 5.33 (rotate 30 (rectangle 6 1)))}) edges:{{13 14} {22 28} {37 36} {9 23}}) {(track "Track1" "46,5,SSE,N,E,S,W,NNW2,End" P1 directed:True) (track "Track2" "47,41,NNW,W,S,E,N,SSE2,End" P2 directed:True)} use:Vertex) (regions "AllSites" (sites Board)) (regions "Arc" P1 (sites {1 2 3 4 5})) (regions "Arc" P2 (sites {41 42 43 44 45})) (dice d:2 facesByDie:{{0 4} {0 6} {0 14} {0 15}} num:4) (piece "PIECE_ALPHA" Each (if (or (!= (from) (handSite Mover)) (and (= (from) (handSite Mover)) (all Sites (sites Occupied by:Mover) if:(not (is In (site) (sites Mover "Arc")))))) (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -2) (move Remove (from)) (if (!= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -1) (if (not (is Friend (who at:(trackSite Move steps:(mapEntry "Throw" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite Next))))))))))) (hand Each) (map "Throw" {(pair 0 10) (pair 39 5) (pair 24 3) (pair 25 3) (pair 35 3) (pair 33 3) (pair 10 2) (pair 18 2) (pair 19 2) (pair 20 2) (pair 21 2) (pair 29 2)})}) (rules (start (place "PIECE_ALPHA" "Hand" count:2)) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (rectangle 5 1) |
### PRE: (game "GAME_NAME" (players 3) (equipment {(board (rotate 90 (hex 5))) ### SUF: }) (rules (play (move Add (to (sites Empty)))) (end {(if (is Line 5 whats:{1 3}) (result P1 Win)) (if (is Line 5 whats:{1 2}) (result P2 Win)) (if (is Line 5 whats:{2 3}) (result P3 Win))}))) ### MID: (piece "PIECE_ALPHA" Each) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Limping 5) use:Cell) (piece "PIECE_ALPHA" Each)}) (rules (start (set Score Each 0)) (play (if (was Pass) (or (move Pass) (priority (move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))) (then (addScore Mover 1))) (forEach Piece (do (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))))) (if (<= 5 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection ### SUF: (sites Around (from))))))))))))))}) ifAfterwards:(can Move (add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))))))))) (or {(move Add (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" Mover) in:(sites LineOfSight Piece at:(to))))) (then (addScore Mover 1))) (forEach Piece (or {(if (<= 1 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (from)))))) (if (<= 2 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))) (if (<= 3 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))) (if (<= 4 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from)))))))))))) (if (<= 5 (count Pieces Next in:(sites Around (from)))) (move (from (from)) (to (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (intersection (sites Empty) (sites Around (from))))))))))))))})) (move Pass)}))) (end {(if (and (all Passed) (> (score Mover) (score Next))) (result Mover Win)) (if (and (all Passed) (<= (score Mover) (score Next))) (result Next Win))}))) ### MID: (sites Empty) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (piece "PIECE_ALPHA" Each)}) (rules (meta (swap)) (play (move Add (to (sites Empty)) (then (if ### SUF: (do (set Var "CutOff" 0) next:(do (while (and (= 0 (- (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff")) (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff")))) (!= 0 (+ (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff")) (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff"))))) (set Var "CutOff" (+ 1 (var "CutOff")))) next:(and (set Score P1 (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff"))) (set Score P2 (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff")))))))))) (end (if (is Full) {(if (< (score P1) (score P2)) (result P1 Win)) (if (> (score P1) (score P2)) (result P2 Win))})))) ### MID: (is Full) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 10)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (intersection (sites Right) (sites Bottom)) steps:8 Orthogonal) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (intersection (sites Left) (sites Top)) steps:8 Orthogonal) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) ### SUF: )) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step Diagonal (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (sites ToClear) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 6)) (hand Each) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (do (move (from (handSite Mover)) (to (sites Empty))) ifAfterwards:(not (is Line 3 Orthogonal)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play ### SUF: ) (end (if (<= (count Pieces Next) 2) (result Next Loss))))})) ### MID: (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (forEach Piece)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (dual (hex Prism 7 6)) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (if (< 0 (count Sites in:(sites Occupied by:Mover))) (forEach (sites Empty) if:(and (> (count Pieces Mover in:(sites LineOfSight at:(site))) 0) (= (count Sites in:(sites Around (site) Own)) 0))) (sites Empty))))) (nextPhase (= 4 (count Moves)) "Play")) (phase "Play" (play (if (can Move (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(sites LineOfSight at:(site))) 0))))) (move Add (to (forEach (sites Empty) if:(> (count Pieces Mover in:(sites LineOfSight at:(site))) 0))) (then (forEach Group (if (all Sites (sites) if:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from:(site) stop:(is Occupied (to)) stopIncluded:True)) (sites))))) (remove (sites)))))) (move Pass (then (forEach Group (if (all Sites (sites) if:(= 0 (count Sites in:(difference (intersection (sites Occupied by:Mover) (sites Direction from:(site) stop:(is Occupied (to)) stopIncluded:True)) (sites))))) (remove (sites)))))))))} ### SUF: )) ### MID: (end (if (and (< 4 (count Moves)) (or (= 0 (count Sites in:(sites Occupied by:P1))) (= 0 (count Sites in:(sites Occupied by:P2))))) (result Mover Loss))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each (move Hop Orthogonal (between (exact (- (count Sites in:(sites Around (from) Orthogonal if:(is Friend (who at:(to))))) 1)) if:True) (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "PIECE_ALPHA2" ### SUF: ) (place Random {"PIECE_ALPHA2"} count:29) (place Random {"PIECE_ALPHA1"} count:30)}) phases:{(phase "Swap" (play (or (move Pass) (move Select (from (sites Occupied by:Mover)) (to (sites Occupied by:Next)) (then (swap Pieces (last From) (last To)))))) (nextPhase "Play")) (phase "Play" (play (forEach Piece)))} (end (if (no Moves Next) (result Next Loss))))) ### MID: (centrePoint) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 13) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) ### SUF: }) (dice d:2 from:0 num:4) (map {(pair 0 6) (pair 1 1) (pair 2 2) (pair 3 3) (pair 4 4)}) (piece "PIECE_ALPHA" Each (if (or (= (state at:(from)) 0) (and (= 1 (mapEntry (count Pips))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry (count Pips))) -1) (if (or (not (is In (from) (sites Next))) (and (is In (from) (sites Next)) (= (count Sites in:(intersection (sites Occupied by:Next) (sites Next))) 0))) (if (or (is In (trackSite Move steps:(mapEntry (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry (count Pips)))))) (or (if (= (+ (mapEntry (count Pips)) 1) (count at:(from))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) count:(mapEntry (count Pips)))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to) (then (addScore Mover 1))))) count:(count at:(from)))) (if (and (is In (trackSite Move steps:(mapEntry (count Pips))) (sites "CentralRows")) (is Friend (who at:(trackSite Move steps:(mapEntry (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry (count Pips)))))))) (then (set State at:(last To) 0))))) (regions "AnotherThrow" (sites {1 4 6})) (regions "CentralRows" (union (sites Row 1) (sites Row 2))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_ALPHA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (is In (mapEntry (count Pips)) (sites "AnotherThrow")) (moveAgain)))) (move Pass (then (if (is In (mapEntry (count Pips)) (sites "AnotherThrow")) (moveAgain))))))) (end (if (or (and (= (count Sites in:(difference (sites Occupied by:P1) (sites P2))) 0) (= (count Sites in:(difference (sites Occupied by:P2) (sites P1))) 0)) (no Pieces Mover)) (byScore))))) ### MID: (track "Track2" "51,W,S1,E,S1,W,S1,E" P2 directed:True) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) ### SUF: }) (rules (start {(place "PIECE_ALPHA1" (sites Corners)) (place "PIECE_BETA2" (difference (sites Board) (union (sites Corners) (sites Centre))))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (piece "PIECE_BETA" P2 (move Step (to if:(is Empty (to))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 8) {(track "Track1" "0,E,N1,W,N1,E,S1,W" loop:True P1) (track "Track2" "23,W,S1,E,S1,W,N1,E" loop:True P2)}) (dice d:2 from:0 num:4) (piece "PIECE_ALPHA" Each (if (and {(if (!= 0 (state at:(from))) True (= 1 (count Pips)))}) (if (and (not (is Friend (who at:(trackSite Move steps:(count Pips))))) (if (not ### SUF: ) True (if (is In (trackSite Move steps:(count Pips)) (sites Mover "Home")) True (= (count Pieces Mover in:(difference (sites Board) (sites Mover "Home"))) 0)))) (move (from) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to)))) (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (count Pips))) (set State at:(last To) 1))))))) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (roll) next:(if (= 1 (count Pips)) (priority {(forEach Piece (if (and {(if (!= 0 (state at:(from))) True (= 1 (count Pips))) (is In (from) (sites Mover "Home"))}) (if (and (not (is Friend (who at:(trackSite Move steps:(count Pips))))) (if (not (is In (from) (sites Mover "Home"))) True (if (is In (trackSite Move steps:(count Pips)) (sites Mover "Home")) True (= (count Pieces Mover in:(difference (sites Board) (sites Mover "Home"))) 0)))) (move (from) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (remove (to)))) (then (if (and (not (!= 0 (state at:(last To)))) (= 1 (count Pips))) (set State at:(last To) 1))))))) (forEach Piece)}) (forEach Piece)) (then (if (= 1 (count Pips)) (moveAgain))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (is In (from) (sites Mover "Home")) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 6)) (hand Each) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 2 Orthogonal) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (sites Around (sites Occupied by:Mover) Orthogonal))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) ### SUF: (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (move Remove (sites Occupied by:Next)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (tile "Hex" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (play (do (or (move Add (piece (mover)) (to (sites Empty) if:(= 0 (count Sites in:(intersection (sites Occupied by:All component:"Hex") (sites Around (to) Orthogonal)))))) (move Add (piece "PIECE_ALPHA0") (to (sites Empty)))) ifAfterwards:(and (all Sites (sites Occupied by:All component:"Hex") if:(> 2 (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:Neutral))))) (all Sites (sites Occupied by:Neutral) if:(not (and (< 0 (count Sites in:(sites Around (sites Group at:(site)) Own Orthogonal))) (< 0 (count Sites in:(sites Around ### SUF: Enemy Orthogonal))))))) (then (if (= 1 (% (+ 1 (count Moves)) 2)) (moveAgain))))) (end (if (all Passed) (byScore {(score P1 (+ (results from:(intersection (sites Occupied by:P1) (sites Around (sites Occupied by:Neutral) Orthogonal)) to:1 (* (to) (size Group at:(+ (results from:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Neutral)) to:1 (* (from) (to)))) Orthogonal if:(= (id "PIECE_ALPHA0") (what at:(to)))))))) (score P2 (+ (results from:(intersection (sites Occupied by:P2) (sites Around (sites Occupied by:Neutral) Orthogonal)) to:1 (* (to) (size Group at:(+ (results from:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Neutral)) to:1 (* (from) (to)))) Orthogonal if:(= (id "PIECE_ALPHA0") (what at:(to))))))))}))))) ### MID: (sites Group at:(site)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (tile "Hex" Each) (piece "PIECE_ALPHA" Neutral)}) (rules (play (do (or (move Add (piece (mover)) (to (sites Empty) if:(= 0 (count Sites in:(intersection (sites Occupied by:All component:"Hex") (sites Around (to) Orthogonal)))))) (move Add (piece "PIECE_ALPHA0") (to (sites Empty)))) ifAfterwards:(and (all Sites (sites Occupied by:All component:"Hex") if:(> 2 (count Sites in:(intersection (sites Around (site) Orthogonal) (sites Occupied by:Neutral))))) (all Sites (sites Occupied by:Neutral) if:(not (and (< 0 (count Sites in:(sites Around ### SUF: Own Orthogonal))) (< 0 (count Sites in:(sites Around (sites Group at:(site)) Enemy Orthogonal))))))) (then (if (= 1 (% (+ 1 (count Moves)) 2)) (moveAgain))))) (end (if (all Passed) (byScore {(score P1 (+ (results from:(intersection (sites Occupied by:P1) (sites Around (sites Occupied by:Neutral) Orthogonal)) to:1 (* (to) (size Group at:(+ (results from:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Neutral)) to:1 (* (from) (to)))) Orthogonal if:(= (id "PIECE_ALPHA0") (what at:(to)))))))) (score P2 (+ (results from:(intersection (sites Occupied by:P2) (sites Around (sites Occupied by:Neutral) Orthogonal)) to:1 (* (to) (size Group at:(+ (results from:(intersection (sites Around (from) Orthogonal) (sites Occupied by:Neutral)) to:1 (* (from) (to)))) Orthogonal if:(= (id "PIECE_ALPHA0") (what at:(to))))))))}))))) ### MID: (sites Group at:(site)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (hex 4))) (piece "PIECE_ALPHA" P1 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))) (piece "PIECE_ALPHA" P2 (move Slide (between if:(and (!= (between) (centrePoint)) (is Empty (between)))) (then (and {(surround (from (last To)) Orthogonal (between if:(and {(= (between) (centrePoint)) (= (what at:(between)) (id "PIECE_BETA" P1)) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:3) (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between (max 1) if:(and (!= (between) (centrePoint)) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))))})))) (piece "PIECE_BETA" P1 (move Step (to if:(is Empty (to))) (then (and (surround (from (last To)) Orthogonal (between if:(and {(is In (between) (sites "Fortresses")) (is Enemy (who at:(between))) (all Sites (sites Around (between) Own) if:(all Sites (sites Around (site) Own) if:(not (is In (to) (sites Around (between) Own)))))}) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) except:1) (custodial (from (last To)) Orthogonal (between ### SUF: 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: (max 1) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(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 ### SUF: (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (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))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(square 5 diagonals:Alternating) (shift 0 4 (rotate 180 (wedge 3))) (shift 0 -2 (wedge 3))}) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(sites Row 0) (sites Row 1) (sites Row 2) (sites Row 3)})) (place "PIECE_ALPHA2" (union {(sites Row 5) (sites Row 6) (sites Row 7) (sites Row 8)}))}) ### SUF: (end (if (no Moves Next) (result Next Loss))))) ### MID: (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))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (graph vertices:{{0 0} {2 0} {4 0} {1 1} {2 1} {3 1} {2 2} {1 3} {2 3} {3 3} {0 4} {2 4} {4 4}} edges:{{0 1} {0 3} {1 2} {1 4} {2 5} {3 4} {3 6} {4 5} {4 6} {5 6} {6 7} {6 8} {6 9} {7 8} {7 10} {8 9} {8 11} {9 12} {10 11} {11 12}}) use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Each) (regions P1 (intersection (sites Corners) (sites Bottom))) (regions P2 (intersection (sites Corners) (sites Top)))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (or {(forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_ALPHA" (move Step (to if:(is Empty (to)))) (then (if (is In ### SUF: (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide)) (forEach Piece "PIECE_BETA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))})) (end (if (no Moves Next) (result Next Loss))))) ### MID: (last To) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge (rectangle 3 6) (shift 7 0 (rectangle 3 6))) edges:{{5 18} {11 24} {17 30}}) {(track "Track1" "36,6,E,N1,W,0,E,End" P1 directed:True) (track "Track2" "38,6,E,S1,W,12,E,End" P2 directed:True)} use:Vertex) (dice num:3) (hand Each size:2) (piece "PIECE_ALPHA" Each (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(from) steps:(pips)) -1)) (if (= (trackSite Move from:(from) steps:(pips)) -2) (move Select (from (from)) (then (if (= (count at:(last To)) 1) (remove (last To)) (set Count at:(last To) (- (count at:(last To)) 1))))) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(not (and (is Enemy (who at:(to))) (> (count at:(to)) 1))) (apply if:(and (is Enemy (who at:(to))) (= (count at:(to)) 1)) (fromTo (from (to)) (to (handSite Next 1)))))))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:15) (place "PIECE_ALPHA2" (handSite P2) count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (!= (what at:(handSite Mover 1)) 0) (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(handSite Mover) steps:(pips)) -1)) (if (= (trackSite Move from:(handSite Mover) steps:(pips)) -2) (move Select (from (handSite Mover 1)) (then (if (= (count at:(last To)) 1) (remove (last To)) (set Count at:(last To) ### SUF: )))) (move (from (handSite Mover 1)) (to (trackSite Move from:(handSite Mover) steps:(pips)) if:(not (and (is Enemy (who at:(to))) (> (count at:(to)) 1))) (apply if:(and (is Enemy (who at:(to))) (= (count at:(to)) 1)) (fromTo (from (to)) (to (handSite Next 1)))))))) (or (forEach Piece) (forEach Piece container:(mover))) (then (if (can Move (if (!= (what at:(handSite Mover 1)) 0) (forEach Die combined:True if:(and (!= (pips) 0) (!= (trackSite Move from:(handSite Mover) steps:(pips)) -1)) (if (= (trackSite Move from:(handSite Mover) steps:(pips)) -2) (move Select (from (handSite Mover 1)) (then (if (= (count at:(last To)) 1) (remove (last To)) (set Count at:(last To) (- (count at:(last To)) 1))))) (move (from (handSite Mover 1)) (to (trackSite Move from:(handSite Mover) steps:(pips)) if:(not (and (is Enemy (who at:(to))) (> (count at:(to)) 1))) (apply if:(and (is Enemy (who at:(to))) (= (count at:(to)) 1)) (fromTo (from (to)) (to (handSite Next 1)))))))) (or (forEach Piece) (forEach Piece container:(mover))))) (moveAgain)))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (- (count at:(last To)) 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)))))})) (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)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (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"}) ### SUF: (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: (place "PIECE_BETA1" {"C2" "D1"}) |
### 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)) ### SUF: }) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 2 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 2 1)) (sites Phase 1)))}) (play (or (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))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Step Diagonal (to if:(is Empty (to)))))))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (regions P2 (sites Top)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (priority {(or (forEach Piece "PIECE_ALPHA" (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote ### SUF: (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (last To) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 3 3 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to))))))))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) ### SUF: (end (if (no Pieces Next) (result Next Loss))))) ### MID: (play (forEach Piece)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union (sites Row 1) (sites Row 2))) (place "PIECE_ALPHA2" (union (sites Row 5) (sites Row 6)))}) (play (if (is Prev Mover) (or (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or {(forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) ### SUF: )) (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))) |
### 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 ### SUF: ))))) (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))))))) (result Mover Win)) (if (and (or (= (count Pieces P1) 1) (= (count Pieces P2) 1)) (= (counter) 20)) (result Mover Draw))}))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 13) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA1" (forEach (sites Phase 0) if:(and {(is Even (row of:(site))) (!= 0 (% (site) 4)) (= 0 (% (row of:(site)) 4))}))) (place "PIECE_ALPHA2" (forEach (sites Phase 0) if:(and {(is Even (row of:(site))) (!= 0 (% (site) 4)) (= 2 (% (row of:(site)) 4))})))}) (play (or (move Add (to (sites Around (sites Occupied by:Mover) Empty Orthogonal))) (move Select (from (sites Occupied by:Enemy) if:(not (all Sites (sites Group at:(from)) if:(not (and (= 0 ### SUF: ) (if (>= 11 13) (< 0 (count Sites in:(sites Around (site) Own Orthogonal))) True)))))) (then (forEach Site (sites Group at:(last From) Orthogonal) (remove (site))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (count Sites in:(sites Around (site) Empty Orthogonal)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(shift 2 2 (merge {(rectangle 1 3) (shift -1.31 0.95 (rotate 108 (rectangle 1 3))) (shift -0.81 2.49 (rotate 216 (rectangle 1 3))) (shift 1.31 0.95 (rotate -108 (rectangle 1 3))) (shift 0.81 2.49 ### SUF: )})) (shift 1 1 (scale 2 (merge {(rectangle 1 3) (shift -1.31 0.95 (rotate 108 (rectangle 1 3))) (shift -0.81 2.49 (rotate 216 (rectangle 1 3))) (shift 1.31 0.95 (rotate -108 (rectangle 1 3))) (shift 0.81 2.49 (rotate -216 (rectangle 1 3)))}))) (scale 3 (merge {(rectangle 1 3) (shift -1.31 0.95 (rotate 108 (rectangle 1 3))) (shift -0.81 2.49 (rotate 216 (rectangle 1 3))) (shift 1.31 0.95 (rotate -108 (rectangle 1 3))) (shift 0.81 2.49 (rotate -216 (rectangle 1 3)))}))}) edges:{{26 16} {16 6} {5 15} {15 25} {29 19} {19 9} {7 17} {17 27} {28 18} {18 8} {22 12} {12 2} {1 11} {11 21} {20 10} {10 0} {3 13} {13 23} {24 14} {14 4}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:14)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (rotate -216 (rectangle 1 3)) |
### 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)))))))) ### SUF: (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_GAMMA1" (sites {"C1" "F1"})) (place "PIECE_BETA1" (sites {"C2" "F2"})) (place "PIECE_DELTA1" (sites {"D2" "E2"})) (place "PIECE_ALPHA1" coord:"E1") (place Stack "PIECE_ZETA1" (sites Row 2)) (place Stack "PIECE_EPSILON1" (sites {"D3"})) (place "PIECE_GAMMA2" (sites {"C8" "F8"})) (place "PIECE_BETA2" (sites {"C7" "F7"})) (place "PIECE_DELTA2" (sites {"D7" "E7"})) (place "PIECE_ALPHA2" coord:"E8") (place Stack "PIECE_ZETA2" (sites Row 5)) (place Stack "PIECE_EPSILON2" (sites {"D6"}))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end {(if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win))}))) ### MID: (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))))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 19) use:Vertex) (piece "PIECE_ALPHA" Each)}) (rules phases:{(phase "Opening" (play (move Add (to (sites Empty)))) (nextPhase "Playing")) (phase "Playing" (play (move Add (to (sites Empty)) (then ### SUF: ))) (nextPhase "Playing"))} (end (if (is Line 6 All) (result Mover Win))))) ### MID: (if (is Even (count Moves)) (moveAgain)) |
### 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 {(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) (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)) ### SUF: )) (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: (union (sites Occupied by:Next) (sites Occupied by:Neutral)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board ### SUF: ) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 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))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (square 8) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (merge {(shift -1.25 -0.34 (rotate 30 (rectangle 6 1))) (rectangle 1 5) (rectangle 5 1) (shift 0 6 (rectangle 5 1)) (shift 0 10 (rectangle 1 5)) (shift 7 0 (rectangle 1 5)) (shift 7 10 (rectangle 1 5)) (shift 11 0 (rectangle 5 1)) (shift 11 6 (rectangle 5 1)) (shift 12.25 5.33 (rotate 30 (rectangle 6 1)))}) edges:{{13 14} {22 28} {37 36} {9 23}}) {(track "Track1" "46,5,SSE,N,E,S,W,NNW2,End" P1 directed:True) (track "Track2" "47,41,NNW,W,S,E,N,SSE2,End" P2 directed:True)} use:Vertex) (regions "AllSites" (sites Board)) (regions "LastSide" P1 (sites {6 7 8 9 23 24 25 26 27})) (regions "LastSide" P2 (sites {27 33 34 35 36 37 38 39 40})) (dice d:2 facesByDie:{{0 4} {0 6} {0 14} {0 15}} num:4) (piece "PIECE_ALPHA" Each (if (if (not (is In ### SUF: (sites Mover "LastSide"))) True (or {(= (mapEntry "Throw" (count Pips)) 1) (= (mapEntry "Throw" (count Pips)) 2) (= (mapEntry "Throw" (count Pips)) 3)})) (or (if (= 14 (mapEntry "Throw" (count Pips))) (if (= (trackSite Move steps:1) -2) (move Remove (from) level:(level)) (move (from (from) level:(level)) (to (trackSite Move steps:1) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (fromTo (from (to) level:(level)) (to (handSite (who at:(to) level:(level)))))))))))) (if (= (trackSite Move steps:(mapEntry "Throw" (count Pips))) -2) (move Remove (from) level:(level)) (move (from (from) level:(level)) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) (apply (if (is Enemy (who at:(to))) (forEach Level (to) FromTop (fromTo (from (to) level:(level)) (to (handSite (who at:(to) level:(level)))))))))))))) (hand Each) (map "Throw" {(pair 0 10) (pair 39 5) (pair 24 3) (pair 25 3) (pair 35 3) (pair 33 3) (pair 10 2) (pair 18 2) (pair 19 2) (pair 20 2) (pair 21 2) (pair 29 2)})}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:2) (place Stack "PIECE_ALPHA2" (handSite P2) count:2)}) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (from) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (concentric {24}) {(track "Track1" {24 0 2 4 6 8 10 12 14 16 18 20 22 23 21 19 17 15 13} P1 directed:True) (track "Track2" {25 12 14 16 18 20 22 23 21 19 17 15 13 11 9 7 5 3 1} P2 directed:True) (track "Track3" {26 23 21 19 17 15 13 11 9 7 5 3 1 0 2 4 6 8 10} P3 directed:True) (track "Track4" {27 11 9 7 5 3 1 0 2 4 6 8 10 12 14 16 18 20 22} P4 directed:True)} use:Vertex) (dice d:7 num:3) (regions "Mundo" P1 {23 21 19 17 15 13}) (regions "Mundo" P2 {11 9 7 5 3 1}) (regions "Mundo" P3 {0 2 4 6 8 10}) (regions "Mundo" P4 {12 14 16 18 20 22}) (piece "PIECE_ALPHA" Each (forEach Die if:(!= (pips) 0) (if (and (no Pieces Mover in:(union (sites Hand Mover) (difference (sites Board) (sites Mover "FinalQuadrant")))) (= (trackSite Move from:(from) steps:(pips)) -1)) (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 (who at:(to))))))))) (then (if (not (all DiceUsed)) (moveAgain))))) (map "Entry" {(pair P1 0) (pair P2 6) (pair P3 12) (pair P4 18)}) (hand Each) (regions "FinalQuadrant" P1 (sites {13 15 17 19 21 23})) ### SUF: (regions "FinalQuadrant" P3 (sites {10 8 6 4 2 0})) (regions "FinalQuadrant" P4 (sites {22 20 18 16 14 12}))}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:12) (place Stack "PIECE_ALPHA2" (handSite P2) count:12) (place Stack "PIECE_ALPHA3" (handSite P3) count:12) (place Stack "PIECE_ALPHA4" (handSite P4) count:12)}) (play (do (if (not (is Prev Mover)) (roll)) next:(or (forEach Piece top:True) (forEach Piece container:(mover) top:True)))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (regions "FinalQuadrant" P2 (sites {1 3 5 7 9 11})) |
### 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) ### SUF: 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)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))))) next:(forEach Piece)))) (end (if (no Moves Mover) (result Next Win))))) ### MID: (piece "PIECE_BETA") |
### PRE: (game "GAME_NAME" ### SUF: (equipment {(board (concentric Square rings:3 joinCorners:True) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (if (= 3 (count Pieces Mover)) (move (from (from)) (to (sites Empty))) (move Step (to if:(is Empty (to)))) (then (if (is Line 3 Orthogonal) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal) (moveAgain)))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (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 (forEach NonMover if:(= 2 (count Pieces Player)) (result Player Loss))))) ### MID: (players 2) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (merge {(rectangle 1 12) (shift 3.5 3.25 (scale 1 1.5 (rotate 90 (rectangle 1 4)))) (shift 0 7 (rectangle 1 12)) (shift -5.5 12.5 (rotate 90 (rectangle 1 12))) (shift 2.5 10.5 (rotate 90 (rectangle 1 6))) (shift 5.5 12.5 (rotate 90 (rectangle 1 12))) (shift 0 18 (rectangle 1 11)) (shift 1 11 (rotate 45 (rectangle 1 4))) (shift 5 13 (graph vertices:{{0 0} {0 1} {-0.94 0.26} {-0.23 -0.44}} edges:{{0 1} {1 2} {2 3} {3 0}}))}) {(track "Track1" "71,0,E5,N5,E,N,W,S,E5,N,WSW,SW,End" P1 directed:True) (track "Track2" "72,11,W6,N5,W,N,E,S,W6,N,WSW,SW,End" P2 directed:True) (track "Track3" "73,0,E5,N5,E,N,W,S,E5,N,WSW,SW,End" P3 directed:True) (track "Track4" "74,11,W6,N5,W,N,E,S,W6,N,WSW,SW,End" P4 directed:True)}) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(count Pips)) -2) ### SUF: (if (!= (trackSite Move steps:(count Pips)) -1) (if (or {(is Empty (trackSite Move steps:(count Pips))) (is Friend (who at:(trackSite Move steps:(count Pips)))) (and (is Enemy (who at:(trackSite Move steps:(count Pips)))) (not (is In (trackSite Move steps:(count Pips)) (sites "Protect"))))}) (move (from (from) level:(level)) (to (trackSite Move steps:(count Pips)) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to)))))))))))) (dice d:2 from:0 num:6) (hand Each) (regions "Protect" (sites {5 17 19 27 41 57 46 62 63 34 35 51 52}))}) (rules (start {(place Stack "PIECE_ALPHA1" (handSite P1) count:3) (place Stack "PIECE_ALPHA2" (handSite P2) count:3) (place Stack "PIECE_ALPHA3" (handSite P3) count:3) (place Stack "PIECE_ALPHA4" (handSite P4) count:3) (set Team 1 {P1 P3}) (set Team 2 {P2 P4})}) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover) top:True)))) (end {(if (no Pieces TeamMover) (result TeamMover Win))}))) ### MID: (move Remove (from)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union (sites Row 1) (sites Row 2))) (place "PIECE_ALPHA2" (union (sites Row 5) (sites Row 6)))}) (play (if (is Prev Mover) (or (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if: ### SUF: (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or {(forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (is Enemy (who at:(between))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9) use:Vertex) (hand P1) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2 (move Step (from Cell) Diagonal (to Cell if:(is Empty Cell (to))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at: ### SUF: ) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who at:(site))) (remove (site) (then (if (can Move (move (from Cell (last To)) (to Cell (forEach (sites Around Cell (from) Diagonal) if:(and (is Empty Cell (site)) (!= 0 (count Sites in:(forEach (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(from))) if:(is Enemy (who at:(site))))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who at:(site))) (remove (site))))))) (moveAgain)))))))))}) (rules (start {(place "PIECE_BETA2" Cell {"E3" "D4" "C5" "D6" "E5" "F4"}) (place "PIECE_ALPHA1" "Hand1" count:66)}) phases:{(phase "InitGuerrilla" P1 (play (move (from (handSite Mover)) (to Vertex (difference (sites Empty Vertex) (sites Outer))) (then (moveAgain)))) (nextPhase (is Next Mover) "GuerrillaMove")) (phase "GuerrillaMove" P1 (play (if (is Prev Mover) (move (from (handSite Mover)) (to Vertex (difference (sites Around (last To) Orthogonal if:(is Empty (to))) (sites Outer))) (then (forEach Site (forEach (sites Occupied by:P2 on:Cell) if:(all Sites (sites Incident Vertex of:Cell at:(site)) if:(is Occupied Vertex (site)))) (remove Cell (site))))) (move (from (handSite Mover)) (to Vertex (difference (sites Empty Vertex) (sites Outer)) if:(not (= (count Sites in:(sites Around (to) Own Orthogonal)) 0))) (then (and (forEach Site (forEach (sites Occupied by:P2 on:Cell) if:(all Sites (sites Incident Vertex of:Cell at:(site)) if:(is Occupied Vertex (site)))) (remove Cell (site))) (moveAgain))))))) (phase "CoinMove" P2 (play (if (is Prev Mover) (move (from Cell (last To)) (to Cell (forEach (sites Around Cell (from) Diagonal) if:(and (is Empty Cell (site)) (!= 0 (count Sites in:(forEach (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(from))) if:(is Enemy (who at:(site))))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who at:(site))) (remove (site) (then (if (can Move (move (from Cell (last To)) (to Cell (forEach (sites Around Cell (from) Diagonal) if:(and (is Empty Cell (site)) (!= 0 (count Sites in:(forEach (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(from))) if:(is Enemy (who at:(site))))))))) (then (forEach Site (intersection (sites Incident Vertex of:Cell at:(last From)) (sites Incident Vertex of:Cell at:(last To))) (if (is Enemy (who at:(site))) (remove (site))))))) (moveAgain)))))))) (forEach Piece))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (last From) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {6 12 11 10 9 8 7 5 4 3 2 1 0 13 14 15 16 17 18 20 21 22 23 24 25} P1 directed:True) (track "Track2" {19 25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12} P2 directed:True)} use:Vertex) (dice num:3) (map {(pair 1 19) (pair 2 6)}) (piece "PIECE_ALPHA" Each)}) (rules (start {(place Stack "PIECE_ALPHA1" 10 count:5) (place Stack "PIECE_ALPHA1" 11 count:5) (place Stack "PIECE_ALPHA1" 12 count:5) (place Stack "PIECE_ALPHA2" 23 count:5) (place Stack "PIECE_ALPHA2" 24 count:5) (place Stack "PIECE_ALPHA2" 25 count:5)}) (play (do (if (not (is Prev Mover)) (roll)) next: ### SUF: )) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (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 (if (not (all DiceUsed)) (moveAgain)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {0 1 2 3 4 5 7 8 9 10 11 12 25 24 23 22 21 20 18 17 16 15 14 13 -2} P1 directed:True) (track "Track2" {25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12 -2} P2 directed:True)} use:Vertex) (dice num:2) (regions "Home" P1 {20 21 22 23 24 25}) (regions "Home" P2 {7 8 9 10 11 12}) (regions "Side" P1 {0 1 2 3 4 5 6 7 8 9 10 11 12}) (regions "Side" P2 {13 14 15 16 17 18 19 20 21 22 23 24 25}) (map {(pair 1 0) (pair 2 25)}) (piece "PIECE_ALPHA" Each (forEach Die replayDouble:True if:(and {(!= (pips) 0) (!= (trackSite Move from:(from) steps:(pips)) -1) (!= (trackSite Move from:(from) steps:(pips)) -2)}) (if (or {(not (= (from) (mapEntry (mover)))) (and (= (from) (mapEntry (mover))) (!= (topLevel at:(from)) 13)) (not (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "Side"))))}) (move (from (from)) (to (trackSite Move from:(from) steps:(pips)) if:(not (is Enemy (who at:(to)))))))))}) ### SUF: ) ### MID: (rules (start {(place Stack "PIECE_ALPHA1" 0 count:15) (place Stack "PIECE_ALPHA2" 25 count:15)}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (all Sites (sites Occupied by:Mover) if:(is In (site) (sites Mover "Home"))) (forEach Die replayDouble:True if:(!= (pips) 0) (forEach Site (sites Occupied by:Mover) (if (and (is Occupied (site)) (!= (trackSite Move from:(site) steps:(pips)) -1)) (if (= (trackSite Move from:(site) steps:(pips)) -2) (move Remove (site)) (move (from (site)) (to (trackSite Move from:(site) steps:(pips)) if:(not (is Enemy (who at:(to)))))))) noMoveYet:(firstMoveOnTrack "Track" Mover (if (and (is Friend (who at:(site))) (< (trackSite Move from:(site) steps:(pips)) 0)) (move Remove (site)))) (then (if (not (all DiceUsed)) (moveAgain))))) (max Distance "Track" Mover (forEach Piece top:True (then (if (not (all DiceUsed)) (moveAgain)))))))) (end (if (no Pieces Mover) (byScore {(score P1 (if (is Mover P1) (if (= (size Stack in:(sites Occupied by:P2)) 15) 2 1) 0)) (score P2 (if (is Mover P2) (if (= (size Stack in:(sites Occupied by:P1)) 15) 2 1) 0))})))) |
### PRE: (game "GAME_NAME" (players {(player S) (player N)}) (equipment {(board (square 5 diagonals:Solid) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Step Forwards (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (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)))) (move Slide))) (regions P1 (sites Top)) (regions P2 (sites Bottom))}) (rules (start {(place "PIECE_ALPHA2" (forEach ### SUF: if:(< (site) (centrePoint)))) (place "PIECE_ALPHA1" (forEach (sites Board) if:(> (site) (centrePoint))))}) (play (forEach Piece)) (end (if (no Moves Mover) (result Next Win))))) ### MID: (sites Board) |
### 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 ### SUF: Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" (last To) (then (moveAgain))) (set Var "LT" -1)))) (forEach Site (sites Occupied by:Mover) (do (set Var "LT" (site)) next:(forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))) Orthogonal)) (move (from (var "LT")) (to (site) if:(!= (last From) (to)) (apply (remove (site)))) (then (and (add (piece (id "PIECE_ALPHA" Next)) (to (var "LT"))) (set Var "LT" (last To) (then (if (< 0 (count Sites in:(sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))))) (set NextPlayer (player (mover))) (set Var "LT" -1))))))))))) (if (<= 0 (var "LT")) (forEach Site (intersection (sites Around (var "LT") Orthogonal) (sites Around (sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))) Orthogonal)) (move (from (var "LT")) (to (site) if:(!= (last From) (to)) (apply (remove (site)))) (then (and (add (piece (id "PIECE_ALPHA" Next)) (to (var "LT"))) (set Var "LT" (last To) (then (if (< 0 (count Sites in:(sites (results from:(var "LT") to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to))))) (set NextPlayer (player (mover))) (set Var "LT" -1)))))))) (move Add (to (sites Empty)) (then (if (and (not (is Prev Mover)) (< 0 (count Sites in:(sites (results from:(last To) to:(sites Around (from) Diagonal if:(and (is Mover (who at:(to))) (= 2 (count Pieces Next in:(intersection (sites Around (to) Orthogonal) (sites Around (from) Orthogonal)))))) (to)))))) (set Var "LT" (last To) (then (moveAgain))) (set Var "LT" -1))))))) (end {(if (is Connected Orthogonal Mover) (result Mover Win))}))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 7)) (piece "PIECE_ALPHA" Each)}) (rules (meta (swap)) (play (move Add (to (sites Empty)) (then (if (is Full) (do (set Var "CutOff" 0) next:(do (while (and (= 0 (- (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff")) (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff")))) (!= 0 (+ (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff")) (count Groups if:(= (id P2) (who at:(to))) min:(var "CutOff"))))) (set Var "CutOff" (+ 1 (var "CutOff")))) next:(and (set Score P1 (count Groups if:(= (id P1) (who at:(to))) min:(var "CutOff"))) (set Score P2 (count Groups if:(= ### SUF: (who at:(to))) min:(var "CutOff")))))))))) (end (if (is Full) {(if (< (score P1) (score P2)) (result P1 Win)) (if (> (score P1) (score P2)) (result P2 Win))})))) ### MID: (id P2) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (remove (merge (shift 0 2 (scale 8 2 (rectangle 3 2))) (scale 1 2 (wedge 5 4))) edges:{{0 1} {2 3} {4 5}}) edges:{{0 15} {18 1} {2 11} {14 3} {4 7} {10 5}}) 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: ### SUF: )) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA2" (handSite P2) count:17) (place "PIECE_BETA1" (sites Top)) (place "PIECE_BETA1" (handSite P1) count:2)}) phases:{(phase "Opening" P1 (play (move (from (handSite Mover)) (to (sites Empty)) (then (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (moveAgain))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "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: (between) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (shift 0 (/ (- 7 3) 2) (rectangle 3 7 diagonals:Solid)) (shift (/ ### SUF: 2) 0 (rectangle 7 3 diagonals:Solid))) use:Vertex) (piece "PIECE_ALPHA" P1 (or (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))) (piece "PIECE_BETA" P2 N (move Step (directions {Rightward Forwards Leftward}) (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (sites {"G9" "I7"})) (place "PIECE_BETA2" (sites {"A3" "B2" "C1" "B4" "C3" "D2" "A7" "B6" "C5" "D4" "E3" "F2" "G1" "B8" "C7" "D6" "E5" "F4" "G3" "H2"}))}) (play (forEach Piece)) (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (- 7 3) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each)}) (rules (play (move Add (piece (+ 1 ### SUF: )) (to (sites Empty)) (then (if (!= (count MovesThisTurn) (- (count Players) 1)) (moveAgain))))) (end (if (and {(not (is Mover P1)) (is Next P1) (> (pow (count Players) 2) (count Sites in:(sites Empty)))}) (byScore {(score P1 (* (sizes Group P1))) (score P2 (* (sizes Group P2)))}))))) ### MID: (% (count Moves) (count Players)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Neutral)}) (rules (start {(place "PIECE_ALPHA1" {"A5" "C7" "D8" "F9" "H9" "I9" "I7" "I5" "F2" "C1" "A1" "A2"}) (place "PIECE_ALPHA2" {"A4" "A3" "B1" "D1" "E1" "G3" "H4" "I6" "I8" "G9" "E9" "B6"})}) phases:{(phase "Throw Bread" (play (move Add ### SUF: (to (sites Empty)) (then (attract (from (last To)))))) (nextPhase "Move Bread")) (phase "Move Bread" (play (move (from (sites Occupied by:Neutral)) (to (difference (sites Empty) (sites Direction from:(last To)))) (then (attract (from (last To)))))))} (end {(if (= 1 (count Groups if:(= (who at:(to)) P1))) (result P1 Win)) (if (= 1 (count Groups if:(= (who at:(to)) P2))) (result P2 Win))}))) ### MID: (piece "PIECE_BETA0") |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 2 diagonals:Solid) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(and {(or {(and (!= (from) (coord "A3")) (!= (from) (coord "C3"))) (and (= (from) (coord "C3")) (!= (to) (coord "A3"))) (and (= (from) (coord "A3")) (!= (to) (coord "C3")))}) (is Empty (to))}))))}) (rules ### SUF: (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))) ### MID: (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (square 7) edges:{{16 24} {24 32} {30 24} {24 18}}) use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (> (count Sites in:(forEach (sites Around (last To)) if:(if (is Empty (site)) (or (and {(is In (last To) (sites {(ahead (site) N) (ahead (site) S) (ahead (site) W) (ahead (site) E)})) (is Mover (who at:(ahead (site) N))) (is Mover (who at:(ahead (site) S))) (is Mover (who at:(ahead (site) W))) (is Mover (who at:(ahead (site) E)))}) (and {(is In (last To) (sites {(ahead (site) NE) (ahead (site) SE) (ahead (site) SW) (ahead (site) NW)})) (is Mover (who at:(ahead (site) NE))) (is Mover (who at:(ahead (site) SE))) (is Mover (who at:(ahead (site) SW))) (is Mover (who at:(ahead (site) NW)))}))))) 0) (and (set Value Mover (count Sites in: ### SUF: )) (moveAgain)))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:24)) phases:{(phase "FirstPlacement" P1 (play (move (from (handSite Mover)) (to (sites Centre)))) (nextPhase "Placement")) (phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Remove (sites Occupied by:Next) (then (if (> (value Player Mover) 1) (and (moveAgain) (set Value Mover (- (value Player Mover) 1))) (set Value Mover 0)))) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (forEach (sites Around (last To)) if:(if (is Empty (site)) (or (and {(is In (last To) (sites {(ahead (site) N) (ahead (site) S) (ahead (site) W) (ahead (site) E)})) (is Mover (who at:(ahead (site) N))) (is Mover (who at:(ahead (site) S))) (is Mover (who at:(ahead (site) W))) (is Mover (who at:(ahead (site) E)))}) (and {(is In (last To) (sites {(ahead (site) NE) (ahead (site) SE) (ahead (site) SW) (ahead (site) NW)})) (is Mover (who at:(ahead (site) NE))) (is Mover (who at:(ahead (site) SE))) (is Mover (who at:(ahead (site) SW))) (is Mover (who at:(ahead (site) NW)))})))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (if (= (where "PIECE_BETA" Mover) -1) (promote (last To) (piece "PIECE_BETA") Mover) (remove (last To))))))) (piece "PIECE_GAMMA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_BETA" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_EPSILON" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ETA" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "PIECE_ETA" Next))))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (board (square 10))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 2)) (place "PIECE_ALPHA2" (sites Row 7)) (place "PIECE_ZETA1" (sites {"A1" "J1"})) (place "PIECE_ZETA2" (sites {"A10" "J10"})) ### SUF: (place "PIECE_DELTA2" (sites {"B10" "I10"})) (place "PIECE_ETA1" (sites {"C1" "H1"})) (place "PIECE_ETA2" (sites {"C10" "H10"})) (place "PIECE_EPSILON1" (sites {"D1" "G1"})) (place "PIECE_EPSILON2" (sites {"D10" "G10"})) (place "PIECE_BETA1" coord:"E1") (place "PIECE_BETA2" coord:"F10") (place "PIECE_GAMMA1" coord:"F1") (place "PIECE_GAMMA2" coord:"E10")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Mover))))) (end {(if (and (is Threatened (id "PIECE_GAMMA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_GAMMA" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))}))) ### MID: (place "PIECE_DELTA1" (sites {"B1" "I1"})) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (move (from) (to (sites LineOfSight Farthest at:(from))))) (piece "PIECE_BETA" Each (move (from) (to (sites LineOfSight Farthest at:(from)))))}) (rules (start {(place "PIECE_BETA1" (intersection (sites Bottom) (sites Column 2))) (place "PIECE_BETA2" (intersection (sites Top) (sites Column 2))) (place "PIECE_ALPHA1" (difference (sites Bottom) (sites Column 2))) (place "PIECE_ALPHA2" (difference (sites Top) (sites Column 2)))}) (play (forEach Piece)) (end (if ### SUF: (result Mover Win))))) ### MID: (is In (where "PIECE_BETA" Mover) (sites Centre)) |
### PRE: ### SUF: ### MID: (game "GAME_NAME" (players 3) (equipment {(board (rectangle 3 5)) (piece "PIECE_ALPHA" P1) (piece "PIECE_BETA" P2) (piece "PIECE_GAMMA" P3)}) (rules (play (move Add (to (sites Empty)))) (end (if (is Line 3) (result Mover Win))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (rectangle 3 4) (shift 0 1 (rectangle 1 12))) {(track "Track1" "20,3,W,N1,E,End" P1 directed:True) (track "Track2" "21,12,W,S1,E,End" P2 directed:True)}) (dice facesByDie:{{1 2 3 4} {0 1}} num:2) (hand Each) (regions "Replay" (sites {"A1" "A3" "D2" "H2" "L2"})) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) -2) (move Remove (from)) (if (!= (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) -1) (if (or (is Empty (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10))))))) (and (not (is Friend (who at:(trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10))))))))) (not (is In (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) (sites "Replay"))))) (move (from) (to (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to))))))) (then (if (is In (last To) (sites "Replay")) (moveAgain))))))))}) (rules (start { ### SUF: (place "PIECE_ALPHA2" (handSite P2) count:7)}) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (place "PIECE_ALPHA1" (handSite P1) count:7) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 7 7)) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty ### SUF: )) (then (moveAgain)))) (piece "PIECE_BETA" Neutral)}) (rules (start {(place "PIECE_ALPHA1" {"A4"}) (place "PIECE_ALPHA2" {"G4"})}) (play (if (is Even (count Moves)) (forEach Piece) (move Add (piece "PIECE_BETA0") (to (sites Empty))))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,23,E,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23,W,N1,E,23" loop:True P1) (track "Track2" "47,W,S1,E,S1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24,E,N1,W,24" loop:True P2)} use:Vertex) (piece "PIECE_ALPHA" P1 (if (or (= (state at:(from)) 0) (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "PIECE_BETA" P2 (if (or ### SUF: (and (= (count Pips) (mapEntry "Sir" (mover))) (= (state at:(from)) 1))) (if (!= (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) -1) (if (or (is In (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (sites Empty)) (is Enemy (who at:(trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips)))))) (move (from) (to (trackSite Move steps:(mapEntry "ThrowDiceValue" (count Pips))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (regions "AllSites" (sites Board)) (dice d:2 from:0 num:6) (map "ThrowDiceValue" {(pair 0 6) (pair 1 5) (pair 2 0) (pair 3 3) (pair 4 0) (pair 5 5) (pair 6 6)}) (map "Sir" {(pair 1 1) (pair 2 5)})}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom) state:1) (place "PIECE_BETA2" (sites Top) state:1)}) (play (do (roll) next:(if (can Move (forEach Piece)) (forEach Piece (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain)))) (move Pass (then (if (= (mapEntry "ThrowDiceValue" (count Pips)) 5) (moveAgain))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (= (state at:(from)) 0) |
### PRE: (game "GAME_NAME" ### SUF: (equipment {(board (rectangle 5 6)) (hand Each) (piece "PIECE_ALPHA" P1 (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal) (moveAgain))))) (piece "PIECE_BETA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal) (moveAgain)))))}) (rules (start {(place "PIECE_ALPHA1" (handSite P1) count:12) (place "PIECE_BETA2" (handSite P2) count:12)}) phases:{(phase "Placement" (play (do (move (from (handSite Mover)) (to (sites Empty))) ifAfterwards:(not (is Line 3 Orthogonal)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (players 2) |
### 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 ### SUF: ))))))) (phase "FirstTigerMovement" P2 (play (forEach Piece (if (= (count Steps (from) (last To)) (min (results from:(last To) to:(sites Corners) (count Steps (from) (to))))) (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (move Step (to if:(is Empty (to)))))))) (nextPhase Mover "MovementP2")) (phase "MovementP2" P2 (play (forEach Piece)))} (end {(if (no Pieces P1) (result P2 Win)) (if (>= 2 (count Pieces P2)) (result P1 Win))}))) ### MID: (site) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 (if (= (state at:(from)) 1) (or ### SUF: (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (then (and (forEach Site (sites Occupied by:Mover) (if (= (state at:(site)) 0) (set State at:(site) 1))) (set State at:(last To) 0))))) (piece "PIECE_BETA" P2 N (move Step (directions {FR FL}) (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" (intersection (sites Top) (union (sites Left) (difference (expand (sites Right)) (sites Right)))) state:1) (place "PIECE_BETA2" (difference (expand (sites Bottom) steps:2) (sites Phase 0)))}) phases:{(phase "Opening" P1 (play (forEach Piece (or (move Step Diagonal (to if:(is Empty (to)))) (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))) (then (set State at:(last To) 0))))) (nextPhase "Movement")) (phase "Movement" (play (forEach Piece)))} (end {(if (no Moves P1) (result P2 Win)) (if (no Pieces P2) (result P1 Win))}))) ### MID: (move Step Diagonal (to if:(is Empty (to)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge (rectangle 3 4) (shift 0 1 (rectangle 1 12))) {(track "Track1" "20,3,W,N1,E,End" P1 directed:True) (track "Track2" "21,12,W,S1,E,End" P2 directed:True)}) (dice facesByDie:{{1 2 3 4} {0 1}} num:2) (hand Each) (regions "Replay" (sites {"A1" "A3" "D2" "H2" "L2"})) (piece "PIECE_ALPHA" Each (if (= (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) -2) (move Remove (from)) (if (!= (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) -1) (if (or (is Empty (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10))))))) (and (not (is Friend (who at:(trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10))))))))) (not (is In (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) (sites "Replay"))))) (move (from) (to (trackSite Move steps:(if (= 0 (face 23)) (face 22) (if (= 1 (face 22)) (+ (face 22) 5) (if (= 2 (face 22)) (+ (face 22) 6) (if (= 3 (face 22)) (+ (face 22) 7) (+ (face 22) 10)))))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (handSite (who at:(to))))))) (then (if (is In (last To) (sites "Replay")) (moveAgain))))))))}) (rules (start {(place "PIECE_ALPHA1" ### SUF: count:7) (place "PIECE_ALPHA2" (handSite P2) count:7)}) (play (do (roll) next:(or (forEach Piece) (forEach Piece container:(mover))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (handSite P1) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 5 5 diagonals:Alternating) use:Vertex) (piece "PIECE_ALPHA" Each (or (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0)))) (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to))) (then (set Value Mover 1))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_BETA" Each (or (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (set Value Mover 0))) (move Slide (then (set Value Mover 1))))) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "PIECE_ALPHA2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (or (if (= (value Player Prev) 1) (or (if (and (is In ### SUF: (sites Pending)) (is In (last From) (sites Empty))) (move Select (from (last To) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))) (move Select (from (sites Pending) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)}))))) (do (set Pending (sites From (or (forEach Piece "PIECE_ALPHA" (move Hop (directions {Forwards Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))))) next:(forEach Piece)))) (end (if (no Pieces Mover) (result Mover Loss))))) ### MID: (last From) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (rectangle 7 8)) (piece "PIECE_ALPHA" Each) (regions "RomanGoal1" P1 (sites Top)) (regions "GaulGoal2" P2 (sites Bottom))}) (rules (start {(place Stack "PIECE_ALPHA1" (sites {0 1 2 3 4 5 6 7}) count:2) (place Stack "PIECE_ALPHA2" (sites {48 49 50 51 52 53 54 55}) count:2)}) (play (if (is Prev Mover) (or (move (from (last From)) (to (last To)) stack:True (then (and (remove (last To)) (remove (last To))))) (move Pass)) (forEach Piece "PIECE_ALPHA" (or {(move Hop (from if: ### SUF: ) (between if:(or (is Empty (between)) (and (is Mover (who at:(between))) (< (size Stack at:(between)) 2))) (apply (fromTo (from) (to (between))))) (to if:(or (is Empty (to)) (and (is Mover (who at:(to))) (< (size Stack at:(to)) 2)))) stack:True) (move Step (from if:(and (is Mover (who at:(from))) (= (size Stack at:(from)) 2))) (to if:(and (is Enemy (who at:(to))) (= 1 (size Stack at:(to)))) (apply (remove (to)))) stack:True (then (and (fromTo (from (last To)) (to (last From))) (remove (last To))))) (move Step (from if:(and (is Mover (who at:(from))) (= (size Stack at:(from)) 2))) (to if:(and (is Enemy (who at:(to))) (= (size Stack at:(to)) 3)) (apply (remove (to)))) stack:True (then (and {(fromTo (from (last To)) (to (last From))) (remove (last To)) (moveAgain)}))) (move Hop (from if:(and (is Mover (who at:(from))) (= (size Stack at:(from)) 3))) (difference All Backwards) (between (range 1 2) if:True) (to if:(and (not (is Enemy (who at:(to)))) (not (is Mover (who at:(to))))))) (move Hop (from if:(and (is Mover (who at:(from))) (= (size Stack at:(from)) 3))) (difference All Backwards) (between (range 1 2) if:True) (to if:(is Enemy (who at:(to)))) (then (and (remove (last To)) (remove (last To)))))}) top:True))) (end {(if (no Moves Next) (result Mover Win)) (if (and {(is In (last To) (sites Mover)) (not (is Enemy (who at:(last To)))) (is Mover (who at:(last To)))}) (result Mover Win))}))) ### MID: (and (is Mover (who at:(from))) (= (size Stack at:(from)) 2)) |
### 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 ### SUF: (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: (is Enemy (who at:(to))) |
### 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) ### SUF: )) (move Select (from (last To) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)})))) (move Select (from (sites Pending) if:(is Occupied (from))) (then (and {(remove (last To)) (moveAgain) (set Value Prev 0)}))))) (do (set Pending (sites From (or (forEach Piece "PIECE_ALPHA" (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (and (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)) (set Value Mover 0))))) (forEach Piece "PIECE_BETA" (move Hop (between if:(is Enemy (who at:(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: (sites Empty) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 11)) (regions "Fortresses" (sites Corners)) (piece "PIECE_ALPHA" P1 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (and {(custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA2" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses")))))) (surround (from (last To)) Orthogonal (between if:(= (what at:(between)) (id "PIECE_BETA" P2)) (apply (trigger "Surrounded" P2))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))})))) (piece "PIECE_ALPHA" P2 (move Slide Orthogonal (between if:(and (not (is In (between) (union (sites Centre) (sites "Fortresses")))) (is Empty (between)))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In (to) (union (sites Centre) (sites "Fortresses"))))))))) (piece "PIECE_BETA" P2 (move Slide Orthogonal (then (custodial (from (last To)) Orthogonal (between (max 1) if:(= (what at:(between)) (id "PIECE_ALPHA1" Next)) (apply (remove (between)))) (to if:(or (is Friend (who at:(to))) (is In ### SUF: (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: (to) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 2 13) {(track "Track1" {6 12 11 10 9 8 7 5 4 3 2 1 0 13 14 15 16 17 18 20 21 22 23 24 25} P1 directed:True) (track "Track2" {19 25 24 23 22 21 20 18 17 16 15 14 13 0 1 2 3 4 5 7 8 9 10 11 12} P2 directed:True)} use:Vertex) (dice num:3) (map {(pair 1 19) (pair 2 6)}) (piece "PIECE_ALPHA" Each)}) (rules (start {(place Stack "PIECE_ALPHA1" 7 count:8) (place Stack "PIECE_ALPHA1" 5 count:7) (place Stack "PIECE_ALPHA2" 20 count:8) (place Stack "PIECE_ALPHA2" 18 count:7)}) (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die if:(!= (pips) 0) (forEach Site (sites Occupied by:Mover) (if (= (trackSite Move from:(site) steps:(pips)) -1) (move Remove (site)) (move (from ### SUF: ) (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 (if (not (all DiceUsed)) (moveAgain)))))) (end (if (no Pieces Mover) (result Mover Win))))) ### MID: (site) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (hex 5))) (piece "PIECE_ALPHA" Each) (piece "PIECE_ALPHA" Shared) (hand Shared)}) (rules (meta (swap)) (start (place "PIECE_ALPHA" (handSite Shared))) (play (or (move Add ### SUF: ) (move (from (handSite Shared)) (to (sites Empty)) copy:True))) (end (forEach Player if:(and (or (= (what at:(last To)) (id "PIECE_ALPHA" Player)) (= (what at:(last To)) (id "PIECE_ALPHA"))) (is Line 5 whats:{(id "PIECE_ALPHA" Player) (id "PIECE_ALPHA")})) (result Player Win))))) ### MID: (to (sites Around (sites Occupied by:Shared component:"PIECE_ALPHA") if:(is Empty (to)))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 4 pyramidal:True) use:Vertex) (piece "PIECE_ALPHA" Each) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:15)) (play ### SUF: ) (end (if (= (layer of:(last To)) 3) (result Mover Win))))) ### MID: (if (is Prev Mover) (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (handSite Mover)) (then (if (= (var) 1) (and (set Var 0) (moveAgain))))) (or (do (move (from (sites Occupied by:Mover) if:(and {(if (!= (from) (ahead (from) UNE)) (is Empty (ahead (from) UNE)) True) (if (!= (from) (ahead (from) USE)) (is Empty (ahead (from) USE)) True) (if (!= (from) (ahead (from) USW)) (is Empty (ahead (from) USW)) True) (if (!= (from) (ahead (from) UNW)) (is Empty (ahead (from) UNW)) True)})) (to (sites Empty) if:(and (is Flat) (< (layer of:(from)) (layer of:(to)))))) ifAfterwards:(is Flat (last To))) (move (from (sites Occupied by:Mover container:(mover))) (to (sites Empty) if:(is Flat))) (then (if (is Pattern {F R F R F} whats:{(id "PIECE_ALPHA" Mover)}) (and (set Var 1) (moveAgain)))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board ### SUF: use:Vertex) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to)))))}) (rules (start {(place "PIECE_ALPHA1" {2 5 8}) (place "PIECE_ALPHA2" {0 3 6})}) (play (forEach Piece)) (end (if (no Moves Next) (result Next Loss))))) ### MID: (remove (square 3) edges:{{0 1} {1 2}}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 90 (hex 5))) (piece "PIECE_ALPHA" Each) (hand Shared size:2)}) (rules ### SUF: (play (move (from (sites Hand Shared)) (to (sites Empty)) copy:True)) (end (if (is Full) (if (is Odd (+ (count Groups if:(= (who at:(to)) P1) min:5) (count Groups if:(= (who at:(to)) P2) min:5))) (result P1 Win)) (result P2 Win))))) ### MID: (start {(place "PIECE_ALPHA1" (handSite Shared)) (place "PIECE_ALPHA2" (handSite Shared 1))}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 7 6)) (hand Each) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:18)) phases:{(phase "Placement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3 Orthogonal exact:True) (moveAgain)))))) ### SUF: ) (phase "Movement" (play (if (is Prev Mover) (move Remove (sites Occupied by:Enemy container:"Board")) (forEach Piece))))} (end (if (no Pieces Next) (result Next Loss))))) ### MID: (nextPhase Mover (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site)))) "Movement") |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 4 12) {(track "Track1" "0,E,N1,W,N1,E,N1,W" P1 directed:True) (track "Track2" "47,W,S1,E,S1,W,S1,E" P2 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each (if (and (not (is In (from) (sites Next "Home"))) (!= 0 (mapEntry "Throw" (count Pips)))) (or (if (not (= 1 (var))) (move (from (from) if:(if (= (state at:(from)) 1) True (= 2 (mapEntry "Throw" (count Pips))))) (to (trackSite Move steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (if (not (= (state at:(last To)) 1)) (set State at:(last To) 1))))) (move (from (from) if:(if (= (state at:(from)) 1) True (= 2 (mapEntry "Throw" (count Pips))))) (to (trackSite Move steps:(/ (mapEntry "Throw" (count Pips)) 2)) if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))) (then (and (if (not (= (state at:(last To)) 1)) (set State at:(last To) 1)) (if (not (= 1 (var))) (and (set Var 1) (moveAgain)) (set Var 0)))))))) (regions "Home" P1 (sites Bottom)) (regions "Home" P2 (sites Top)) (map "Throw" { ### SUF: (pair 1 0) (pair 2 0) (pair 3 2) (pair 4 12)}) (dice d:2 from:0 num:4)}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (do (if (not (= 1 (var))) (roll)) next:(if (can Move (forEach Piece)) (forEach Piece) (move Pass (then (set Var 0)))) (then (if (is In (mapEntry "Throw" (count Pips)) (sites {2 8 12})) (moveAgain))))) (end (if (and (= 0 (count Sites in:(forEach (sites Occupied by:P1) if:(not (is In (site) (sites P2 "Home")))))) (= 0 (count Sites in:(forEach (sites Occupied by:P2) if:(not (is In (site) (sites P1 "Home"))))))) (byScore {(score P1 (count Sites in:(forEach (sites P2 "Home") if:(= (who at:(site)) P1)))) (score P2 (count Sites in:(forEach (sites P1 "Home") if:(= (who at:(site)) P2))))}))))) ### MID: (pair 0 8) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (concentric Square rings:3) use:Vertex) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:9)) (play (or (if ### SUF: (move (from (handSite Mover)) (to (sites Empty)))) (forEach Piece))) (end (if (is Line 3 Orthogonal) (result Mover Win))))) ### MID: (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) |
### 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)) (place "PIECE_BETA2" (ahead (centrePoint) N)) (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 ### SUF: 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: (sites Occupied by:All component:"PIECE_BETA") |
### PRE: (game "GAME_NAME" ### SUF: (equipment {(board (hex 5)) (piece "PIECE_ALPHA" Each (move Step (to if:(and (or (= (id Neutral) (who at:(to))) (is Empty (to))) (= 1 (- (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral)))))) (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (to) (intersection (sites Occupied by:Neutral) (sites Distance (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) from:(from) (exact (count Steps (step (to if:(or (= (id Neutral) (who at:(to))) (is Empty (to))))) (from) (sites Occupied by:Neutral))))))))) (apply (if (is Occupied (to)) (and (remove (to)) (addScore Mover 1))))))) (piece "PIECE_ALPHA" Neutral)}) (rules (start {(place "PIECE_ALPHA0" (difference (sites Board) (sites Corners))) (place "PIECE_ALPHA1" (sites Around (centrePoint) distance:(- 5 1) NNW)) (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: (players 2) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 7)) (piece "PIECE_ALPHA" Each (move Step Orthogonal (to if:(is Empty (to))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) (then (if (can Move (step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))))) (moveAgain))))))) (hand Each)}) (rules (start (place "PIECE_ALPHA" "Hand" count:24)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (if (no Pieces Mover in:(sites Board)) (forEach (sites Around (centrePoint) Orthogonal) if:(is Empty (site))) (difference (sites Board) (centrePoint))) if:(is Empty (to))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Capture")) (phase "Capture" (play (if (is Prev Mover) (or (move Step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))) (then (custodial (from (last To)) Orthogonal (between (max 1) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Friend (who at:(to)))) (then (if (can Move (step (from (last To)) Orthogonal (to if:(and (is Empty (to)) (or {(and (is Enemy (who at:(ahead (to) W))) (is Friend (who at:(ahead (to) steps:2 W)))) (and (is Enemy (who at:(ahead (to) E))) (is Friend (who at:(ahead (to) steps:2 E)))) ### SUF: (and (is Enemy (who at:(ahead (to) S))) (is Friend (who at:(ahead (to) steps:2 S))))}))))) (moveAgain)))))) (move Pass)) (forEach Piece))))} (end (if (no Moves Next) (result Mover Win))))) ### MID: (and (is Enemy (who at:(ahead (to) N))) (is Friend (who at:(ahead (to) steps:2 N)))) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 3 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 3 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (or (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if ### SUF: (moveAgain))))) (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))) (move Pass)) (or (forEach Piece "PIECE_ALPHA" (or (move Hop (from) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover) (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (forEach Piece "PIECE_BETA" (or (move Step Diagonal (to if:(is Empty (to)))) (move Hop Diagonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (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))))) |
### 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) (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)}) (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 ### SUF: (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: (from (to) level:(level)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 16)) (piece "PIECE_ALPHA" Each) (regions "Home" P1 (difference (expand (intersection (sites Bottom) (sites Right)) steps:(+ 1 (/ 16 4)) Orthogonal) (sites {(ahead (coord row:0 column:(- 16 1)) steps:(+ 1 (/ 16 4)) N) (ahead (coord row:0 column:(- 16 1)) steps:(+ 1 (/ 16 4)) W)}))) (regions "Home" P2 (difference (expand (intersection (sites Top) (sites Left)) steps:(+ 1 (/ 16 4)) Orthogonal) (sites {(ahead (coord row:(- 16 1) column:0) steps:(+ 1 (/ 16 4)) E) (ahead (coord row:(- 16 1) column:0) steps:(+ 1 (/ 16 4)) S)}))) (map {(pair P1 P2) (pair P2 P1)})}) (rules (start {(place "PIECE_ALPHA1" (sites P1)) (place "PIECE_ALPHA2" (sites P2))}) phases:{(phase "Movement" (play (forEach Piece (or (move Hop (from (from)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from ### SUF: ) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Step (to if:(and (is Empty (to)) (or (not (is In (from) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))))) (nextPhase (is Mover (next)) "MultiJump")) (phase "MultiJump" (play (or (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))) (then (if (can Move (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (and (is Empty (to)) (not (is Visited (to)))) (or (not (is In (last To) (sites (player (mapEntry (mover)))))) (is In (to) (sites (player (mapEntry (mover)))))))))) (moveAgain)))) (move Pass))) (nextPhase (not (is Mover (next))) "Movement"))} (end (if (= (sites Occupied by:Mover) (sites (player (mapEntry (mover))))) (result Mover Win))))) ### MID: (last To) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (add (remove (merge {(shift 3 3 (remove (square 3) edges:{{1 4} {3 4} {4 7} {4 5}})) (shift 2 2 (scale 2 (remove (square 3) edges:{{1 4} {3 4} {4 7} {4 5}}))) (scale 4 (remove (square 3) edges:{{1 4} {3 4} {4 7} {4 5}}))}) vertices:{4}) edges:{{17 19} {17 20} {20 22} {22 19} {17 9} {19 11} {22 14} {12 20} {21 13} {23 15} {18 10} {16 8} {11 9} {9 12} {12 14} {14 11} {9 1} {11 3} {6 14} {4 12} {0 8} {5 13} {7 15} {10 2}}) use:Vertex) (hand Each) (piece "PIECE_ALPHA" Each (move Step (to if:(is Empty (to))) (then (if (is Line 3) (moveAgain)))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play ### SUF: ) (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: (if (is Prev Mover) (move Remove (forEach (sites Occupied by:Enemy container:"Board") if:(not (is Line 3 Orthogonal through:(site))))) (move (from (handSite Mover)) (to (sites Empty)) (then (if (is Line 3) (moveAgain))))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rotate 45 (merge {(rectangle 5 4) (shift -1 1 (rectangle 3 6)) (shift -2 2 (rectangle 1 8)) (shift 1 -1 (rectangle 7 2))})) use:Vertex) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom) steps:(- 3 1))) (place "PIECE_ALPHA2" (expand (sites Top) steps:(- 3 1)))}) (play (if (is Prev Mover) (or (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (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) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover))))) (move Hop (from (last To)) SameDirection (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) SameDirection (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) ### SUF: ) (or {(forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {FR FL}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) SameDirection (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (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))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (move Pass) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_BETA" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1))))))) (if (not (= 1 (state at:(from)))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (not (= 1 (state at: ### SUF: ))) (set State at:(last To) 1))))) (piece "PIECE_GAMMA" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_DELTA" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))) (piece "PIECE_EPSILON" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Var 1))))))) (piece "PIECE_ZETA" Each (or {(if (and (not (= (var) 1)) (is In (from) (sites Start (piece (what at:(from)))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1)))))))} (then (if (and (= (where "PIECE_BETA" Mover) -1) (is In (last To) (sites Mover "Promotion"))) (promote (last To) (piece "PIECE_BETA") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "PIECE_ZETA1" (sites Row 1)) (place "PIECE_ZETA2" (sites Row 6)) (place "PIECE_EPSILON1" {"A1" "H1"} state:1) (place "PIECE_DELTA1" {"B1" "G1"}) (place "PIECE_GAMMA1" {"C1" "F1"}) (place "PIECE_BETA1" coord:"D1") (place "PIECE_ALPHA1" coord:"E1" state:1) (place "PIECE_EPSILON2" {"A8" "H8"} state:1) (place "PIECE_DELTA2" {"B8" "G8"}) (place "PIECE_GAMMA2" {"C8" "F8"}) (place "PIECE_BETA2" coord:"D8") (place "PIECE_ALPHA2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Mover))))) (end (if (and (is Threatened (id "PIECE_ALPHA" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_ALPHA" Next))))))) (result Mover Win))))) ### MID: (last 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) (directions Cell from:(from) to:(to)) stop:(is Empty (to)) distance:(size Stack at:(from)))) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(site)) stop:(is Empty (to)) distance:(size Stack at:(from))))) (or (<= (size Stack at:(from)) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(site)) distance:(size Stack at:(from))))) (= 0 (count Sites in:(intersection (sites Empty) (sites Direction from:(from) (directions Cell from:(from) to:(site)) distance:(size Stack at:(from)))))))))))) (then (forEach Site (sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From))) (if (= (count Sites in:(sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From)))) (count Steps (last From) (site))) (add (piece "PIECE_ALPHA1") (to (site)) count:(- (size Stack at:(last From)) (- (count Sites in:(sites Direction from:(last From) (directions Cell from:(last From) to:(last To)) stop:(is Empty (to)) distance:(size Stack at:(last From)))) 1)) stack:True) (add (piece "PIECE_ALPHA1") (to (site)) stack:True))))) (move Select (from (sites Occupied by:P1)) (to (sites Around (from)) if:(and (not (<= (size Stack at:(from)) (count Sites in:(sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from)))))) (not (= 0 (count Sites in:(intersection (sites Empty) (sites Direction from:(from) (directions Cell from:(from) to:(to)) distance:(size Stack at:(from))))))))) (then (forEach Site (sites Direction from: ### SUF: (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: (last From) |
### 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)))}) ### SUF: ) 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: (apply (remember Value (+ (array (intersection (sites Occupied by:Enemy) (sites Between from:(from) to:(to))))))) |
### PRE: (game "GAME_NAME" (players 7) (equipment {(board (concentric {49}) {(track "Track" {48 46 44 42 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 0 1 3 5 7 9 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47} loop:True)} use:Vertex) (dice d:7 num:3) (piece "PIECE_ALPHA" Each)}) (rules (start {(place Stack "PIECE_ALPHA1" 14 count:7) (place Stack "PIECE_ALPHA2" 0 count:7) (place Stack "PIECE_ALPHA3" 13 count:7) (place Stack "PIECE_ALPHA4" 27 count:7) (place Stack "PIECE_ALPHA5" 41 count:7) (place Stack "PIECE_ALPHA6" 42 count:7) (place Stack "PIECE_ALPHA7" 28 count:7)}) (play (do (if (not (is Prev Mover)) (roll)) next:(forEach Die if:(!= (pips) 0) (forEach Site (sites Occupied by:Mover) (move (from (site)) (to (trackSite Move from:(site) steps:(pips)) if:(or (and (is Enemy (who at:(to))) (= (topLevel at:(to)) 0)) (not (is Enemy (who at:(to))))) (apply if:(is Enemy (who at:(to))) (remove ### SUF: ))))) (then (if (not (all DiceUsed)) (moveAgain)))))) (end (forEach NonMover if:(no Pieces Player) (result Player Loss))))) ### MID: (to) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (difference (expand (sites Bottom) steps:(- 4 1)) (sites Phase 1))) (place "PIECE_ALPHA2" (difference (expand (sites Top) steps:(- 4 1)) (sites Phase 1)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves (move Hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Diagonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) ### SUF: ))))) (forEach Piece "PIECE_BETA" (move Hop Diagonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Diagonal (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {FR FL}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Diagonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (promote (last To) (piece "PIECE_BETA") Mover) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 12)) (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 Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_EPSILON" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_ZETA" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_ETA" Each (move Leap {{F F R F} {F F L F}} (to if:(not ### SUF: ) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "PIECE_THETA" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "PIECE_ALPHA1" (sites Row 1)) (place "PIECE_ALPHA2" (sites Row 10)) (place "PIECE_BETA1" {"A1" "L1"}) (place "PIECE_ETA1" {"B1" "K1"}) (place "PIECE_GAMMA1" {"C1" "J1"}) (place "PIECE_DELTA1" {"D1" "I1"}) (place "PIECE_ZETA1" {"E1" "H1"}) (place "PIECE_THETA1" coord:"F1") (place "PIECE_EPSILON1" coord:"G1") (place "PIECE_BETA2" {"A12" "L12"}) (place "PIECE_ETA2" {"B12" "K12"}) (place "PIECE_GAMMA2" {"C12" "J12"}) (place "PIECE_DELTA2" {"D12" "I12"}) (place "PIECE_ZETA2" {"E12" "H12"}) (place "PIECE_THETA2" coord:"G12") (place "PIECE_EPSILON2" coord:"F12")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "PIECE_EPSILON" Mover))))) (end (if (and (is Threatened (id "PIECE_EPSILON" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "PIECE_EPSILON" Next))))))) (result Mover Win))))) ### MID: (is Friend (who at:(to))) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 5)) (piece "PIECE_ALPHA" Each (or (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Orthogonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Step Orthogonal (to if:(is Empty (to))))))}) (rules (start {(place "PIECE_ALPHA1" (union {(sites Row 0) ### SUF: (sites {"A3" "B3"})})) (place "PIECE_ALPHA2" (union {(sites Row 3) (sites Row 4) (sites {"D3" "E3"})}))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) Orthogonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) Orthogonal (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))) ### MID: (sites Row 1) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" P1 N) (piece "PIECE_ALPHA" P2 S) (piece "PIECE_BETA" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "PIECE_ALPHA1" (union (sites Row 1) (sites Row 2))) (place "PIECE_ALPHA2" (union (sites Row 5) (sites Row 6)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "PIECE_ALPHA" Mover)) (max Moves (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (max Moves ### SUF: )) (priority {(max Moves (or (forEach Piece "PIECE_ALPHA" (move Hop (from (from)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))))) (forEach Piece "PIECE_BETA" (move Hop (from) Orthogonal (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "PIECE_ALPHA" (move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "PIECE_BETA") Mover)))) (forEach Piece "PIECE_BETA" (move Slide Orthogonal)))}))) (end (if (no Moves Next) (result Mover Win))))) ### MID: (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))) |
### PRE: (game "GAME_NAME" (players 4) (equipment {(board (concentric {4 4 4 4 4 4 4 4}) {(track "Track1" {28 24 20 16 12 8 4 0} P1 directed:True) (track "Track2" {29 25 21 17 13 9 5 1} P2 directed:True) (track "Track3" {30 26 22 18 14 10 6 2} P3 directed:True) (track "Track4" {31 27 23 19 15 11 7 3} P4 directed:True)} use:Vertex) (piece "PIECE_ALPHA" Each) (piece "PIECE_BETA" Shared) (hand Each size:2)}) (rules (start {(place "PIECE_ALPHA1" 28) (place "PIECE_ALPHA2" 29) (place "PIECE_ALPHA3" 30) (place "PIECE_ALPHA4" 31)}) phases:{(phase "Hiding" (play (move Add (piece (id "PIECE_BETA" Shared)) (to Cell (sites Hand Mover)) (then (set Hidden Cell at:(last To) to:Next)))) (nextPhase "Guessing")) (phase "Guessing" (play (move Select (from Cell (sites Hand Prev)) (then (and (if (is Empty (last To)) (and (fromTo (from (where "PIECE_ALPHA" Prev)) (to (if (is Prev P1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track1" steps:1) (if (is Prev P2) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track2" steps:1) (if (is Prev P3) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track3" steps:1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track4" steps:1)))))) (if (not (is In (if (is Prev P1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track1" steps:1) (if (is Prev P2) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track2" steps:1) (if (is Prev P3) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track3" steps:1) (trackSite Move from:(where "PIECE_ALPHA" Prev) "Track4" steps:1)))) (sites Centre))) (set NextPlayer (player (prev))))) (and {(moveAgain) (fromTo (from (where "PIECE_ALPHA" Mover)) (to (trackSite Move from:(where "PIECE_ALPHA" Mover) steps:1)))})) (remove Cell (sites Hand Prev)))))) (nextPhase "Hiding"))} (end (if (!= (- (count Players) ### SUF: ) (count Sites in:(forEach (sites Centre) if:(is Occupied (site))))) {(if (and (is Active P1) (is In (where "PIECE_ALPHA" P1) (sites Centre))) (result P1 Win)) (if (and (is Active P2) (is In (where "PIECE_ALPHA" P2) (sites Centre))) (result P2 Win)) (if (and (is Active P3) (is In (where "PIECE_ALPHA" P3) (sites Centre))) (result P3 Win)) (if (and (is Active P4) (is In (where "PIECE_ALPHA" P4) (sites Centre))) (result P4 Win))})))) ### MID: (count Active) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (tri Hexagon 7)) (tile "Triangle" Each) (tile "Triangle" Neutral)}) (rules ### SUF: (start (place Random {"Triangle1" "Triangle2" "Triangle0"})) (play (move Add (to (sites Empty)) (then (add (piece (id "Triangle" Next)) (to (intersection (expand (sites Occupied by:Next) Orthogonal) (sites Empty))))))) (end (if (no Moves Next) (byScore {(score P1 (count Pieces P1)) (score P2 (count Pieces P2))}))))) ### MID: (meta (swap)) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 5 6)) (hand Each) (piece "PIECE_ALPHA" Each (if (not (is Line 3 Orthogonal through:(from))) (move Step Orthogonal (to if:(is Empty (to))) (then (if (is Line 3 Orthogonal) (if (= (value Player Mover) -1) (set Value Mover 1) (set Value Mover (+ ### SUF: 1))))))))}) (rules (start (place "PIECE_ALPHA" "Hand" count:12)) phases:{(phase "Placement" (play (do (move (from (handSite Mover)) (to (sites Empty))) ifAfterwards:(not (is Line 3 Orthogonal)))) (nextPhase (and (all Sites (sites Hand P1) if:(= 0 (count Cell at:(site)))) (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site))))) "Movement")) (phase "Movement" (play (do (forEach Piece) ifAfterwards:(not (is Line 4 Orthogonal)))))} (end (if (= (value Player Mover) 3) (result Mover Win))))) ### MID: (value Player Mover) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (hex Hexagon 7)) (piece "PIECE_ALPHA" Each)}) (rules (start {(place "PIECE_ALPHA2" {0 (- (/ (- (* {3 7 7}) 7) 2) 1) (+ 1 (- (* {3 7 7}) (* 4 7)))}) (place "PIECE_ALPHA2" {(- 7 1) (+ 1 (/ ### SUF: 2)) (- (* {3 7 7}) (* 3 7))})}) phases:{(phase "Opening" (play (or (or (move Add (piece (id "PIECE_ALPHA" P2)) (to (sites Empty) if:(not (is Within (id "PIECE_ALPHA" P2) in:(sites Around (to))))) (then (if (< (count MovesThisTurn) 2) (moveAgain)))) (move Set NextPlayer (player (next)))) (if (= (count MovesThisTurn) 0) (move Pass (then (if (is Mover P1) (swap Players P1 P2 (then (note "Player 1 is now Black. Player 2 is now White." to:All))) (note "Player 1 remains White. Player 2 remains Black." to:All) (then (do (set NextPlayer (player 1)) next:(set Var 1))))))))) (nextPhase (= 1 (var)) "Playing")) (phase "Playing" (play (move Add (to (sites Empty)))))} (end (forEach Player if:(and {(= 1 (var)) (= (id Player) (mover)) (is Loop)}) (result Player Win))))) ### MID: (- (* {3 7 7}) (* 5 7)) |
### PRE: (game "GAME_NAME" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "PIECE_BETA") Mover))))) (piece "PIECE_GAMMA" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "PIECE_DELTA" Each (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) ### SUF: ) (if (and {(= (count Pieces Next) 1) (= (count Pieces Mover) 2) (!= (where "PIECE_BETA" Mover) -1)}) (result Mover Draw))}))) ### MID: (result Mover Draw) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 9)) (piece "PIECE_ALPHA" Each (move Leap {{F F R F} {F F L F}} (to if: ### SUF: (apply (if (is Enemy (who at:(to))) (remove (to)))))))}) (rules (start {(place "PIECE_ALPHA1" (sites Bottom)) (place "PIECE_ALPHA2" (sites Top))}) (play (forEach Piece)) (end {(if (no Pieces Next) (result Mover Win)) (if (is In (last To) (sites Centre)) (result Mover Win))}))) ### MID: (not (is Friend (who at:(to)))) |
### 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 ### SUF: (play (do (roll) next:(if (or (is Mover P1) (is Mover P2)) (forEach Piece (move (from (from) level:(level)) (to (trackSite Move "TrackCCW" steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Start" (who at:(to))))))))) (forEach Piece (move (from (from) level:(level)) (to (trackSite Move "TrackCW" steps:(mapEntry "Throw" (count Pips))) if:(not (is Friend (who at:(to)))) (apply if:(is Enemy (who at:(to))) (fromTo (from (to)) (to (mapEntry "Start" (who at:(to)))))))))) (then (do (if (if (or (is Mover P1) (is Mover P2)) (is In (mapEntry "Start" Mover) (sites Track "TrackCCW" from:(trackSite Move from:(last From) "TrackCCW" steps:1) to:(last To))) (is In (mapEntry "Start" Mover) (sites Track "TrackCW" from:(trackSite Move from:(last From) "TrackCW" steps:1) to:(last To)))) (addScore Mover 1) (then (if (= (score Mover) 4) (remove (last To))))) next:(if (and (!= 4 (score Mover)) (= 10 (mapEntry "Throw" (count Pips)))) (moveAgain)))))) (end (if (>= (score Mover) 4) (result Mover Win))))) ### MID: (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))}) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (rectangle 6 10)) (tile "Z" Shared {F R F F L F}) (tile "Y" Shared {F R F R R F R F F}) (tile "X" Shared {F L F L L F F L L F R F}) (tile "W" Shared {F L F R F L F}) (tile "V" Shared {F F R F F}) (tile "U" Shared {F L F F L F}) (tile "T" Shared {F F R F R R F F}) (tile "P" Shared {F F R F R F}) (tile "N" Shared {F R F L F F}) (tile "L" Shared {F R F F F}) (tile "I" Shared {F F F F}) (tile "F" Shared {F L F L L F L F R F}) (hand Shared size:12)}) (rules (start {(place "F" ### SUF: ) (place "I" (handSite Shared 1)) (place "L" (handSite Shared 2)) (place "N" (handSite Shared 3)) (place "P" (handSite Shared 4)) (place "T" (handSite Shared 5)) (place "U" (handSite Shared 6)) (place "V" (handSite Shared 7)) (place "W" (handSite Shared 8)) (place "X" (handSite Shared 9)) (place "Y" (handSite Shared 10)) (place "Z" (handSite Shared 11))}) (play (move (from (sites Hand Shared)) (to (sites Empty)))) (end (if (no Moves Next) (result Next Loss))))) ### MID: (handSite Shared 0) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (merge {(rectangle 1 6) (shift 7 0 ### SUF: ) (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 (handSite Mover)) (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: (rectangle 1 6) |
### PRE: (game "GAME_NAME" (players 2) (equipment {(board (square 8)) (piece "PIECE_ALPHA" Each (move Hop (between if:(is Occupied (between))) (to if:(is Empty (to)) (apply (and {(if (is Enemy (who at:(between))) (remove (between))) (remember Value ### SUF: ) (remember Value (to))}))) (then (if (can Move (hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is In (to) (values Remembered))))))) (moveAgain) (forget Value All)))))}) (rules (start {(place "PIECE_ALPHA1" (expand (sites Bottom))) (place "PIECE_ALPHA2" (expand (sites Top)))}) (play (if (is Prev Mover) (or (move Pass (then (forget Value All))) (move Hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is In (to) (values Remembered)))) (apply (and (if (is Enemy (who at:(between))) (remove (between))) (remember Value (to))))) (then (if (can Move (hop (from (last To)) (between if:(is Occupied (between))) (to if:(and (is Empty (to)) (not (is In (to) (values Remembered))))))) (moveAgain) (forget Value All))))) (forEach Piece))) (end (if (no Moves Next) (byScore {(score P1 (count Pieces P1)) (score P2 (count Pieces P2))}))))) ### MID: (from) |