description
stringlengths
4
3.37k
implementation
stringlengths
175
9.58k
text
stringlengths
365
12.1k
TURNS - At each turn, each player must move one of his stones (called Kangaroos): - A stone must jump over one (orthogonal or diagonal) adjacent stone landing on the immediate next empty cell. - If the jumped enemy stones are captured and removed from the board. - Jumps can be multiple but are not mandatory. GOAL - The game ends when one player cannot move. The winner is the one with more stones.
(game "Kanguruh" (players 2) (equipment {(board (square 8)) (piece "Kangaroo" 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 (from)) (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 "Kangaroo1" (expand (sites Bottom))) (place "Kangaroo2" (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))})))))
###Description TURNS - At each turn, each player must move one of his stones (called Kangaroos): - A stone must jump over one (orthogonal or diagonal) adjacent stone landing on the immediate next empty cell. - If the jumped enemy stones are captured and removed from the board. - Jumps can be multiple but are not mandatory. GOAL - The game ends when one player cannot move. The winner is the one with more stones. ###Ludii (game "Kanguruh" (players 2) (equipment {(board (square 8)) (piece "Kangaroo" 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 (from)) (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 "Kangaroo1" (expand (sites Bottom))) (place "Kangaroo2" (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))})))))
10x10 board. The black player starts by removing one black piece either from one of the central four spaces of the board or from one of the four corners. The white player then must remove a white piece that is orthogonally adjacent to the empty space. Play proceeds by orthogonally jumping an opposing piece and capturing it. All moves must be capturing moves. Multiple captures can be made only by continuing in the same direction. The first player unable to move loses. The game is played on a 10x10 board.
(game "Konane" (players 2) (equipment {(board (square 10)) (piece "Marker" Each)}) (rules (start {(place "Marker1" (sites Phase 1)) (place "Marker2" (sites Phase 0))}) phases:{(phase "OpeningP1" P1 (play (move Remove (intersection (union (sites Corners) (sites Centre)) (sites Phase 1)))) (nextPhase Mover "Movement")) (phase "OpeningP2" P2 (play (move Remove (sites Around (last To) Own))) (nextPhase Mover "Movement")) (phase "Movement" (play (if (is Prev Mover) (or (move Hop (from (last To)) SameDirection (between 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 if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece "Marker" (move Hop (from (from)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) SameDirection (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))))} (end (if (no Moves Next) (result Next Loss)))))
###Description 10x10 board. The black player starts by removing one black piece either from one of the central four spaces of the board or from one of the four corners. The white player then must remove a white piece that is orthogonally adjacent to the empty space. Play proceeds by orthogonally jumping an opposing piece and capturing it. All moves must be capturing moves. Multiple captures can be made only by continuing in the same direction. The first player unable to move loses. The game is played on a 10x10 board. ###Ludii (game "Konane" (players 2) (equipment {(board (square 10)) (piece "Marker" Each)}) (rules (start {(place "Marker1" (sites Phase 1)) (place "Marker2" (sites Phase 0))}) phases:{(phase "OpeningP1" P1 (play (move Remove (intersection (union (sites Corners) (sites Centre)) (sites Phase 1)))) (nextPhase Mover "Movement")) (phase "OpeningP2" P2 (play (move Remove (sites Around (last To) Own))) (nextPhase Mover "Movement")) (phase "Movement" (play (if (is Prev Mover) (or (move Hop (from (last To)) SameDirection (between 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 if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece "Marker" (move Hop (from (from)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) SameDirection (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))))))} (end (if (no Moves Next) (result Next Loss)))))
5x5 board. Twelve pieces per player, arranged in the two rows in front of each player, and in the right two squares in the central row (the central space is empty). Players alternate turns moving a piece to an adjacent orthogonal space. The player may capture an opponent's piece by hopping over it in an orthogonal direction. Multiple hops are allowed in the same turn, but captures are not compulsory, The player who captures all of their opponent's pieces wins.
(game "Koruboddo" (players 2) (equipment {(board (square 5)) (piece "Marker" 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 "Marker1" (union {(sites Row 0) (sites Row 1) (sites {"A3" "B3"})})) (place "Marker2" (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)))))
###Description 5x5 board. Twelve pieces per player, arranged in the two rows in front of each player, and in the right two squares in the central row (the central space is empty). Players alternate turns moving a piece to an adjacent orthogonal space. The player may capture an opponent's piece by hopping over it in an orthogonal direction. Multiple hops are allowed in the same turn, but captures are not compulsory, The player who captures all of their opponent's pieces wins. ###Ludii (game "Koruboddo" (players 2) (equipment {(board (square 5)) (piece "Marker" 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 "Marker1" (union {(sites Row 0) (sites Row 1) (sites {"A3" "B3"})})) (place "Marker2" (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)))))
Cross-shaped board, with any number of squares in the arm with a central square, and a number of pieces per player equal to the number of spaces in two arms. Three squares in each arm with six pieces per player is common. Players alternate turns placing pieces on the board. Players may not place pieces in the central space. When the pieces are placed, players alternate turns move a piece to am empty adjacent square, or hopping over an adjacent opponent's piece or an unbroken line of opponent's pieces with an empty space behind it. The player who captures all of the opponent's pieces wins. The game is played on a cross board of arm size of 3.
(game "Laram Wali" (players 2) (equipment {(board (merge (shift 0 (/ (- (* 3 3) 3) 2) (rectangle 3 (* 3 3))) (shift (/ (- (* 3 3) 3) 2) 0 (rectangle (* 3 3) 3))) use:Cell) (hand Each) (piece "Marker" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between (range 1 6) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start (place "Marker" "Hand" count:6)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (expand (sites Centre) steps:(- (/ 3 2) (if (is Even 3) 1 0))))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss)))))
###Description Cross-shaped board, with any number of squares in the arm with a central square, and a number of pieces per player equal to the number of spaces in two arms. Three squares in each arm with six pieces per player is common. Players alternate turns placing pieces on the board. Players may not place pieces in the central space. When the pieces are placed, players alternate turns move a piece to am empty adjacent square, or hopping over an adjacent opponent's piece or an unbroken line of opponent's pieces with an empty space behind it. The player who captures all of the opponent's pieces wins. The game is played on a cross board of arm size of 3. ###Ludii (game "Laram Wali" (players 2) (equipment {(board (merge (shift 0 (/ (- (* 3 3) 3) 2) (rectangle 3 (* 3 3))) (shift (/ (- (* 3 3) 3) 2) 0 (rectangle (* 3 3) 3))) use:Cell) (hand Each) (piece "Marker" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between (range 1 6) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start (place "Marker" "Hand" count:6)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (expand (sites Centre) steps:(- (/ 3 2) (if (is Even 3) 1 0))))))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss)))))
Played on a 8x8 board. Each player has two stones, who can jump over any other stone. Enemy stones jumped over are captured. First player unable to move loses.
(game "Leap Frog" (players 2) (equipment {(board (square 8)) (piece "Marker" Each (move Hop (between if:(is Occupied (between)) (apply (if (is Enemy (who at:(between))) (remove (between))))) (to if:(is Empty (to)))))}) (rules (start {(place "Marker1" {"B4" "C5" "C6" "D2" "D4" "D6" "E3" "E5" "E7" "F3" "F4" "G5"}) (place "Marker2" {"B5" "C3" "C4" "D3" "D5" "D7" "E2" "E4" "E6" "F5" "F6" "G4"})}) (play (forEach Piece)) (end (if (no Moves Next) (result Mover Win)))))
###Description Played on a 8x8 board. Each player has two stones, who can jump over any other stone. Enemy stones jumped over are captured. First player unable to move loses. ###Ludii (game "Leap Frog" (players 2) (equipment {(board (square 8)) (piece "Marker" Each (move Hop (between if:(is Occupied (between)) (apply (if (is Enemy (who at:(between))) (remove (between))))) (to if:(is Empty (to)))))}) (rules (start {(place "Marker1" {"B4" "C5" "C6" "D2" "D4" "D6" "E3" "E5" "E7" "F3" "F4" "G5"}) (place "Marker2" {"B5" "C3" "C4" "D3" "D5" "D7" "E2" "E4" "E6" "F5" "F6" "G4"})}) (play (forEach Piece)) (end (if (no Moves Next) (result Mover Win)))))
The king player receives one king piece and an army of 18. The mob player gets 26 pieces. Play is set on a star shape board. Captures are done by jumping adjacent enemy pieces and are compulsory but not multiple. Only the King can move to one of the star point cells (the blue cells). If no possible capture, a player moves a pawn to an adjacent empty cell. The mob wins if the king is captured and the king player wins by getting the king piece to any of the points of the star.
(game "Louis XVI" (players 2) (equipment {(board (remove (hex 7) cells:{0 1 2 4 5 6 7 8 9 12 13 14 15 16 22 23 57 45 70 34 58 82 46 71 69 81 56 44 68 92 55 80 120 121 122 124 125 126 112 113 114 117 118 119 103 104 110 111})) (piece "Pawn" Each) (piece "King" P2) (regions "GoalKing" (difference (sites Corners) (expand (sites Centre) steps:4)))}) (rules (start {(place "Pawn1" (difference (expand (sites Centre) steps:4) (expand (sites Centre) steps:3))) (place "Pawn2" (difference (expand (sites Centre) steps:2) (sites Centre))) (place "Pawn1" (difference (expand (sites Centre) steps:4) (expand (sites Centre) steps:3))) (place "King2" (sites Centre))}) (play (priority {(or (forEach Piece "Pawn" (move Hop (between if:(is Enemy (who at:(between)))) (to if:(and (not (is In (to) (sites "GoalKing"))) (is Empty (to))) (apply (remove (between)))))) (forEach Piece "King" (move Hop (between if:(is Enemy (who at:(between)))) (to if:(is Empty (to)))))) (or (forEach Piece "Pawn" (move Step (to if:(and (not (is In (to) (sites "GoalKing"))) (is Empty (to))) (apply (remove (between)))))) (forEach Piece "King" (move Step (to if:(is Empty (to))))))})) (end {(if (= (where "King" P2) -1) (result P1 Win)) (if (is Within (id "King2") in:(sites "GoalKing")) (result P2 Win))})))
###Description The king player receives one king piece and an army of 18. The mob player gets 26 pieces. Play is set on a star shape board. Captures are done by jumping adjacent enemy pieces and are compulsory but not multiple. Only the King can move to one of the star point cells (the blue cells). If no possible capture, a player moves a pawn to an adjacent empty cell. The mob wins if the king is captured and the king player wins by getting the king piece to any of the points of the star. ###Ludii (game "Louis XVI" (players 2) (equipment {(board (remove (hex 7) cells:{0 1 2 4 5 6 7 8 9 12 13 14 15 16 22 23 57 45 70 34 58 82 46 71 69 81 56 44 68 92 55 80 120 121 122 124 125 126 112 113 114 117 118 119 103 104 110 111})) (piece "Pawn" Each) (piece "King" P2) (regions "GoalKing" (difference (sites Corners) (expand (sites Centre) steps:4)))}) (rules (start {(place "Pawn1" (difference (expand (sites Centre) steps:4) (expand (sites Centre) steps:3))) (place "Pawn2" (difference (expand (sites Centre) steps:2) (sites Centre))) (place "Pawn1" (difference (expand (sites Centre) steps:4) (expand (sites Centre) steps:3))) (place "King2" (sites Centre))}) (play (priority {(or (forEach Piece "Pawn" (move Hop (between if:(is Enemy (who at:(between)))) (to if:(and (not (is In (to) (sites "GoalKing"))) (is Empty (to))) (apply (remove (between)))))) (forEach Piece "King" (move Hop (between if:(is Enemy (who at:(between)))) (to if:(is Empty (to)))))) (or (forEach Piece "Pawn" (move Step (to if:(and (not (is In (to) (sites "GoalKing"))) (is Empty (to))) (apply (remove (between)))))) (forEach Piece "King" (move Step (to if:(is Empty (to))))))})) (end {(if (= (where "King" P2) -1) (result P1 Win)) (if (is Within (id "King2") in:(sites "GoalKing")) (result P2 Win))})))
5x5 board. Twelve pieces per player. Players alternate turns placing two pieces on the board, leaving the central space empty. Once all the pieces have been placed, players alternate turns moving one space orthogonally to an empty space. An opponent's piece may be captured by hopping over it to an empty space immediately on the opposite side of it in an orthogonal direction. Multiple captures are allowed, and a player is allowed to land on a space already landed on during the chain of captures. Captures are not compulsory. A player wins when they capture all of their opponent's pieces or the opponent cannot move.
(game "Mraha wa Bwe" (players 2) (equipment {(board (square 5)) (piece "Counter" Each) (hand Each)}) (rules (start (place "Counter" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (sites Centre))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Play")) (phase "Play" (play (if (is Prev Mover) (or (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (or (forEach Piece "Counter" (move Hop (from (from)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "Counter" (move Step Orthogonal (to if:(is Empty (to)))))))))} (end (if (no Moves Mover) (result Mover Loss)))))
###Description 5x5 board. Twelve pieces per player. Players alternate turns placing two pieces on the board, leaving the central space empty. Once all the pieces have been placed, players alternate turns moving one space orthogonally to an empty space. An opponent's piece may be captured by hopping over it to an empty space immediately on the opposite side of it in an orthogonal direction. Multiple captures are allowed, and a player is allowed to land on a space already landed on during the chain of captures. Captures are not compulsory. A player wins when they capture all of their opponent's pieces or the opponent cannot move. ###Ludii (game "Mraha wa Bwe" (players 2) (equipment {(board (square 5)) (piece "Counter" Each) (hand Each)}) (rules (start (place "Counter" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Empty) (sites Centre))) (then (if (not (is Prev Mover)) (moveAgain))))) (nextPhase Mover (is Empty (handSite Mover)) "Play")) (phase "Play" (play (if (is Prev Mover) (or (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (or (forEach Piece "Counter" (move Hop (from (from)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain))))) (forEach Piece "Counter" (move Step Orthogonal (to if:(is Empty (to)))))))))} (end (if (no Moves Mover) (result Mover Loss)))))
5x5 board, the central square marked with an X. Twelve pieces per player. Pieces begin the game on the first two rows in front of the player, and in the two squares to the player's right in the central row. Players alternate turns moving a piece orthogonally to an adjacent empty space. Players may capture an opponent's piece by hopping over it. The player who captures all of the opponent's pieces wins.
(game "Natt Klab ash-Shawk" (players 2) (equipment {(board (square 5)) (piece "Marker" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "Marker1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "Marker2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss)))))
###Description 5x5 board, the central square marked with an X. Twelve pieces per player. Pieces begin the game on the first two rows in front of the player, and in the two squares to the player's right in the central row. Players alternate turns moving a piece orthogonally to an adjacent empty space. Players may capture an opponent's piece by hopping over it. The player who captures all of the opponent's pieces wins. ###Ludii (game "Natt Klab ash-Shawk" (players 2) (equipment {(board (square 5)) (piece "Marker" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "Marker1" (union {(expand (sites Bottom)) (sites {"D3" "E3"})})) (place "Marker2" (union {(sites {"A3" "B3"}) (expand (sites Top))}))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss)))))
Men can move one step forwards orthogonally or diagonally, or can jump an opponent's adjacent piece to capture it, in any direction. When a man ends its turn on the opposite edge of the board from its starting position, it becomes a king and may move or jump over any number of spaces in any direction. Captures are compulsory and the maximum number of jumps must be made. The first player unable to move, loses. The game is played on a 8x8 board
(game "Omnidirectional Draughts" (players 2) (equipment {(board (square 8)) (piece "Counter" P1 N) (piece "Counter" P2 S) (piece "DoubleCounter" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "Counter1" (expand (sites Bottom) steps:(- (/ 8 2) 2))) (place "Counter2" (expand (sites Top) steps:(- (/ 8 2) 2)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "Counter" Mover)) (max Moves (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "DoubleCounter") Mover)))))) (max Moves (move Hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "Counter" (move Hop (from (from)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "DoubleCounter") Mover)))))) (forEach Piece "DoubleCounter" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "Counter" (move Step (directions Forwards) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "DoubleCounter") Mover)))) (forEach Piece "DoubleCounter" (move Slide)))}))) (end (if (no Moves Next) (result Mover Win)))))
###Description Men can move one step forwards orthogonally or diagonally, or can jump an opponent's adjacent piece to capture it, in any direction. When a man ends its turn on the opposite edge of the board from its starting position, it becomes a king and may move or jump over any number of spaces in any direction. Captures are compulsory and the maximum number of jumps must be made. The first player unable to move, loses. The game is played on a 8x8 board ###Ludii (game "Omnidirectional Draughts" (players 2) (equipment {(board (square 8)) (piece "Counter" P1 N) (piece "Counter" P2 S) (piece "DoubleCounter" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "Counter1" (expand (sites Bottom) steps:(- (/ 8 2) 2))) (place "Counter2" (expand (sites Top) steps:(- (/ 8 2) 2)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "Counter" Mover)) (max Moves (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "DoubleCounter") Mover)))))) (max Moves (move Hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or (forEach Piece "Counter" (move Hop (from (from)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) All (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))))) (moveAgain) (if (is In (last To) (sites Next)) (promote (last To) (piece "DoubleCounter") Mover)))))) (forEach Piece "DoubleCounter" (move Hop (between before:(count Rows) after:(count Rows) if:(is Enemy (who at:(between))) (apply (remove (between) at:EndOfTurn))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between before:(count Rows) after:(count Rows) if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain))))))) (or (forEach Piece "Counter" (move Step (directions Forwards) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "DoubleCounter") Mover)))) (forEach Piece "DoubleCounter" (move Slide)))}))) (end (if (no Moves Next) (result Mover Win)))))
Played on a board with two rows of five spaces forming an "X," with an extra space diagonally adjacent to the central space. Ten sticks per player. Each player begins with one stick in each of the rightmost four spaces on the edge of the board closest to them. Players alternate turns moving a stick to an adjacent space. A player may capture one of the opponent's sticks by jumping over it to an empty space beyond it. The opponent replaces the captured stick with one of those remaining in their reserve, until there are no sticks remaining. The player who captures all of the opponent's sticks wins.
(game "Queah Game" (players 2) (equipment {(board (rotate 45 (merge (shift 1 -1 (rectangle 5 1)) (merge (shift -1 1 (rectangle 1 5)) (square 3))))) (piece "Stick" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (hand Each)}) (rules (start {(place "Stick1" {"A1" "B2" "A3" "B4"}) (place "Stick2" {"E5" "D4" "E3" "D2"}) (place "Stick" "Hand" count:6)}) (play (if (and (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (< (count Sites in:(sites Occupied by:Mover container:"Board")) 4)) (move (from (handSite Mover)) (to (sites Empty)) (then (moveAgain))) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss)))))
###Description Played on a board with two rows of five spaces forming an "X," with an extra space diagonally adjacent to the central space. Ten sticks per player. Each player begins with one stick in each of the rightmost four spaces on the edge of the board closest to them. Players alternate turns moving a stick to an adjacent space. A player may capture one of the opponent's sticks by jumping over it to an empty space beyond it. The opponent replaces the captured stick with one of those remaining in their reserve, until there are no sticks remaining. The player who captures all of the opponent's sticks wins. ###Ludii (game "Queah Game" (players 2) (equipment {(board (rotate 45 (merge (shift 1 -1 (rectangle 5 1)) (merge (shift -1 1 (rectangle 1 5)) (square 3))))) (piece "Stick" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to)))))) (hand Each)}) (rules (start {(place "Stick1" {"A1" "B2" "A3" "B4"}) (place "Stick2" {"E5" "D4" "E3" "D2"}) (place "Stick" "Hand" count:6)}) (play (if (and (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (< (count Sites in:(sites Occupied by:Mover container:"Board")) 4)) (move (from (handSite Mover)) (to (sites Empty)) (then (moveAgain))) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss)))))
Overview: In Seesaw the players (North and South) command opposing armies with soldiers that can promote. Your army starts out as a single soldier and your promotion area evolves as you deploy more soldiers. Every time a soldier promotes it grows - first into a 2-stack, then a 3-stack, and so on. The central idea of Seesaw is the 2-fold significance of stack-size: (i) Odd-sized stacks move forwards and even-sized stacks move backwards, and (ii) on any given turn, a stack can take as many steps as it likes from 1 up to its size. This results in soldiers seesawing up and down the board as their strength increases to the point where the game is forced to conclude in one side completely eliminating the other. How to play: On your turn, you must either make a stack-move, or place a new stack. 1. Placing a new stack: A newly placed stack will always be of size 1. You may only place a stack on an empty cell next to a cell of your color. These cells are promotion cells, and each cell you place a new stack on automatically turns into a promotion cell of your color. 2. Stackmoves: You only ever move one stack per turn, but that stack may be able to move several steps or capture several enemiy stacks, depending on its size. The number of steps a stack may take is the number of pieces in it, i.e. its size. 2.1 Noncapturing moves: On turns where you do not have to capture an enemy (see below) all the steps a stack takes is either constrained to the 3 upward directions or to the 3 downward directions, depending on the size and the owner of the stack. South's forward directions are the 3 upward directions, and North's forward directions are the 3 downward directions. 2.2 Capturing moves: If one or more of your stacks can reach an enemy by lifting the restraint on direction, you must capture such a reachable enemy by replacement. If that stack did not spend all its steps reaching the captured enemy, you can, before you end your turn, spend the left-over steps by making a noncapturing move. However, if yet an enemy is in range immediately after you have captured (counting only the steps left over), you must capture again. 3. Promoting: Your odd-sized stacks promote when they end up on a promotion cell belonging to your opponent at the end of your turn. Your even-sized stacks promote when they end up on a promotion cell belonging to you at the end of your turn. The object of Seesaw is to capture all your opponent's soldiers. More precisely: If, at the end of your turn, your opponent has no stacks on the board, you have won the game. A base 4 board is currently selected
(game "Seesaw" (players {(player N) (player S)}) (equipment {(board (rotate 30 (hex 4))) (piece "Disc" Each) (tile "Hex" Each)}) (rules (start {(place Stack "Hex1" 0) (place Stack "Disc1" 0) (place Stack "Hex2" (* 4 (* 3 (- 4 1)))) (place Stack "Disc2" (* 4 (* 3 (- 4 1))))}) (play (if (can Move (forEach Piece "Disc" (do (if (= 0 (count MovesThisTurn)) (set Var (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))) next:(move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (if (> (var) 1) (intersection (sites Around (intersection (sites Distance (step (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (- (var) 1))) (sites Around (sites Occupied by:Enemy component:"Disc")))) (sites Occupied by:Enemy component:"Disc")) (intersection (sites Around (from)) (sites Occupied by:Enemy component:"Disc"))) (apply (remove (to) count:(count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) count:(count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) stack:True)) top:True)) (forEach Piece "Disc" (do (if (= 0 (count MovesThisTurn)) (set Var (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))) next:(move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (if (> (var) 1) (intersection (sites Around (intersection (sites Distance (step (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (- (var) 1))) (sites Around (sites Occupied by:Enemy component:"Disc")))) (sites Occupied by:Enemy component:"Disc")) (intersection (sites Around (from)) (sites Occupied by:Enemy component:"Disc"))) (apply (remove (to) count:(count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) count:(count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) stack:True)) top:True (then (set Var (- (var) (count Steps (step (to if:(or (= (last To) (to)) (= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))))) (last From) (last To))) (then (if (< 0 (var)) (moveAgain) (if (= (+ (* 1 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)) (% (mover) (- 3 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)))) (* (who at:(last To) level:0) (count Stack at:(last To) if:(or (= (id "Hex" Next) (what at:(to) level:(level))) (= (id "Hex" Mover) (what at:(to) level:(level))))))) (add (piece (id "Disc" Mover)) (to (last To)) stack:True))))))) (if (< 0 (count MovesThisTurn)) (or (forEach Piece "Disc" (do (if (= 0 (count MovesThisTurn)) (set Var (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))) next:(move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (if (is Odd (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))) (sites Distance (step Forwards (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (var))) (sites Distance (step Backwards (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (var))))) count:(count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) stack:True)) top:True) (move Pass) (then (if (= (+ (* 1 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)) (% (mover) (- 3 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)))) (* (who at:(last To) level:0) (count Stack at:(last To) if:(or (= (id "Hex" Next) (what at:(to) level:(level))) (= (id "Hex" Mover) (what at:(to) level:(level))))))) (add (piece (id "Disc" Mover)) (to (last To)) stack:True)))) (or (forEach Piece "Disc" (do (if (= 0 (count MovesThisTurn)) (set Var (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))) next:(move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (if (is Odd (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))) (sites Distance (step Forwards (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (var))) (sites Distance (step Backwards (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (var))))) count:(count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) stack:True)) top:True (then (if (= (+ (* 1 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)) (% (mover) (- 3 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)))) (* (who at:(last To) level:0) (count Stack at:(last To) if:(or (= (id "Hex" Next) (what at:(to) level:(level))) (= (id "Hex" Mover) (what at:(to) level:(level))))))) (add (piece (id "Disc" Mover)) (to (last To)) stack:True)))) (move Add (piece (id "Hex" Mover)) (to (sites Around (sites Occupied by:Mover component:"Hex" top:False)) if:(is Empty (to))) (then (add (piece (id "Disc" Mover)) (to (last To)) stack:True))))))) (end (if (= 0 (count Sites in:(sites Occupied by:Next component:"Disc"))) (result Next Loss)))))
###Description Overview: In Seesaw the players (North and South) command opposing armies with soldiers that can promote. Your army starts out as a single soldier and your promotion area evolves as you deploy more soldiers. Every time a soldier promotes it grows - first into a 2-stack, then a 3-stack, and so on. The central idea of Seesaw is the 2-fold significance of stack-size: (i) Odd-sized stacks move forwards and even-sized stacks move backwards, and (ii) on any given turn, a stack can take as many steps as it likes from 1 up to its size. This results in soldiers seesawing up and down the board as their strength increases to the point where the game is forced to conclude in one side completely eliminating the other. How to play: On your turn, you must either make a stack-move, or place a new stack. 1. Placing a new stack: A newly placed stack will always be of size 1. You may only place a stack on an empty cell next to a cell of your color. These cells are promotion cells, and each cell you place a new stack on automatically turns into a promotion cell of your color. 2. Stackmoves: You only ever move one stack per turn, but that stack may be able to move several steps or capture several enemiy stacks, depending on its size. The number of steps a stack may take is the number of pieces in it, i.e. its size. 2.1 Noncapturing moves: On turns where you do not have to capture an enemy (see below) all the steps a stack takes is either constrained to the 3 upward directions or to the 3 downward directions, depending on the size and the owner of the stack. South's forward directions are the 3 upward directions, and North's forward directions are the 3 downward directions. 2.2 Capturing moves: If one or more of your stacks can reach an enemy by lifting the restraint on direction, you must capture such a reachable enemy by replacement. If that stack did not spend all its steps reaching the captured enemy, you can, before you end your turn, spend the left-over steps by making a noncapturing move. However, if yet an enemy is in range immediately after you have captured (counting only the steps left over), you must capture again. 3. Promoting: Your odd-sized stacks promote when they end up on a promotion cell belonging to your opponent at the end of your turn. Your even-sized stacks promote when they end up on a promotion cell belonging to you at the end of your turn. The object of Seesaw is to capture all your opponent's soldiers. More precisely: If, at the end of your turn, your opponent has no stacks on the board, you have won the game. A base 4 board is currently selected ###Ludii (game "Seesaw" (players {(player N) (player S)}) (equipment {(board (rotate 30 (hex 4))) (piece "Disc" Each) (tile "Hex" Each)}) (rules (start {(place Stack "Hex1" 0) (place Stack "Disc1" 0) (place Stack "Hex2" (* 4 (* 3 (- 4 1)))) (place Stack "Disc2" (* 4 (* 3 (- 4 1))))}) (play (if (can Move (forEach Piece "Disc" (do (if (= 0 (count MovesThisTurn)) (set Var (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))) next:(move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (if (> (var) 1) (intersection (sites Around (intersection (sites Distance (step (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (- (var) 1))) (sites Around (sites Occupied by:Enemy component:"Disc")))) (sites Occupied by:Enemy component:"Disc")) (intersection (sites Around (from)) (sites Occupied by:Enemy component:"Disc"))) (apply (remove (to) count:(count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) count:(count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) stack:True)) top:True)) (forEach Piece "Disc" (do (if (= 0 (count MovesThisTurn)) (set Var (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))) next:(move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (if (> (var) 1) (intersection (sites Around (intersection (sites Distance (step (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (- (var) 1))) (sites Around (sites Occupied by:Enemy component:"Disc")))) (sites Occupied by:Enemy component:"Disc")) (intersection (sites Around (from)) (sites Occupied by:Enemy component:"Disc"))) (apply (remove (to) count:(count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) count:(count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) stack:True)) top:True (then (set Var (- (var) (count Steps (step (to if:(or (= (last To) (to)) (= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))))) (last From) (last To))) (then (if (< 0 (var)) (moveAgain) (if (= (+ (* 1 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)) (% (mover) (- 3 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)))) (* (who at:(last To) level:0) (count Stack at:(last To) if:(or (= (id "Hex" Next) (what at:(to) level:(level))) (= (id "Hex" Mover) (what at:(to) level:(level))))))) (add (piece (id "Disc" Mover)) (to (last To)) stack:True))))))) (if (< 0 (count MovesThisTurn)) (or (forEach Piece "Disc" (do (if (= 0 (count MovesThisTurn)) (set Var (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))) next:(move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (if (is Odd (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))) (sites Distance (step Forwards (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (var))) (sites Distance (step Backwards (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (var))))) count:(count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) stack:True)) top:True) (move Pass) (then (if (= (+ (* 1 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)) (% (mover) (- 3 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)))) (* (who at:(last To) level:0) (count Stack at:(last To) if:(or (= (id "Hex" Next) (what at:(to) level:(level))) (= (id "Hex" Mover) (what at:(to) level:(level))))))) (add (piece (id "Disc" Mover)) (to (last To)) stack:True)))) (or (forEach Piece "Disc" (do (if (= 0 (count MovesThisTurn)) (set Var (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))))) next:(move (from if:(= (* (from) (if (< 0 (count MovesThisTurn)) 1 0)) (* (last To) (if (< 0 (count MovesThisTurn)) 1 0)))) (to (if (is Odd (count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))) (sites Distance (step Forwards (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (var))) (sites Distance (step Backwards (to if:(= 0 (count Stack at:(to) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover))))))) from:(from) (range 1 (var))))) count:(count Stack at:(from) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) stack:True)) top:True (then (if (= (+ (* 1 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)) (% (mover) (- 3 (% (count Stack at:(last To) if:(or (= (what at:(to) level:(level)) (id "Disc" Next)) (= (what at:(to) level:(level)) (id "Disc" Mover)))) 2)))) (* (who at:(last To) level:0) (count Stack at:(last To) if:(or (= (id "Hex" Next) (what at:(to) level:(level))) (= (id "Hex" Mover) (what at:(to) level:(level))))))) (add (piece (id "Disc" Mover)) (to (last To)) stack:True)))) (move Add (piece (id "Hex" Mover)) (to (sites Around (sites Occupied by:Mover component:"Hex" top:False)) if:(is Empty (to))) (then (add (piece (id "Disc" Mover)) (to (last To)) stack:True))))))) (end (if (= 0 (count Sites in:(sites Occupied by:Next component:"Disc"))) (result Next Loss)))))
5x5 board. Twenty pieces per player. Players alternate turns placing pieces on the board, two at a time into the same square. At any time, a player may move one piece from a square one spot in an orthogonal direction. Pieces may capture opponent's pieces when either a single square or an unbroken line of squares with opponent's pieces has an empty space beyond it; the player's piece hops over the opponent's pieces and captures them all. When the unbroken line ends at the edge of the board, it is treated as though there were an empty square beyond the edge of the board, and the capturing piece is placed on the last space on the board in that line. Players may enter any reserved pieces on any turn as they see fit. The player to capture all of the opponent's pieces wins.
(game "T'oki" (players 2) (equipment {(board (square 5)) (piece "Marker" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between (range 1 (count Rows)) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(or (and (is In (to) (sites Outer)) (is Enemy (who at:(to)))) (is Empty (to))))))) (hand Each)}) (rules (start (place "Marker" "Hand" count:20)) (play (or (move (from (handSite Mover)) (to (sites Empty)) count:2) (forEach Piece))) (end (if (and (all Sites (sites Hand Next) if:(= 0 (count Cell at:(site)))) (no Pieces Next)) (result Mover Win)))))
###Description 5x5 board. Twenty pieces per player. Players alternate turns placing pieces on the board, two at a time into the same square. At any time, a player may move one piece from a square one spot in an orthogonal direction. Pieces may capture opponent's pieces when either a single square or an unbroken line of squares with opponent's pieces has an empty space beyond it; the player's piece hops over the opponent's pieces and captures them all. When the unbroken line ends at the edge of the board, it is treated as though there were an empty square beyond the edge of the board, and the capturing piece is placed on the last space on the board in that line. Players may enter any reserved pieces on any turn as they see fit. The player to capture all of the opponent's pieces wins. ###Ludii (game "T'oki" (players 2) (equipment {(board (square 5)) (piece "Marker" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop Orthogonal (between (range 1 (count Rows)) if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(or (and (is In (to) (sites Outer)) (is Enemy (who at:(to)))) (is Empty (to))))))) (hand Each)}) (rules (start (place "Marker" "Hand" count:20)) (play (or (move (from (handSite Mover)) (to (sites Empty)) count:2) (forEach Piece))) (end (if (and (all Sites (sites Hand Next) if:(= 0 (count Cell at:(site)))) (no Pieces Next)) (result Mover Win)))))
7x7 lines, forming a grid. 21 pieces per player. The pieces begin on the three rows closest to the player. Pieces move forward orthogonally or sideways, never backwards. A piece may capture an adjacent opponent's piece by hopping over it to an empty adjacent spot immediately on the opposite side of it along the lines of the board. Multiple captures are allowed. Captures can only be made in the forward orthogonal or sideways directions also. The player who captures all of their opponent's pieces or who blocks them from being able to move wins.
(game "Tablo" (players {(player N) (player S)}) (equipment {(board (square 7) use:Vertex) (piece "Marker" Each (or {(move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (move Hop (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (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))))}))}) (rules (start {(place "Marker1" (expand (sites Bottom) steps:2)) (place "Marker2" (expand (sites Top) steps:2))}) (play (if (is Prev Mover) (and (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)))) (move Pass)) (forEach Piece))) (end (if (no Moves Next) (result Mover Win)))))
###Description 7x7 lines, forming a grid. 21 pieces per player. The pieces begin on the three rows closest to the player. Pieces move forward orthogonally or sideways, never backwards. A piece may capture an adjacent opponent's piece by hopping over it to an empty adjacent spot immediately on the opposite side of it along the lines of the board. Multiple captures are allowed. Captures can only be made in the forward orthogonal or sideways directions also. The player who captures all of their opponent's pieces or who blocks them from being able to move wins. ###Ludii (game "Tablo" (players {(player N) (player S)}) (equipment {(board (square 7) use:Vertex) (piece "Marker" Each (or {(move Step (directions {Forward Rightward Leftward}) (to if:(is Empty (to)))) (move Hop (directions {Forward Rightward Leftward}) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (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))))}))}) (rules (start {(place "Marker1" (expand (sites Bottom) steps:2)) (place "Marker2" (expand (sites Top) steps:2))}) (play (if (is Prev Mover) (and (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)))) (move Pass)) (forEach Piece))) (end (if (no Moves Next) (result Mover Win)))))
8x8 checkered board, with a black space on the bottom left corner. Sixteen pieces per player. Pieces begin on the second and third rows. Pieces move orthogonally or diagonally forwards or sideways. Pieces may capture only in an orthogonal direction, but not backwards, by hopping over an adjacent piece belonging to the opponent to an empty space on the opposite adjacent side of the opponent's piece. Multiple captures are allowed, and the maximum number of possible captures must be taken. When a piece lands on the last row opposite from the one where they began the game, it is promoted and may move in any direction and capture in any orthogonal direction. A piece may be promoted in the middle of its turn if further captures are possible. The player who captures all of the opponent's pieces wins. The rules come from Schmidt.
(game "Tama" (players 2) (equipment {(board (square 8)) (piece "Counter" P1 N) (piece "Counter" P2 S) (piece "DoubleCounter" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "Counter1" (union (sites Row 1) (sites Row 2))) (place "Counter2" (union (sites Row 5) (sites Row 6)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "Counter" 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 "DoubleCounter") Mover)))))) (max Moves (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or {(forEach Piece "Counter" (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 "DoubleCounter") Mover)))))) (forEach Piece "DoubleCounter" (move Hop (from) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))})) (or (forEach Piece "Counter" (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "DoubleCounter") Mover)))) (forEach Piece "DoubleCounter" (move Step (to if:(is Empty (to))))))}))) (end (if (no Pieces Next) (result Next Loss)))))
###Description 8x8 checkered board, with a black space on the bottom left corner. Sixteen pieces per player. Pieces begin on the second and third rows. Pieces move orthogonally or diagonally forwards or sideways. Pieces may capture only in an orthogonal direction, but not backwards, by hopping over an adjacent piece belonging to the opponent to an empty space on the opposite adjacent side of the opponent's piece. Multiple captures are allowed, and the maximum number of possible captures must be taken. When a piece lands on the last row opposite from the one where they began the game, it is promoted and may move in any direction and capture in any orthogonal direction. A piece may be promoted in the middle of its turn if further captures are possible. The player who captures all of the opponent's pieces wins. The rules come from Schmidt. ###Ludii (game "Tama" (players 2) (equipment {(board (square 8)) (piece "Counter" P1 N) (piece "Counter" P2 S) (piece "DoubleCounter" Each) (regions P1 (sites Bottom)) (regions P2 (sites Top))}) (rules (start {(place "Counter1" (union (sites Row 1) (sites Row 2))) (place "Counter2" (union (sites Row 5) (sites Row 6)))}) (play (if (is Prev Mover) (if (= (what at:(last To)) (id "Counter" 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 "DoubleCounter") Mover)))))) (max Moves (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) (difference Orthogonal OppositeDirection) (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))) (priority {(max Moves (or {(forEach Piece "Counter" (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 "DoubleCounter") Mover)))))) (forEach Piece "DoubleCounter" (move Hop (from) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (move Hop (from (last To)) Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))) (moveAgain)))))})) (or (forEach Piece "Counter" (move Step (directions {Forwards Rightward Leftward}) (to if:(is Empty (to)))) (then (if (is In (last To) (sites Next)) (promote (last To) (piece "DoubleCounter") Mover)))) (forEach Piece "DoubleCounter" (move Step (to if:(is Empty (to))))))}))) (end (if (no Pieces Next) (result Next Loss)))))
5x5 board. Twelve pieces per player. Players alternate turns placing a piece on the board, leaving the central space empty. Once all of the pieces have been placed, players alternate turns moving a piece to an empty adjacent space in an orthogonal or diagonal direction. A player may capture an opponent's piece adjacent to one of their own by hopping over it to an empty space immediately on the opposite side of the opponent's piece. Multiple captures are allowed. The player who captures all of their opponent's pieces wins.
(game "Tides" (players 2) (equipment {(board (square 5)) (piece "Marker" 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)))))) (hand Each)}) (rules (start (place "Marker" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Board) (centrePoint)) if:(is Empty (to))))) (nextPhase Mover (is Empty (handSite Mover)) "Move")) (phase "Move" (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))}))
###Description 5x5 board. Twelve pieces per player. Players alternate turns placing a piece on the board, leaving the central space empty. Once all of the pieces have been placed, players alternate turns moving a piece to an empty adjacent space in an orthogonal or diagonal direction. A player may capture an opponent's piece adjacent to one of their own by hopping over it to an empty space immediately on the opposite side of the opponent's piece. Multiple captures are allowed. The player who captures all of their opponent's pieces wins. ###Ludii (game "Tides" (players 2) (equipment {(board (square 5)) (piece "Marker" 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)))))) (hand Each)}) (rules (start (place "Marker" "Hand" count:12)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (difference (sites Board) (centrePoint)) if:(is Empty (to))))) (nextPhase Mover (is Empty (handSite Mover)) "Move")) (phase "Move" (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss))))}))
3x3 crossed lines, pieces move on the intersections and along the lines. Three pieces per player. In the placement phase, players alternate turns placing one of their pieces on an empty spot. When all of the pieces are placed, Players attempt to capture their opponent's pieces by hopping over them. The player who captures all of the opponent's pieces wins.
(game "Tre Guti" (players 2) (equipment {(board (square 3) use:Vertex) (hand Each) (piece "Marker" Each (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start (place "Marker" "Hand" count:3)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss)))))
###Description 3x3 crossed lines, pieces move on the intersections and along the lines. Three pieces per player. In the placement phase, players alternate turns placing one of their pieces on an empty spot. When all of the pieces are placed, Players attempt to capture their opponent's pieces by hopping over them. The player who captures all of the opponent's pieces wins. ###Ludii (game "Tre Guti" (players 2) (equipment {(board (square 3) use:Vertex) (hand Each) (piece "Marker" Each (or (move Step (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start (place "Marker" "Hand" count:3)) phases:{(phase "Placement" (play (move (from (handSite Mover)) (to (sites Empty)))) (nextPhase (all Sites (sites Hand P2) if:(= 0 (count Cell at:(site)))) "Movement")) (phase "Movement" (play (forEach Piece)))} (end (if (no Pieces Next) (result Next Loss)))))
3x5 intersecting lines. Six pieces per player, arranged on the two short rows on opposite sides of the board. Players alternate turns moving a piece to an empty adjacent spot. Pieces move orthogonally in a horizontal or forward direction only. To capture, a piece may jump over an adjacent opponent's piece to an empty spot immediately on the opposite side of the piece along the lines of the board. Pieces may capture in a backwards direction. The player who captures all of the opponent's pieces wins.
(game "Xarajlt" (players {(player N) (player S)}) (equipment {(board (rectangle 5 3) use:Vertex) (piece "Marker" Each (or (move Step (directions {Forward FR FL}) (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "Marker1" (expand (sites Bottom))) (place "Marker2" (expand (sites Top)))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss)))))
###Description 3x5 intersecting lines. Six pieces per player, arranged on the two short rows on opposite sides of the board. Players alternate turns moving a piece to an empty adjacent spot. Pieces move orthogonally in a horizontal or forward direction only. To capture, a piece may jump over an adjacent opponent's piece to an empty spot immediately on the opposite side of the piece along the lines of the board. Pieces may capture in a backwards direction. The player who captures all of the opponent's pieces wins. ###Ludii (game "Xarajlt" (players {(player N) (player S)}) (equipment {(board (rectangle 5 3) use:Vertex) (piece "Marker" Each (or (move Step (directions {Forward FR FL}) (to if:(is Empty (to)))) (move Hop Orthogonal (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))))))}) (rules (start {(place "Marker1" (expand (sites Bottom))) (place "Marker2" (expand (sites Top)))}) (play (forEach Piece)) (end (if (no Pieces Next) (result Next Loss)))))
5x5 board. Twelve pieces per player. Players alternate turns placing a piece on the board or moving a piece already on the board. Pieces move one space in any orthogonal direction. A player may capture an opponent's piece by hopping over it to an empty space on the other side of it. When a capture is made in this fashion, the player chooses another piece belonging to the opponent to capture in addition. The player who captures all of the opponent's pieces wins.
(game "Yote" (players 2) (equipment {(board (square 5)) (piece "Marker" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (moveAgain))))) (hand Each)}) (rules (start (place "Marker" "Hand" count:12)) (play (if (is Prev Mover) (move Remove (sites Occupied by:Next container:"Board")) (or (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (sites Empty)))) (forEach Piece)))) (end (if (no Pieces Next) (result Next Loss)))))
###Description 5x5 board. Twelve pieces per player. Players alternate turns placing a piece on the board or moving a piece already on the board. Pieces move one space in any orthogonal direction. A player may capture an opponent's piece by hopping over it to an empty space on the other side of it. When a capture is made in this fashion, the player chooses another piece belonging to the opponent to capture in addition. The player who captures all of the opponent's pieces wins. ###Ludii (game "Yote" (players 2) (equipment {(board (square 5)) (piece "Marker" Each (or (move Step Orthogonal (to if:(is Empty (to)))) (move Hop (between if:(is Enemy (who at:(between))) (apply (remove (between)))) (to if:(is Empty (to))) (then (moveAgain))))) (hand Each)}) (rules (start (place "Marker" "Hand" count:12)) (play (if (is Prev Mover) (move Remove (sites Occupied by:Next container:"Board")) (or (if (not (all Sites (sites Hand Mover) if:(= 0 (count Cell at:(site))))) (move (from (handSite Mover)) (to (sites Empty)))) (forEach Piece)))) (end (if (no Pieces Next) (result Next Loss)))))
5x5 board. Twelve pieces per player. Pieces begin in the rows closest to the player, and the two spaces to the right of the central space. Players alternate turns moving a piece orthogonally any distance. A player may capture an opponent's adjacent piece by hopping over it in an orthogonal direction to an empty space immediately on the opposite side of the opponent's piece. Multiple captures are allowed. The player who captures all of the opponent's pieces wins.
(game "Zuz Mel (5x5)" (players 2) (equipment {(board (square 5)) (piece "Marker" 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 Slide Orthogonal)))}) (rules (start {(place "Marker1" (union (expand (sites Bottom)) (sites {"D3" "E3"}))) (place "Marker2" (union (expand (sites Top)) (sites {"A3" "B3"})))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss)))))
###Description 5x5 board. Twelve pieces per player. Pieces begin in the rows closest to the player, and the two spaces to the right of the central space. Players alternate turns moving a piece orthogonally any distance. A player may capture an opponent's adjacent piece by hopping over it in an orthogonal direction to an empty space immediately on the opposite side of the opponent's piece. Multiple captures are allowed. The player who captures all of the opponent's pieces wins. ###Ludii (game "Zuz Mel (5x5)" (players 2) (equipment {(board (square 5)) (piece "Marker" 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 Slide Orthogonal)))}) (rules (start {(place "Marker1" (union (expand (sites Bottom)) (sites {"D3" "E3"}))) (place "Marker2" (union (expand (sites Top)) (sites {"A3" "B3"})))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss)))))
7x7 board. 24 pieces per player. Pieces begin in the rows closest to the player, and the three spaces to the right of the central space. Players alternate turns moving a piece orthogonally any distance. A player may capture an opponent's adjacent piece by hopping over it in an orthogonal direction to an empty space immediately on the opposite side of the opponent's piece. Multiple captures are allowed. The player who captures all of the opponent's pieces wins.
(game "Zuz Mel (7x7)" (players 2) (equipment {(board (square 7)) (piece "Marker" 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 Slide Orthogonal)))}) (rules (start {(place "Marker1" (union (expand (sites Bottom) steps:2) (sites {"F4" "G4" "E4"}))) (place "Marker2" (union (expand (sites Top) steps:2) (sites {"A4" "B4" "C4"})))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss)))))
###Description 7x7 board. 24 pieces per player. Pieces begin in the rows closest to the player, and the three spaces to the right of the central space. Players alternate turns moving a piece orthogonally any distance. A player may capture an opponent's adjacent piece by hopping over it in an orthogonal direction to an empty space immediately on the opposite side of the opponent's piece. Multiple captures are allowed. The player who captures all of the opponent's pieces wins. ###Ludii (game "Zuz Mel (7x7)" (players 2) (equipment {(board (square 7)) (piece "Marker" 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 Slide Orthogonal)))}) (rules (start {(place "Marker1" (union (expand (sites Bottom) steps:2) (sites {"F4" "G4" "E4"}))) (place "Marker2" (union (expand (sites Top) steps:2) (sites {"A4" "B4" "C4"})))}) (play (if (is Prev Mover) (or (move Hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between)))) (apply (remove (between)))) (to if:(is Empty (to))) (then (if (can Move (hop (from (last To)) (between if:(and (not (is In (between) (sites ToClear))) (is Enemy (who at:(between))))) (to if:(is Empty (to))))) (moveAgain)))) (move Pass)) (forEach Piece))) (end (if (no Pieces Next) (result Next Loss)))))
Played on an 8x8 board with pieces with specialized moves: Pawns (8): can move one space orthogonally forward, or two steps orthogonally forward only if it is the first move of any of that player's pawns, capture one space diagonally forward; Rooks (2): can move any number of spaces orthogonally; Bishops (2): can move any number of spaces diagonally; Knight (2): moves in any direction, one space orthogonally with one space forward diagonally; Queens (1): can move any number of spaces orthogonally or diagonally; Kings (1): can move one space orthogonally or diagonally. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a King can be captured on the next turn by an opponent's piece, it is in check. The King must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. When a player is reduced to a King without any other pieces, the game is a draw.
(game "Chandaraki" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))})) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (= 1 (count Pieces Next)) (result Mover Draw))})))
###Description Played on an 8x8 board with pieces with specialized moves: Pawns (8): can move one space orthogonally forward, or two steps orthogonally forward only if it is the first move of any of that player's pawns, capture one space diagonally forward; Rooks (2): can move any number of spaces orthogonally; Bishops (2): can move any number of spaces diagonally; Knight (2): moves in any direction, one space orthogonally with one space forward diagonally; Queens (1): can move any number of spaces orthogonally or diagonally; Kings (1): can move one space orthogonally or diagonally. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a King can be captured on the next turn by an opponent's piece, it is in check. The King must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. When a player is reduced to a King without any other pieces, the game is a draw. ###Ludii (game "Chandaraki" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))})) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (= 1 (count Pieces Next)) (result Mover Draw))})))
Four players, playing on teams of two. 1 x Shah (king): moves one space orthogonally or diagonally. 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): any distance diagonally; 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. The pieces of one team are arranged with Shahs on the two central squares of the outer rows, then the Pils, ASbs, and Rukhs, with the Sarbaz in the row in front of them. When a piece moves onto a space occupied by an opponent's piece, the opponent's piece is captured. When a Shah can be captured on the next turn, it is in check, and cannot remain in check at the end of that player's turn. When this is not possible, it is checkmate, and that player is out of the game. A team wins by checkmating both opposing Kings, or by capturing all of the opponents' pieces aside from the Kings. If all four Kings are the only remaining pieces, the game is a draw.
(game "Chatrang" (players {(player N) (player S) (player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))})) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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)))))))}) (rules (start {(place "Pawn1" (intersection (expand (sites Left) steps:3) (sites Row 1))) (place "Pawn2" (intersection (expand (sites Right) steps:3) (sites Row 6))) (place "Pawn3" (intersection (expand (sites Right) steps:3) (sites Row 1))) (place "Pawn4" (intersection (expand (sites Left) steps:3) (sites Row 6))) (place "Rook1" {"A1"}) (place "Knight1" {"B1"}) (place "Elephant1" {"C1"}) (place "King_noCross1" coord:"D1") (place "Rook3" {"H1"}) (place "Knight3" {"G1"}) (place "Elephant3" {"F1"}) (place "King_noCross3" coord:"E1") (place "Rook2" {"H8"}) (place "Knight2" {"G8"}) (place "Elephant2" {"F8"}) (place "King_noCross2" coord:"E8") (place "Rook4" {"A8"}) (place "Knight4" {"B8"}) (place "Elephant4" {"C8"}) (place "King_noCross4" coord:"D8") (set Team 1 {P1 P3}) (set Team 2 {P2 P4})}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (and {(if (and (is Active P1) (not (is Mover P1))) (if (or (and (is Threatened (id "King_noCross" P1)) (not (can Move (do (and (forEach Piece P1) (set NextPlayer (player 1))) ifAfterwards:(not (is Threatened (id "King_noCross" P1))))))) (= (where (id "King_noCross" P1)) -1)) (forEach Site (sites Occupied by:P1) (remove (site))))) (if (and (is Active P2) (not (is Mover P2))) (if (or (and (is Threatened (id "King_noCross" P2)) (not (can Move (do (and (forEach Piece P2) (set NextPlayer (player 2))) ifAfterwards:(not (is Threatened (id "King_noCross" P2))))))) (= (where (id "King_noCross" P2)) -1)) (forEach Site (sites Occupied by:P2) (remove (site))))) (if (and (is Active P3) (not (is Mover P3))) (if (or (and (is Threatened (id "King_noCross" P3)) (not (can Move (do (and (forEach Piece P3) (set NextPlayer (player 3))) ifAfterwards:(not (is Threatened (id "King_noCross" P3))))))) (= (where (id "King_noCross" P3)) -1)) (forEach Site (sites Occupied by:P3) (remove (site))))) (if (and (is Active P4) (not (is Mover P4))) (if (or (and (is Threatened (id "King_noCross" P4)) (not (can Move (do (and (forEach Piece P4) (set NextPlayer (player 4))) ifAfterwards:(not (is Threatened (id "King_noCross" P4))))))) (= (where (id "King_noCross" P4)) -1)) (forEach Site (sites Occupied by:P4) (remove (site)))))})))) (end {(forEach NonMover if:(= (where "King_noCross" Player) -1) (result Player Loss)) (if (and {(no Pieces Enemy "Pawn") (no Pieces Enemy "Knight") (no Pieces Enemy "Elephant") (no Pieces Enemy "Rook")}) (result TeamMover Win))})))
###Description Four players, playing on teams of two. 1 x Shah (king): moves one space orthogonally or diagonally. 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): any distance diagonally; 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. The pieces of one team are arranged with Shahs on the two central squares of the outer rows, then the Pils, ASbs, and Rukhs, with the Sarbaz in the row in front of them. When a piece moves onto a space occupied by an opponent's piece, the opponent's piece is captured. When a Shah can be captured on the next turn, it is in check, and cannot remain in check at the end of that player's turn. When this is not possible, it is checkmate, and that player is out of the game. A team wins by checkmating both opposing Kings, or by capturing all of the opponents' pieces aside from the Kings. If all four Kings are the only remaining pieces, the game is a draw. ###Ludii (game "Chatrang" (players {(player N) (player S) (player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))})) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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)))))))}) (rules (start {(place "Pawn1" (intersection (expand (sites Left) steps:3) (sites Row 1))) (place "Pawn2" (intersection (expand (sites Right) steps:3) (sites Row 6))) (place "Pawn3" (intersection (expand (sites Right) steps:3) (sites Row 1))) (place "Pawn4" (intersection (expand (sites Left) steps:3) (sites Row 6))) (place "Rook1" {"A1"}) (place "Knight1" {"B1"}) (place "Elephant1" {"C1"}) (place "King_noCross1" coord:"D1") (place "Rook3" {"H1"}) (place "Knight3" {"G1"}) (place "Elephant3" {"F1"}) (place "King_noCross3" coord:"E1") (place "Rook2" {"H8"}) (place "Knight2" {"G8"}) (place "Elephant2" {"F8"}) (place "King_noCross2" coord:"E8") (place "Rook4" {"A8"}) (place "Knight4" {"B8"}) (place "Elephant4" {"C8"}) (place "King_noCross4" coord:"D8") (set Team 1 {P1 P3}) (set Team 2 {P2 P4})}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (and {(if (and (is Active P1) (not (is Mover P1))) (if (or (and (is Threatened (id "King_noCross" P1)) (not (can Move (do (and (forEach Piece P1) (set NextPlayer (player 1))) ifAfterwards:(not (is Threatened (id "King_noCross" P1))))))) (= (where (id "King_noCross" P1)) -1)) (forEach Site (sites Occupied by:P1) (remove (site))))) (if (and (is Active P2) (not (is Mover P2))) (if (or (and (is Threatened (id "King_noCross" P2)) (not (can Move (do (and (forEach Piece P2) (set NextPlayer (player 2))) ifAfterwards:(not (is Threatened (id "King_noCross" P2))))))) (= (where (id "King_noCross" P2)) -1)) (forEach Site (sites Occupied by:P2) (remove (site))))) (if (and (is Active P3) (not (is Mover P3))) (if (or (and (is Threatened (id "King_noCross" P3)) (not (can Move (do (and (forEach Piece P3) (set NextPlayer (player 3))) ifAfterwards:(not (is Threatened (id "King_noCross" P3))))))) (= (where (id "King_noCross" P3)) -1)) (forEach Site (sites Occupied by:P3) (remove (site))))) (if (and (is Active P4) (not (is Mover P4))) (if (or (and (is Threatened (id "King_noCross" P4)) (not (can Move (do (and (forEach Piece P4) (set NextPlayer (player 4))) ifAfterwards:(not (is Threatened (id "King_noCross" P4))))))) (= (where (id "King_noCross" P4)) -1)) (forEach Site (sites Occupied by:P4) (remove (site)))))})))) (end {(forEach NonMover if:(= (where "King_noCross" Player) -1) (result Player Loss)) (if (and {(no Pieces Enemy "Pawn") (no Pieces Enemy "Knight") (no Pieces Enemy "Elephant") (no Pieces Enemy "Rook")}) (result TeamMover Win))})))
8x8 board. Pieces have special moves, as follows: Rátu (king), moves one square in any direction, but on the first move, if it has not been checked, may move two spaces in any direction or like a Járan; Pateh (minister), moves orthogonally or diagonally any number of spaces; Mántri (x2); move diagonally any distance; Járan (horse) x2, moves orthogonally one space then diagonal one space from there, jumping over any intervening pieces; Práhu (vessel) x2, moves orthogonally any distance; Bídak (pawn) x8: moves one square forward or one square forward diagonally to capture. May move two spaces forward orthogonally if it is that piece's first move. Upon reaching the opposite edge of the board, the Bídak must move backward diagonally three spaces before being promoted to Pateh, unless it is in one of the corner spaces, in which case it is promoted immediately. There is no limit to the number of Patehs on the board. To castle, the Práhu moves next to the Rátu, and then at any turn in the future the Rátu may move to the space on the other side of it, provided the Rátu has not yet been checked and that the space to which it moves remains available. The Rátu cannot be in check at the end of its turn. When this is unavoidable, it is checkmate and the opponent wins. If the Rátu is the only piece belonging to the player on the board, that player wins.
(game "Chatur" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1)))) (if (not (= 1 (state at:(from)))) (or {(move Slide (between (exact 2)) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (if (is In (from) (sites {"E1" "D8"})) (or (if (and {(is Empty (ahead (from) steps:2 W)) (= (what at:(ahead (from) W)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) W))))}) (move (from) (to (ahead (from) steps:2 W)))) (if (and {(is Empty (ahead (from) steps:2 E)) (= (what at:(ahead (from) E)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) E))))}) (move (from) (to (ahead (from) steps:2 E))))))} (then (set State at:(last To) 1)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (and (not (= 1 (state at:(last To)))) (not (is In (last To) (sites {"D1" "F1" "C8" "E8"})))) (set State at:(last To) 1))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" (if (is In (from) (sites Mover "Promotion")) (move Slide (directions {BR BL}) (between (exact 3)) (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (promote (last To) (piece "Queen") Mover))) (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) (intersection (sites Corners) (sites Mover "Promotion"))) (promote (last To) (piece "Queen") Mover)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Queen2" coord:"E8") (place "King_noCross2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (is Threatened (id "King_noCross" Next)) (if (not (= 1 (state at:(where "King_noCross" Next)))) (set State at:(where "King_noCross" Next) 1)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Loss))})))
###Description 8x8 board. Pieces have special moves, as follows: Rátu (king), moves one square in any direction, but on the first move, if it has not been checked, may move two spaces in any direction or like a Járan; Pateh (minister), moves orthogonally or diagonally any number of spaces; Mántri (x2); move diagonally any distance; Járan (horse) x2, moves orthogonally one space then diagonal one space from there, jumping over any intervening pieces; Práhu (vessel) x2, moves orthogonally any distance; Bídak (pawn) x8: moves one square forward or one square forward diagonally to capture. May move two spaces forward orthogonally if it is that piece's first move. Upon reaching the opposite edge of the board, the Bídak must move backward diagonally three spaces before being promoted to Pateh, unless it is in one of the corner spaces, in which case it is promoted immediately. There is no limit to the number of Patehs on the board. To castle, the Práhu moves next to the Rátu, and then at any turn in the future the Rátu may move to the space on the other side of it, provided the Rátu has not yet been checked and that the space to which it moves remains available. The Rátu cannot be in check at the end of its turn. When this is unavoidable, it is checkmate and the opponent wins. If the Rátu is the only piece belonging to the player on the board, that player wins. ###Ludii (game "Chatur" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1)))) (if (not (= 1 (state at:(from)))) (or {(move Slide (between (exact 2)) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (if (is In (from) (sites {"E1" "D8"})) (or (if (and {(is Empty (ahead (from) steps:2 W)) (= (what at:(ahead (from) W)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) W))))}) (move (from) (to (ahead (from) steps:2 W)))) (if (and {(is Empty (ahead (from) steps:2 E)) (= (what at:(ahead (from) E)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) E))))}) (move (from) (to (ahead (from) steps:2 E))))))} (then (set State at:(last To) 1)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (and (not (= 1 (state at:(last To)))) (not (is In (last To) (sites {"D1" "F1" "C8" "E8"})))) (set State at:(last To) 1))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" (if (is In (from) (sites Mover "Promotion")) (move Slide (directions {BR BL}) (between (exact 3)) (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (promote (last To) (piece "Queen") Mover))) (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) (intersection (sites Corners) (sites Mover "Promotion"))) (promote (last To) (piece "Queen") Mover)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Queen2" coord:"E8") (place "King_noCross2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (is Threatened (id "King_noCross" Next)) (if (not (= 1 (state at:(where "King_noCross" Next)))) (set State at:(where "King_noCross" Next) 1)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Loss))})))
12x12 board. Pieces move as follows: Raja (King, x1): moves one space in any direction; Mantri (Minister, placed to the left of the Raja, x1): moves any distance orthogonally or diagonally; Ushtra (Camel, x2): moves diagonally any distance; Chariot (x2), moves orthogonally any distance; Flagcar (x2), moves diagonally any distance; Vaha (Horse, x2): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Danti (Elephant, x2): moves orthogonally any distance. Padati (Pawn, x12): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. When a player is reduced to only their Raja and Padati, the opponent wins. In the case of a stalemate, the player in stalemate may remove any of the opponent's pieces (except their Raja).
(game "Chaturanga (12x12)" (players {(player N) (player S)}) (equipment {(board (square 12)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Camel" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 10)) (place "Elephant1" {"A1" "L1"}) (place "Knight1" {"B1" "K1"}) (place "Bishop_noCross1" {"C1" "J1"}) (place "Rook1" {"D1" "I1"}) (place "Camel1" {"E1" "H1"}) (place "Ferz_noCross1" coord:"F1") (place "King_noCross1" coord:"G1") (place "Elephant2" {"A12" "L12"}) (place "Knight2" {"B12" "K12"}) (place "Bishop_noCross2" {"C12" "J12"}) (place "Rook2" {"D12" "I12"}) (place "Camel2" {"E12" "H12"}) (place "Ferz_noCross2" coord:"G12") (place "King_noCross2" coord:"F12")}) (play (if (no Moves Mover) (move Remove (difference (sites Occupied by:Next) (where "King_noCross" Next))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and {(no Pieces Next "Ferz_noCross") (no Pieces Next "Knight") (no Pieces Next "Bishop_noCross") (no Pieces Next "Elephant") (no Pieces Next "Rook") (no Pieces Next "Camel")}) (result Mover Win))})))
###Description 12x12 board. Pieces move as follows: Raja (King, x1): moves one space in any direction; Mantri (Minister, placed to the left of the Raja, x1): moves any distance orthogonally or diagonally; Ushtra (Camel, x2): moves diagonally any distance; Chariot (x2), moves orthogonally any distance; Flagcar (x2), moves diagonally any distance; Vaha (Horse, x2): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Danti (Elephant, x2): moves orthogonally any distance. Padati (Pawn, x12): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. When a player is reduced to only their Raja and Padati, the opponent wins. In the case of a stalemate, the player in stalemate may remove any of the opponent's pieces (except their Raja). ###Ludii (game "Chaturanga (12x12)" (players {(player N) (player S)}) (equipment {(board (square 12)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Camel" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 10)) (place "Elephant1" {"A1" "L1"}) (place "Knight1" {"B1" "K1"}) (place "Bishop_noCross1" {"C1" "J1"}) (place "Rook1" {"D1" "I1"}) (place "Camel1" {"E1" "H1"}) (place "Ferz_noCross1" coord:"F1") (place "King_noCross1" coord:"G1") (place "Elephant2" {"A12" "L12"}) (place "Knight2" {"B12" "K12"}) (place "Bishop_noCross2" {"C12" "J12"}) (place "Rook2" {"D12" "I12"}) (place "Camel2" {"E12" "H12"}) (place "Ferz_noCross2" coord:"G12") (place "King_noCross2" coord:"F12")}) (play (if (no Moves Mover) (move Remove (difference (sites Occupied by:Next) (where "King_noCross" Next))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and {(no Pieces Next "Ferz_noCross") (no Pieces Next "Knight") (no Pieces Next "Bishop_noCross") (no Pieces Next "Elephant") (no Pieces Next "Rook") (no Pieces Next "Camel")}) (result Mover Win))})))
14x14 board. 32 pieces per player. Pieces move as follows: King (x1): Moves any distance orthogonally or diagonally; Crown Prince (x1): moves up to six spaces orthogonally or diagonally; Minister (x1): moves up to six spaces orthogonally or diagonally; Military leader (x1): moves up to six spaces orthogonally or diagonally; Elephant (x2): moves forward orthogonally up to five spaces with the possibility of then moving one space backward diagonally; Cart (x2): moves any distance orthogonally; Horse (x4): moves one space orthogonally and then one space diagonally, leaping over any intervening pieces; Machinist (x4): moves forward orthogonally up to four spaces, forward diagonally one space, or backward orthogonally one space; Archer (x4): moves forward orthogonally up to three spaces, forward diagonally one space, or backward orthogonally one space; Spearmen (x4): moves forward orthogonally up to two spaces, forward diagonally one space, or backward orthogonally one space; Swordsmen (x4): forward one space orthogonally or diagonally or backward one space orthogonally. Players place their pieces on their half of the board in any arrangement they wish. When a piece moves to a space occupied by an opponent's piece, the opponent's piece is captured. If the King can be captured by the opponent on their next turn, it is in check and must not be in check at the end of the player's turn. If this is not possible, the player loses.
(game "Chaturanga (14x14)" (players {(player N) (player S)}) (equipment {(board (square 14)) (piece "King" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Prince" Each (move Slide (between (max 6) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop" Each (move Slide (between (max 6) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Queen" Each (move Slide (between (max 6) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (or {(move Slide Forward (between (max 5) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {BR BL}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (forEach Direction Forward (between (range 1 5)) (to if:(is Empty (to)) (apply (and {(move (from) (to (sites To (step (from (to)) (if (is Mover P1) (directions {SW SE}) (directions {NW NE})) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))))}))))})) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Horse" 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 "Wrench" Each (or (move Slide Forward (between (max 4) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL Backward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "Archer" Each (or (move Slide Forward (between (max 3) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL Backward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "Spear" Each (or (move Slide Forward (between (max 2) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL Backward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "Sword" Each (move Step (directions {Forward FR FL Backward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (hand Each size:11) (regions P1 (expand (sites Bottom) steps:6)) (regions P2 (expand (sites Top) steps:6))}) (rules (start {(place "King1" (handSite P1)) (place "King2" (handSite P2)) (place "Prince1" (handSite P1 1)) (place "Prince2" (handSite P2 1)) (place "Bishop1" (handSite P1 2)) (place "Bishop2" (handSite P2 2)) (place "Queen1" (handSite P1 3)) (place "Queen2" (handSite P2 3)) (place "Elephant1" (handSite P1 4)) (place "Elephant2" (handSite P2 4)) (place "Rook1" (handSite P1 5) count:2) (place "Rook2" (handSite P2 5) count:2) (place "Horse1" (handSite P1 6) count:4) (place "Horse2" (handSite P2 6) count:4) (place "Wrench1" (handSite P1 7) count:4) (place "Wrench2" (handSite P2 7) count:4) (place "Archer1" (handSite P1 8) count:4) (place "Archer2" (handSite P2 8) count:4) (place "Spear1" (handSite P1 9) count:4) (place "Spear1" (handSite P2 9) count:4) (place "Sword1" (handSite P1 10) count:4) (place "Sword2" (handSite P2 10) count:4)}) phases:{(phase "Placement" (play (move (from (sites Hand Mover) if:(is Occupied (from))) (to (intersection (sites Empty) (sites Mover))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(is Empty (site))) "Play")) (phase "Play" (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))))} (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
###Description 14x14 board. 32 pieces per player. Pieces move as follows: King (x1): Moves any distance orthogonally or diagonally; Crown Prince (x1): moves up to six spaces orthogonally or diagonally; Minister (x1): moves up to six spaces orthogonally or diagonally; Military leader (x1): moves up to six spaces orthogonally or diagonally; Elephant (x2): moves forward orthogonally up to five spaces with the possibility of then moving one space backward diagonally; Cart (x2): moves any distance orthogonally; Horse (x4): moves one space orthogonally and then one space diagonally, leaping over any intervening pieces; Machinist (x4): moves forward orthogonally up to four spaces, forward diagonally one space, or backward orthogonally one space; Archer (x4): moves forward orthogonally up to three spaces, forward diagonally one space, or backward orthogonally one space; Spearmen (x4): moves forward orthogonally up to two spaces, forward diagonally one space, or backward orthogonally one space; Swordsmen (x4): forward one space orthogonally or diagonally or backward one space orthogonally. Players place their pieces on their half of the board in any arrangement they wish. When a piece moves to a space occupied by an opponent's piece, the opponent's piece is captured. If the King can be captured by the opponent on their next turn, it is in check and must not be in check at the end of the player's turn. If this is not possible, the player loses. ###Ludii (game "Chaturanga (14x14)" (players {(player N) (player S)}) (equipment {(board (square 14)) (piece "King" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Prince" Each (move Slide (between (max 6) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop" Each (move Slide (between (max 6) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Queen" Each (move Slide (between (max 6) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (or {(move Slide Forward (between (max 5) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {BR BL}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (forEach Direction Forward (between (range 1 5)) (to if:(is Empty (to)) (apply (and {(move (from) (to (sites To (step (from (to)) (if (is Mover P1) (directions {SW SE}) (directions {NW NE})) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))))}))))})) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Horse" 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 "Wrench" Each (or (move Slide Forward (between (max 4) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL Backward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "Archer" Each (or (move Slide Forward (between (max 3) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL Backward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "Spear" Each (or (move Slide Forward (between (max 2) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL Backward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "Sword" Each (move Step (directions {Forward FR FL Backward}) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (hand Each size:11) (regions P1 (expand (sites Bottom) steps:6)) (regions P2 (expand (sites Top) steps:6))}) (rules (start {(place "King1" (handSite P1)) (place "King2" (handSite P2)) (place "Prince1" (handSite P1 1)) (place "Prince2" (handSite P2 1)) (place "Bishop1" (handSite P1 2)) (place "Bishop2" (handSite P2 2)) (place "Queen1" (handSite P1 3)) (place "Queen2" (handSite P2 3)) (place "Elephant1" (handSite P1 4)) (place "Elephant2" (handSite P2 4)) (place "Rook1" (handSite P1 5) count:2) (place "Rook2" (handSite P2 5) count:2) (place "Horse1" (handSite P1 6) count:4) (place "Horse2" (handSite P2 6) count:4) (place "Wrench1" (handSite P1 7) count:4) (place "Wrench2" (handSite P2 7) count:4) (place "Archer1" (handSite P1 8) count:4) (place "Archer2" (handSite P2 8) count:4) (place "Spear1" (handSite P1 9) count:4) (place "Spear1" (handSite P2 9) count:4) (place "Sword1" (handSite P1 10) count:4) (place "Sword2" (handSite P2 10) count:4)}) phases:{(phase "Placement" (play (move (from (sites Hand Mover) if:(is Occupied (from))) (to (intersection (sites Empty) (sites Mover))))) (nextPhase Mover (all Sites (sites Hand Mover) if:(is Empty (site))) "Play")) (phase "Play" (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))))} (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
14x14 board. Pieces move as follows: Raja (King, x1): moves one space in any direction; Mantri (Minister, placed to the left of the Raja, x1): moves any distance orthogonally or diagonally; Queen (x1, placed to the right of the Raja); moves orthogonally one space; Prince (placed to the left of the Minister, x1), moves orthogonally or diagonally any distance; Ushtra (Camel, x2): moves diagonally any distance; Chariot (x2), moves orthogonally any distance; Flagcar (x2), moves diagonally any distance; Vaha (Horse, x2): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Danti (Elephant, x2): moves orthogonally any distance. Padati (Pawn, x14): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. When a player is reduced to only their Raja and Padati, the opponent wins. In the case of a stalemate, the player in stalemate may remove any of the opponent's pieces (except their Raja).
(game "Chaturanga (Kridakausalya 14x14)" (players {(player N) (player S)}) (equipment {(board (square 14)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Camel" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Queen" Each (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Commoner" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Elephant1" {"A1" "N1"}) (place "Knight1" {"B1" "M1"}) (place "Bishop_noCross1" {"C1" "L1"}) (place "Rook1" {"D1" "K1"}) (place "Camel1" {"E1" "J1"}) (place "Commoner1" coord:"F1") (place "Ferz_noCross1" coord:"G1") (place "King_noCross1" coord:"H1") (place "Queen1" coord:"I1") (place "Pawn2" (sites Row 12)) (place "Elephant2" {"A14" "N14"}) (place "Knight2" {"B14" "M14"}) (place "Bishop_noCross2" {"C14" "L14"}) (place "Rook2" {"D14" "K14"}) (place "Camel2" {"E14" "J14"}) (place "Commoner2" coord:"I14") (place "Ferz_noCross2" coord:"H14") (place "King_noCross2" coord:"G14") (place "Queen2" coord:"F14")}) (play (if (no Moves Mover) (move Remove (difference (sites Occupied by:Next) (where "King_noCross" Next))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and {(no Pieces Next "Ferz_noCross") (no Pieces Next "Knight") (no Pieces Next "Bishop_noCross") (no Pieces Next "Elephant") (no Pieces Next "Rook") (no Pieces Next "Camel") (no Pieces Next "Commoner") (no Pieces Next "Queen")}) (result Mover Win))})))
###Description 14x14 board. Pieces move as follows: Raja (King, x1): moves one space in any direction; Mantri (Minister, placed to the left of the Raja, x1): moves any distance orthogonally or diagonally; Queen (x1, placed to the right of the Raja); moves orthogonally one space; Prince (placed to the left of the Minister, x1), moves orthogonally or diagonally any distance; Ushtra (Camel, x2): moves diagonally any distance; Chariot (x2), moves orthogonally any distance; Flagcar (x2), moves diagonally any distance; Vaha (Horse, x2): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Danti (Elephant, x2): moves orthogonally any distance. Padati (Pawn, x14): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. When a player is reduced to only their Raja and Padati, the opponent wins. In the case of a stalemate, the player in stalemate may remove any of the opponent's pieces (except their Raja). ###Ludii (game "Chaturanga (Kridakausalya 14x14)" (players {(player N) (player S)}) (equipment {(board (square 14)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Camel" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Queen" Each (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Commoner" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Elephant1" {"A1" "N1"}) (place "Knight1" {"B1" "M1"}) (place "Bishop_noCross1" {"C1" "L1"}) (place "Rook1" {"D1" "K1"}) (place "Camel1" {"E1" "J1"}) (place "Commoner1" coord:"F1") (place "Ferz_noCross1" coord:"G1") (place "King_noCross1" coord:"H1") (place "Queen1" coord:"I1") (place "Pawn2" (sites Row 12)) (place "Elephant2" {"A14" "N14"}) (place "Knight2" {"B14" "M14"}) (place "Bishop_noCross2" {"C14" "L14"}) (place "Rook2" {"D14" "K14"}) (place "Camel2" {"E14" "J14"}) (place "Commoner2" coord:"I14") (place "Ferz_noCross2" coord:"H14") (place "King_noCross2" coord:"G14") (place "Queen2" coord:"F14")}) (play (if (no Moves Mover) (move Remove (difference (sites Occupied by:Next) (where "King_noCross" Next))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and {(no Pieces Next "Ferz_noCross") (no Pieces Next "Knight") (no Pieces Next "Bishop_noCross") (no Pieces Next "Elephant") (no Pieces Next "Rook") (no Pieces Next "Camel") (no Pieces Next "Commoner") (no Pieces Next "Queen")}) (result Mover Win))})))
8x8 board. Pieces move as follows: Raja (x1): moves one space in any direction; Mantri (x1): moves any distance orthogonally or diagonally; Ushtra (x2): moves diagonally any distance; Vaha (x2): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Danti (x2): moves orthogonally any distance. Padati (x8): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. When a player is reduced to only their Raja and Padati, the opponent wins. In the case of a stalemate, the player in stalemate may remove any of the opponent's pieces (except their Raja).
(game "Chaturanga (Kridakausalya)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (if (can Move (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (move Remove (difference (sites Occupied by:Next) (sites Occupied by:Next component:"King_noCross"))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and {(no Pieces Next "Ferz_noCross") (no Pieces Next "Knight") (no Pieces Next "Elephant") (no Pieces Next "Rook")}) (result Mover Win))})))
###Description 8x8 board. Pieces move as follows: Raja (x1): moves one space in any direction; Mantri (x1): moves any distance orthogonally or diagonally; Ushtra (x2): moves diagonally any distance; Vaha (x2): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Danti (x2): moves orthogonally any distance. Padati (x8): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. When a player is reduced to only their Raja and Padati, the opponent wins. In the case of a stalemate, the player in stalemate may remove any of the opponent's pieces (except their Raja). ###Ludii (game "Chaturanga (Kridakausalya)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (if (can Move (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (move Remove (difference (sites Occupied by:Next) (sites Occupied by:Next component:"King_noCross"))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and {(no Pieces Next "Ferz_noCross") (no Pieces Next "Knight") (no Pieces Next "Elephant") (no Pieces Next "Rook")}) (result Mover Win))})))
8x8 board. 8 Bhata (or Padati; move like Chess pawns but without being able to move two on the first turn); 2 Ashva (horses; move like Chess knights); 2 Gaja (elephants; two spaces in any orthogonal direction, jumping over the first square); 2 Ratha (chariots; moves like a rook in chess); 1 Mantri (counselor; moves one square diagonally in any direction); 1 Raja (king; moves one square in any direction). These are set up along one edge of the board: Gaja-Ratha-Ashva-Mantri-Raja-Ashva-Ratha-Gaja, with the eight Bhata lined up in the row in front of these. Players take turns moving. When one piece lands on the space occupied by another piece, it is captured. When a Raja can be captured by an opponent's piece on the next turn, it is in check. The Raja must not be in check at the end of the player's turn. When this is unavoidable, it is checkmate and the opponent wins. A Raja that is stalemated wins. A player who reduces their opponent to only the Raja wins.
(game "Chaturanga (al-Adli)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" (move Hop Orthogonal (between (exact 1) if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Pawn" 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 "Queen" (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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Elephant1" {"A1" "H1"}) (place "Rook1" {"B1" "G1"}) (place "Knight1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Elephant2" {"A8" "H8"}) (place "Rook2" {"B8" "G8"}) (place "Knight2" {"C8" "F8"}) (place "Queen2" coord:"E8") (place "King_noCross2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Loss))})))
###Description 8x8 board. 8 Bhata (or Padati; move like Chess pawns but without being able to move two on the first turn); 2 Ashva (horses; move like Chess knights); 2 Gaja (elephants; two spaces in any orthogonal direction, jumping over the first square); 2 Ratha (chariots; moves like a rook in chess); 1 Mantri (counselor; moves one square diagonally in any direction); 1 Raja (king; moves one square in any direction). These are set up along one edge of the board: Gaja-Ratha-Ashva-Mantri-Raja-Ashva-Ratha-Gaja, with the eight Bhata lined up in the row in front of these. Players take turns moving. When one piece lands on the space occupied by another piece, it is captured. When a Raja can be captured by an opponent's piece on the next turn, it is in check. The Raja must not be in check at the end of the player's turn. When this is unavoidable, it is checkmate and the opponent wins. A Raja that is stalemated wins. A player who reduces their opponent to only the Raja wins. ###Ludii (game "Chaturanga (al-Adli)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" (move Hop Orthogonal (between (exact 1) if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Pawn" 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 "Queen" (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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Elephant1" {"A1" "H1"}) (place "Rook1" {"B1" "G1"}) (place "Knight1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Elephant2" {"A8" "H8"}) (place "Rook2" {"B8" "G8"}) (place "Knight2" {"C8" "F8"}) (place "Queen2" coord:"E8") (place "King_noCross2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Loss))})))
Played on an 8x8 board. 8 Bhata (or Padati; move like Chess pawns but without being able to move two on the first turn); 2 Ashva (horses; move like Chess knights); 2 Gaja (elephants; two spaces in any orthogonal direction, jumping over the first square); 2 Ratha (chariots; moves like a rook in chess); 1 Mantri (counselor; moves one square diagonally in any direction); 1 Raja (king; moves one square in any direction). These are set up along one edge of the board: Ratha-Ashva-Gaja-Mantri-Raja-Gaja-Ashva-Ratha, with the eight Bhata lined up in the row in front of these, as in chess. Players take turns moving. When one piece lands on the space occupied by another piece, it is captured. Play continues until one player's king cannot move without being captured. The elephants can jump only orthogonally.
(game "Chaturanga" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" Each (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"E8") (place "King_noCross2" coord:"D8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "Ferz_noCross") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Win)) (if (<= (count Pieces Next) 1) (result Next Loss))})))
###Description Played on an 8x8 board. 8 Bhata (or Padati; move like Chess pawns but without being able to move two on the first turn); 2 Ashva (horses; move like Chess knights); 2 Gaja (elephants; two spaces in any orthogonal direction, jumping over the first square); 2 Ratha (chariots; moves like a rook in chess); 1 Mantri (counselor; moves one square diagonally in any direction); 1 Raja (king; moves one square in any direction). These are set up along one edge of the board: Ratha-Ashva-Gaja-Mantri-Raja-Gaja-Ashva-Ratha, with the eight Bhata lined up in the row in front of these, as in chess. Players take turns moving. When one piece lands on the space occupied by another piece, it is captured. Play continues until one player's king cannot move without being captured. The elephants can jump only orthogonally. ###Ludii (game "Chaturanga" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" Each (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"E8") (place "King_noCross2" coord:"D8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "Ferz_noCross") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Win)) (if (<= (count Pieces Next) 1) (result Next Loss))})))
8x8 board. One player plays with the following pieces: Raja (x1): moves one space in any direction; Mantri (x1): moves any distance orthogonally or diagonally; Ushtra (x2): moves diagonally any distance; Vaha (x2): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Danti (x2): moves orthogonally any distance. Padati (x8): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. The opponent plays as one Raja, which can move as any of the other pieces. This Raja cannot move to a space adjacent to the opponent's Raja. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. Check and checkmate rules apply to the player with a single Raja.
(game "Cittabhramanrpasya Khelanam" (players {(player S) (player N)}) (equipment {(board (square 8)) (piece "Pawn" P1 (or (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "Rook" P1 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" P1 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Elephant" P1 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" P1 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" P1 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" P2 (or (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites Around (where "King-noCross" Next))))) (apply (remove (to))))) (move Slide (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites Around (where "King-noCross" Next)))) (remove (to))))))) (regions "Promotion" P1 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 6)) (place "Rook1" {"A8" "H8"}) (place "Knight1" {"B8" "G8"}) (place "Elephant1" {"C8" "F8"}) (place "Ferz_noCross1" coord:"E8") (place "King_noCross1" coord:"D8") (place "King_noCross2" coord:"E1")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 8x8 board. One player plays with the following pieces: Raja (x1): moves one space in any direction; Mantri (x1): moves any distance orthogonally or diagonally; Ushtra (x2): moves diagonally any distance; Vaha (x2): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Danti (x2): moves orthogonally any distance. Padati (x8): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. The opponent plays as one Raja, which can move as any of the other pieces. This Raja cannot move to a space adjacent to the opponent's Raja. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. Check and checkmate rules apply to the player with a single Raja. ###Ludii (game "Cittabhramanrpasya Khelanam" (players {(player S) (player N)}) (equipment {(board (square 8)) (piece "Pawn" P1 (or (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "Rook" P1 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" P1 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Elephant" P1 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" P1 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" P1 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" P2 (or (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites Around (where "King-noCross" Next))))) (apply (remove (to))))) (move Slide (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites Around (where "King-noCross" Next)))) (remove (to))))))) (regions "Promotion" P1 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 6)) (place "Rook1" {"A8" "H8"}) (place "Knight1" {"B8" "G8"}) (place "Elephant1" {"C8" "F8"}) (place "Ferz_noCross1" coord:"E8") (place "King_noCross1" coord:"D8") (place "King_noCross2" coord:"E1")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
8x8 board, marked as in Chaturanga. Pieces move according to specialized moves, as follows: Pawns (x8): can move one space forward and capture one space forward diagonally; Elephant (or Chariot or Boat) (x2): can move any number of spaces orthogonally; Elephant (or Camel) (x2): can move any number of spaces diagonally; Horse (2): moves in any direction, one space orthogonally with one space forward diagonally; Vizier (x1): can move any number of spaces orthogonally or diagonally; Raja (x1): can move one space orthogonally or diagonally, but can also move like the horse on its first move, if it has not yet been checked. The pieces are arranged as in Chess, except the Vizier is place to the left of the Raja on both sides. Players capture pieces by moving onto a space occupied by an opponent's piece. When a pawn reaches the opposite edge of the board from where it started, it may be promoted to the more powerful piece that begins the game in that position, but only if one of these belonging to the player has already been captured. If this has not happened, the pawn cannot move to the final row. When a player can capture the opponent's Raja on the next turn, the Raja is in Check, the opponent's next move must free the Raja from check. If the opponent cannot, it is checkmate and the player wins. If a player captures all of the opponent's pieces aside from the Raja and pawns, it is declared a half-win, or Burd. When both players are left with only a Raja, it is a draw. Players are not allowed to stalemate the opponent. If check is given 70 times in succession, the game is a draw.
(game "Hindustani Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (move Step Forward (to if:(and (or (not (is In (to) (sites Mover "Promotion"))) (and (is In (to) (sites Mover "Promotion")) (if (and (is In (to) (sites Corners)) (< (count Sites in:(sites Occupied by:Mover component:"Boat")) 2)) True (if (and (or (= (column of:(to)) 1) (= (column of:(to)) 6)) (< (count Sites in:(sites Occupied by:Mover component:"Horse")) 2)) True (if (and (or (= (column of:(to)) 2) (= (column of:(to)) 5)) (< (count Sites in:(sites Occupied by:Mover component:"Elephant")) 2)) True (if (and (or (= (column of:(to)) 3) (= (column of:(to)) 4)) (< (count Sites in:(sites Occupied by:Mover component:"Ferz_noCross")) 1)) True False)))))) (not (is Friend (who at:(to))))) (apply (remove (to)))) (then (if (is In (last To) (sites Mover "Promotion")) (if (is In (last To) (sites Corners)) (promote (last To) (piece (id "Boat" Mover))) (if (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (promote (last To) (piece (id "Horse" Mover))) (if (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (promote (last To) (piece (id "Elephant" Mover))) (if (or (= (column of:(last To)) 3) (= (column of:(last To)) 4)) (promote (last To) (piece (id "Queen" Mover))))))))))) (piece "Boat" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (and (not (is Threatened (id "King_noCross" Mover))) (= (state at:(from)) 1)) (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 (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Horse" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Boat1" {"A1" "H1"}) (place "Horse1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1" state:1) (place "Boat2" {"A8" "H8"}) (place "Horse2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"E8") (place "King_noCross2" coord:"D8" state:1)}) (play (do (forEach Piece) ifAfterwards:(and (not (no Moves Next)) (not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Draw)) (if (= (count Pieces Next) (+ 1 (count Sites in:(sites Occupied by:Next component:"Pawn")))) (result Mover Draw))})))
###Description 8x8 board, marked as in Chaturanga. Pieces move according to specialized moves, as follows: Pawns (x8): can move one space forward and capture one space forward diagonally; Elephant (or Chariot or Boat) (x2): can move any number of spaces orthogonally; Elephant (or Camel) (x2): can move any number of spaces diagonally; Horse (2): moves in any direction, one space orthogonally with one space forward diagonally; Vizier (x1): can move any number of spaces orthogonally or diagonally; Raja (x1): can move one space orthogonally or diagonally, but can also move like the horse on its first move, if it has not yet been checked. The pieces are arranged as in Chess, except the Vizier is place to the left of the Raja on both sides. Players capture pieces by moving onto a space occupied by an opponent's piece. When a pawn reaches the opposite edge of the board from where it started, it may be promoted to the more powerful piece that begins the game in that position, but only if one of these belonging to the player has already been captured. If this has not happened, the pawn cannot move to the final row. When a player can capture the opponent's Raja on the next turn, the Raja is in Check, the opponent's next move must free the Raja from check. If the opponent cannot, it is checkmate and the player wins. If a player captures all of the opponent's pieces aside from the Raja and pawns, it is declared a half-win, or Burd. When both players are left with only a Raja, it is a draw. Players are not allowed to stalemate the opponent. If check is given 70 times in succession, the game is a draw. ###Ludii (game "Hindustani Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (move Step Forward (to if:(and (or (not (is In (to) (sites Mover "Promotion"))) (and (is In (to) (sites Mover "Promotion")) (if (and (is In (to) (sites Corners)) (< (count Sites in:(sites Occupied by:Mover component:"Boat")) 2)) True (if (and (or (= (column of:(to)) 1) (= (column of:(to)) 6)) (< (count Sites in:(sites Occupied by:Mover component:"Horse")) 2)) True (if (and (or (= (column of:(to)) 2) (= (column of:(to)) 5)) (< (count Sites in:(sites Occupied by:Mover component:"Elephant")) 2)) True (if (and (or (= (column of:(to)) 3) (= (column of:(to)) 4)) (< (count Sites in:(sites Occupied by:Mover component:"Ferz_noCross")) 1)) True False)))))) (not (is Friend (who at:(to))))) (apply (remove (to)))) (then (if (is In (last To) (sites Mover "Promotion")) (if (is In (last To) (sites Corners)) (promote (last To) (piece (id "Boat" Mover))) (if (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (promote (last To) (piece (id "Horse" Mover))) (if (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (promote (last To) (piece (id "Elephant" Mover))) (if (or (= (column of:(last To)) 3) (= (column of:(last To)) 4)) (promote (last To) (piece (id "Queen" Mover))))))))))) (piece "Boat" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (and (not (is Threatened (id "King_noCross" Mover))) (= (state at:(from)) 1)) (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 (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Horse" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Boat1" {"A1" "H1"}) (place "Horse1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1" state:1) (place "Boat2" {"A8" "H8"}) (place "Horse2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"E8") (place "King_noCross2" coord:"D8" state:1)}) (play (do (forEach Piece) ifAfterwards:(and (not (no Moves Next)) (not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Draw)) (if (= (count Pieces Next) (+ 1 (count Sites in:(sites Occupied by:Next component:"Pawn")))) (result Mover Draw))})))
8x8 board, with markings in the four central squares, the four corner squares, and the two middle squares of each edge. The pieces have the following movement values: Raja (x1): moves one space in any direction; Mantri (x1): moves diagonally one space; Karabha (x2): jumps exactly two squares diagonally; Raji (x2): moves orthogonally one space and then diagonally another space, jumping over any intervening pieces; Kunjara (x2): moves orthogonally any distance; Patti (x8): move forward orthogonally one space, diagonally forward one space to capture. When a Patti reaches a marked space on the opposite edge of the board, it is promoted to Mantri if it is on a marked square. If it is on an unmarked square, the Patti must move back to the space from which it moved to the last row and is then promoted to Mantri. If the Raja can be taken on the opponent's next turn, it is in check. The Raja must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins.If a Raja is in stalemate, and no other pieces can move the player may remove one of the opponent's pieces causing the stalemate. If the opponent is reduced to only their Raja, it is also a victory, though considered a lesser one. Checking the opponent's Raja 64 consecutive times is a win.
(game "Krida Buddhibalasrita" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Elephant" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (if (not (is In (last To) (sites "PromotionMarked"))) (fromTo (from (last To)) (to (last From))))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (regions "PromotionMarked" (sites {"A1" "D1" "E1" "H1" "A8" "D8" "E8" "H8"}))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (if (can Move (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (is Threatened (id "King_noCross" Next)) (set Value Mover (+ 1 (value Player Mover))) (set Value Mover 0))))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (is Threatened (id "King_noCross" Next)) (set Value Mover (+ 1 (value Player Mover))) (set Value Mover 0)))) (move Remove (difference (sites Occupied by:Next) (sites Occupied by:Next component:"King_noCross"))))) (end {(if (or (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next) (forEach Piece))))))) (= 1 (count Pieces Next))) (result Mover Win)) (if (= (value Player P1) 64) (result P1 Win)) (if (= (value Player P2) 64) (result P2 Win))})))
###Description 8x8 board, with markings in the four central squares, the four corner squares, and the two middle squares of each edge. The pieces have the following movement values: Raja (x1): moves one space in any direction; Mantri (x1): moves diagonally one space; Karabha (x2): jumps exactly two squares diagonally; Raji (x2): moves orthogonally one space and then diagonally another space, jumping over any intervening pieces; Kunjara (x2): moves orthogonally any distance; Patti (x8): move forward orthogonally one space, diagonally forward one space to capture. When a Patti reaches a marked space on the opposite edge of the board, it is promoted to Mantri if it is on a marked square. If it is on an unmarked square, the Patti must move back to the space from which it moved to the last row and is then promoted to Mantri. If the Raja can be taken on the opponent's next turn, it is in check. The Raja must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins.If a Raja is in stalemate, and no other pieces can move the player may remove one of the opponent's pieces causing the stalemate. If the opponent is reduced to only their Raja, it is also a victory, though considered a lesser one. Checking the opponent's Raja 64 consecutive times is a win. ###Ludii (game "Krida Buddhibalasrita" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Elephant" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Ferz_noCross") Mover) (if (not (is In (last To) (sites "PromotionMarked"))) (fromTo (from (last To)) (to (last From))))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (regions "PromotionMarked" (sites {"A1" "D1" "E1" "H1" "A8" "D8" "E8" "H8"}))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (if (can Move (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (is Threatened (id "King_noCross" Next)) (set Value Mover (+ 1 (value Player Mover))) (set Value Mover 0))))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (is Threatened (id "King_noCross" Next)) (set Value Mover (+ 1 (value Player Mover))) (set Value Mover 0)))) (move Remove (difference (sites Occupied by:Next) (sites Occupied by:Next component:"King_noCross"))))) (end {(if (or (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next) (forEach Piece))))))) (= 1 (count Pieces Next))) (result Mover Win)) (if (= (value Player P1) 64) (result P1 Win)) (if (= (value Player P2) 64) (result P2 Win))})))
8x8 board, with diagonals in every square. Pieces have special moves, as follows: Raja (king), moves one square in any direction, but on the first move, it may jump two squares or move as a knight, with the exception that it cannot jump two squares diagonally; Mantri (minister), moves orthogonally or diagonally any number of spaces; Gajah (x2); move diagonally any distance; Kuda (horse) x2, moves orthogonally one space then diagonal one space from there, jumping over any intervening pieces; Ter/Chemor (chariot) x2, moves orthogonally any distance; Bídaq (pawn) x8: moves one square forward or one square forward diagonally to capture. May move two spaces forward orthogonally if it is that piece's first move. Upon reaching the opposite edge of the board, the Bídaq moves in the opposite direction, reversing again if it reaches the opposite edge. The Mantri is placed to the right of the Raja at the beginning of play. Castling occurs in two moves, the rook moving to the king and then the king jumping over the rook. Pieces are captured by moving onto a space occupied by an opponent's piece. If the Raja can be captured on its next turn, it is in check. The Raja cannot be in check at the end of its turn. When this is unavoidable, it is checkmate and the opponent wins. A stalemate is considered a draw.
(game "Main Chator (Batak)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (not (= 1 (state at:(from)))) (or {(move Hop Orthogonal (between (exact 2) if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (if (is In (from) (sites {"E8" "D1"})) (or (if (and {(is Empty (ahead (from) steps:2 W)) (= (what at:(ahead (from) W)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) W))))}) (move (from) (to (ahead (from) steps:2 W)))) (if (and {(is Empty (ahead (from) steps:2 E)) (= (what at:(ahead (from) E)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) E))))}) (move (from) (to (ahead (from) steps:2 E))))))} (then (set State at:(last To) 1)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (and (not (= 1 (state at:(last To)))) (not (is In (last To) (sites {"C1" "E1" "D8" "F8"})))) (set State at:(last To) 1))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" (or {(if (and (= 0 (state at:(last To))) (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 (if (= 1 (state at:(from))) Backward 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) (union (sites Bottom) (sites Top))) (if (= 0 (state at:(last To))) (set State at:(last To) 1) (set State at:(last To) 2)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Queen1" coord:"E1") (place "King_noCross1" coord:"D1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw))})))
###Description 8x8 board, with diagonals in every square. Pieces have special moves, as follows: Raja (king), moves one square in any direction, but on the first move, it may jump two squares or move as a knight, with the exception that it cannot jump two squares diagonally; Mantri (minister), moves orthogonally or diagonally any number of spaces; Gajah (x2); move diagonally any distance; Kuda (horse) x2, moves orthogonally one space then diagonal one space from there, jumping over any intervening pieces; Ter/Chemor (chariot) x2, moves orthogonally any distance; Bídaq (pawn) x8: moves one square forward or one square forward diagonally to capture. May move two spaces forward orthogonally if it is that piece's first move. Upon reaching the opposite edge of the board, the Bídaq moves in the opposite direction, reversing again if it reaches the opposite edge. The Mantri is placed to the right of the Raja at the beginning of play. Castling occurs in two moves, the rook moving to the king and then the king jumping over the rook. Pieces are captured by moving onto a space occupied by an opponent's piece. If the Raja can be captured on its next turn, it is in check. The Raja cannot be in check at the end of its turn. When this is unavoidable, it is checkmate and the opponent wins. A stalemate is considered a draw. ###Ludii (game "Main Chator (Batak)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (not (= 1 (state at:(from)))) (or {(move Hop Orthogonal (between (exact 2) if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (if (is In (from) (sites {"E8" "D1"})) (or (if (and {(is Empty (ahead (from) steps:2 W)) (= (what at:(ahead (from) W)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) W))))}) (move (from) (to (ahead (from) steps:2 W)))) (if (and {(is Empty (ahead (from) steps:2 E)) (= (what at:(ahead (from) E)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) E))))}) (move (from) (to (ahead (from) steps:2 E))))))} (then (set State at:(last To) 1)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (and (not (= 1 (state at:(last To)))) (not (is In (last To) (sites {"C1" "E1" "D8" "F8"})))) (set State at:(last To) 1))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" (or {(if (and (= 0 (state at:(last To))) (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 (if (= 1 (state at:(from))) Backward 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) (union (sites Bottom) (sites Top))) (if (= 0 (state at:(last To))) (set State at:(last To) 1) (set State at:(last To) 2)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Queen1" coord:"E1") (place "King_noCross1" coord:"D1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw))})))
Played on an 8x8 board with pieces with specialized moves. The pieces are as follows, and placed on the outer rank in the following order, starting from the left corner and moving in, with the placement mirrored on the right side (the Mantri is placed to the right of the Rajah): Tor (2): can move any number of spaces orthogonally; Kudah (2): moves in any direction, one space orthogonally with one space forward diagonally, jumping over any intervening pieces; Gajah (2): can move any number of spaces diagonally; Rajah (1): can move one space orthogonally or diagonally; Mantri (1): can move any number of spaces orthogonally or diagonally; Bidah (8), placed in front of the other pieces: can move one space forward, or one space diagonally to capture. A Bidah may move two squares on its first move. Bidahs may capture en passant only when it is blocked from moving forward by another of the opponent's Bidahs; the blocked Bidah has the option in this scenario of capturing with an en passant move, with the option of capturing either of the two Bidahs in question. The Rajah, for its first move may move like a Kudah as long as it has never been checked. Players capture pieces by moving onto a space occupied by an opponent's piece. Castling occurs by moving the Rajah to the left or the right two squares, regardless of any intervening pieces; the Tor is not moved as part of this move. Promotion of Bidahs occur when they reach the opposite edge of the board, but only immediately if they reach the Tor's square. If it captures on the square next to the Tor's square, from the square in front of the Tor's square, it must move backward diagonally to the square in front of the Tor's square on a subsequent turn and continue before promotion. A Bidah reaching the Kudah's square must move backward diagonally once, to the right or left, before being promoted; a Bidah reaching the Gajah's square must move backward diagonally right or left two spaces, and a Bidah reaching the Raja or Mantri's square must move backward diagonally three squares before being promoted. Bidah's can be promoted to whatever piece the player wishes. If the Rajah can be captured on the opponent's next turn, it is in check. The Rajah must not be in check at the end of the player's turn. If this is impossible, it is checkmate and the opponent wins. If a player is reduced to only their Rajah, it can make the move of any piece.
(game "Main Chator (Selangor)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (if (= 0 (state at:(from))) (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(and (and (is Pending) (= (to) (value Pending))) (= (id "Pawn" Next) (what at:(ahead (from) Forward))))) (then (remove (ahead (last To) Backward)))) (move Step (directions {FR FL}) (to if:(and (and (is Pending) (= (to) (value Pending))) (= (id "Pawn" Next) (what at:(ahead (from) Forward))))) (then (remove (ahead (last From) (if (is Mover P1) N S)))))} (then (if (is In (last To) (sites Mover "Promotion")) (if (is In (last To) (sites Corners)) (moveAgain) (if (is In (last To) (intersection (sites Mover "Promotion") (expand (sites Corners)))) (set State at:(last To) 1) (if (is In (last To) (intersection (sites Mover "Promotion") (expand (sites Corners) steps:2))) (set State at:(last To) 2) (set State at:(last To) 3))))))) (move Step (directions {BR BL}) (to if:(is Empty (to))) (then (and (if (= 1 (state at:(last To))) (moveAgain)) (set State at:(last To) (- (state at:(last To)) 1))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (if (= (count Pieces Mover) 1) (or (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)))))) (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (or {(move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (and (= (state at:(from)) 1) (!= (value Player Mover) (mover))) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))) (then (set Value Mover (mover))))) (if (= (state at:(from)) 1) (move Hop (directions {E W}) (between if:True) (to if:(is Empty (to)))))} (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "King_noCross1" coord:"D1" state:1) (place "Ferz_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "King_noCross2" coord:"E8" state:1) (place "Ferz_noCross2" coord:"D8")}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Knight" "Elephant" "Rook" "Ferz_noCross"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (!= (next) (value Player Next)) (if (is Threatened (id "King_noCross" Next)) (set Value Next (next)))))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win))})))
###Description Played on an 8x8 board with pieces with specialized moves. The pieces are as follows, and placed on the outer rank in the following order, starting from the left corner and moving in, with the placement mirrored on the right side (the Mantri is placed to the right of the Rajah): Tor (2): can move any number of spaces orthogonally; Kudah (2): moves in any direction, one space orthogonally with one space forward diagonally, jumping over any intervening pieces; Gajah (2): can move any number of spaces diagonally; Rajah (1): can move one space orthogonally or diagonally; Mantri (1): can move any number of spaces orthogonally or diagonally; Bidah (8), placed in front of the other pieces: can move one space forward, or one space diagonally to capture. A Bidah may move two squares on its first move. Bidahs may capture en passant only when it is blocked from moving forward by another of the opponent's Bidahs; the blocked Bidah has the option in this scenario of capturing with an en passant move, with the option of capturing either of the two Bidahs in question. The Rajah, for its first move may move like a Kudah as long as it has never been checked. Players capture pieces by moving onto a space occupied by an opponent's piece. Castling occurs by moving the Rajah to the left or the right two squares, regardless of any intervening pieces; the Tor is not moved as part of this move. Promotion of Bidahs occur when they reach the opposite edge of the board, but only immediately if they reach the Tor's square. If it captures on the square next to the Tor's square, from the square in front of the Tor's square, it must move backward diagonally to the square in front of the Tor's square on a subsequent turn and continue before promotion. A Bidah reaching the Kudah's square must move backward diagonally once, to the right or left, before being promoted; a Bidah reaching the Gajah's square must move backward diagonally right or left two spaces, and a Bidah reaching the Raja or Mantri's square must move backward diagonally three squares before being promoted. Bidah's can be promoted to whatever piece the player wishes. If the Rajah can be captured on the opponent's next turn, it is in check. The Rajah must not be in check at the end of the player's turn. If this is impossible, it is checkmate and the opponent wins. If a player is reduced to only their Rajah, it can make the move of any piece. ###Ludii (game "Main Chator (Selangor)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (if (= 0 (state at:(from))) (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(and (and (is Pending) (= (to) (value Pending))) (= (id "Pawn" Next) (what at:(ahead (from) Forward))))) (then (remove (ahead (last To) Backward)))) (move Step (directions {FR FL}) (to if:(and (and (is Pending) (= (to) (value Pending))) (= (id "Pawn" Next) (what at:(ahead (from) Forward))))) (then (remove (ahead (last From) (if (is Mover P1) N S)))))} (then (if (is In (last To) (sites Mover "Promotion")) (if (is In (last To) (sites Corners)) (moveAgain) (if (is In (last To) (intersection (sites Mover "Promotion") (expand (sites Corners)))) (set State at:(last To) 1) (if (is In (last To) (intersection (sites Mover "Promotion") (expand (sites Corners) steps:2))) (set State at:(last To) 2) (set State at:(last To) 3))))))) (move Step (directions {BR BL}) (to if:(is Empty (to))) (then (and (if (= 1 (state at:(last To))) (moveAgain)) (set State at:(last To) (- (state at:(last To)) 1))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (if (= (count Pieces Mover) 1) (or (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)))))) (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (or {(move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (and (= (state at:(from)) 1) (!= (value Player Mover) (mover))) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))) (then (set Value Mover (mover))))) (if (= (state at:(from)) 1) (move Hop (directions {E W}) (between if:True) (to if:(is Empty (to)))))} (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "King_noCross1" coord:"D1" state:1) (place "Ferz_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "King_noCross2" coord:"E8" state:1) (place "Ferz_noCross2" coord:"D8")}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Knight" "Elephant" "Rook" "Ferz_noCross"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (!= (next) (value Player Next)) (if (is Threatened (id "King_noCross" Next)) (set Value Next (next)))))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win))})))
Played on an 8x8 board with pieces with specialized moves. The pieces are as follows, and placed on the outer rank in the following order, starting from the left corner and moving in, with the placement mirrored on the right side (the Mautri is placed to the right of the Rajah): Tor (2): can move any number of spaces orthogonally; Kudah (2): moves in any direction, one space orthogonally with one space forward diagonally, jumping over any intervening pieces; Gajah (2): can move any number of spaces diagonally; Rajah (1): can move one space orthogonally or diagonally; Mautri (1): can move any number of spaces orthogonally or diagonally; Bidah (8), placed in front of the other pieces: can move one space forward, or one space diagonally to capture. The Bidah are placed on the second file. When first checked, the Rajah may move like a Kudah, or move two spaces in any direction. Players capture pieces by moving onto a space occupied by an opponent's piece. Castling may occur in two separate moves: the Tor moves next to the Rajah, and if the Rajah is checked, it may move to the other side of the Tor. Promotion of Bidahs occur when they reach the opposite edge of the board, but only immediately if they reach the Tor's square. Pawns reaching any other square must make two further moves before they can be promoted; the first must be a lateral orthogonal move, the second may be lateral orthogonal or diagonal. If the Rajah can be captured on the opponent's next turn, it is in check. The Rajah must not be in check at the end of the player's turn. If this is impossible, it is checkmate and the opponent wins.
(game "Main Chator" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1)))) (if (is Pending) (or {(move Slide (between (exact 2)) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (if (is In (from) (sites {"E8" "D1"})) (or (if (and {(is Empty (ahead (from) steps:2 W)) (= (what at:(ahead (from) W)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) W))))}) (move (from) (to (ahead (from) steps:2 W)))) (if (and {(is Empty (ahead (from) steps:2 E)) (= (what at:(ahead (from) E)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) E))))}) (move (from) (to (ahead (from) steps:2 E))))))})))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (and (not (= 1 (state at:(last To)))) (not (is In (last To) (sites {"C1" "E1" "D8" "F8"})))) (set State at:(last To) 1))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" (if (= 1 (state at:(from))) (move Step (directions {Rightward Leftward}) (to if:(is Empty (to))) (then (set State at:(last To) 2))) (if (= 2 (state at:(from))) (move Step (directions {BR BL Rightward Leftward}) (to if:(is Empty (to))) (then (promote (last To) (piece "Queen") Mover))) (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 (is In (last To) (sites Corners)) (promote (last To) (piece "Queen") Mover) (set State at:(last To) 1)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Queen1" coord:"E1") (place "King_noCross1" coord:"D1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (is Threatened (id "King_noCross" Next)) (if (not (= 1 (state at:(where "King_noCross" Next)))) (and (set State at:(where "King_noCross" Next) 1) (set Pending))))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description Played on an 8x8 board with pieces with specialized moves. The pieces are as follows, and placed on the outer rank in the following order, starting from the left corner and moving in, with the placement mirrored on the right side (the Mautri is placed to the right of the Rajah): Tor (2): can move any number of spaces orthogonally; Kudah (2): moves in any direction, one space orthogonally with one space forward diagonally, jumping over any intervening pieces; Gajah (2): can move any number of spaces diagonally; Rajah (1): can move one space orthogonally or diagonally; Mautri (1): can move any number of spaces orthogonally or diagonally; Bidah (8), placed in front of the other pieces: can move one space forward, or one space diagonally to capture. The Bidah are placed on the second file. When first checked, the Rajah may move like a Kudah, or move two spaces in any direction. Players capture pieces by moving onto a space occupied by an opponent's piece. Castling may occur in two separate moves: the Tor moves next to the Rajah, and if the Rajah is checked, it may move to the other side of the Tor. Promotion of Bidahs occur when they reach the opposite edge of the board, but only immediately if they reach the Tor's square. Pawns reaching any other square must make two further moves before they can be promoted; the first must be a lateral orthogonal move, the second may be lateral orthogonal or diagonal. If the Rajah can be captured on the opponent's next turn, it is in check. The Rajah must not be in check at the end of the player's turn. If this is impossible, it is checkmate and the opponent wins. ###Ludii (game "Main Chator" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1)))) (if (is Pending) (or {(move Slide (between (exact 2)) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (if (is In (from) (sites {"E8" "D1"})) (or (if (and {(is Empty (ahead (from) steps:2 W)) (= (what at:(ahead (from) W)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) W))))}) (move (from) (to (ahead (from) steps:2 W)))) (if (and {(is Empty (ahead (from) steps:2 E)) (= (what at:(ahead (from) E)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) E))))}) (move (from) (to (ahead (from) steps:2 E))))))})))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (and (not (= 1 (state at:(last To)))) (not (is In (last To) (sites {"C1" "E1" "D8" "F8"})))) (set State at:(last To) 1))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" (if (= 1 (state at:(from))) (move Step (directions {Rightward Leftward}) (to if:(is Empty (to))) (then (set State at:(last To) 2))) (if (= 2 (state at:(from))) (move Step (directions {BR BL Rightward Leftward}) (to if:(is Empty (to))) (then (promote (last To) (piece "Queen") Mover))) (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 (is In (last To) (sites Corners)) (promote (last To) (piece "Queen") Mover) (set State at:(last To) 1)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Queen1" coord:"E1") (place "King_noCross1" coord:"D1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (is Threatened (id "King_noCross" Next)) (if (not (= 1 (state at:(where "King_noCross" Next)))) (and (set State at:(where "King_noCross" Next) 1) (set Pending))))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
8x8 board. Each player begins with sixteen pieces with special moves: Khoon (x1): moves orthogonally in any direction; Met (x1): placed to the right of the Khoon, moves one square orthogonally or diagonally forward, or one square diagonally backward, may move two squares orthogonally forward on the first move; Khon (x2): moves one square forward orthogonally or diagonally, may move backward diagonally but not to capture; Maa (x2): moves as a Chess knight; Rooa (x2): moves orthogonally any distance; Bea (x8): move forward one space, but capture diagonally. When they reach the opposite edge of the board, they are promoted to Met. They begin on the third row of the board with respect to each player. When the Khoon is threatened, it is in check and the player's next move must be to remove the check. If the player cannot, it is checkmate and the player loses. If there are no legal moves, the game is a draw. If one player has only a king left, the opponent must checkmate it within a set number of turns, based on the highest ranking piece left on the board, minus the total number of pieces on the board. The values are: two Rooa: eight; one Rooa, sixteen, two Khon, 22; one Khon, 44; two Maa, 33; one Maa, 66; Met and two Bea, 88; one each of Met, Rooa, Maa, Khon, sixteen. With only a Met, the game is a draw.
(game "Mak Ruk" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Bishop_noCross" 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 "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 2)) (place "Pawn2" (sites Row 5)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"E1" state:1) (place "King_noCross1" coord:"D1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8" state:1) (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw)) (if (and {(= (count Pieces Next) 1) (= (count Pieces Mover) 2) (!= (where "Ferz_noCross" Mover) -1)}) (result Mover Draw))})))
###Description 8x8 board. Each player begins with sixteen pieces with special moves: Khoon (x1): moves orthogonally in any direction; Met (x1): placed to the right of the Khoon, moves one square orthogonally or diagonally forward, or one square diagonally backward, may move two squares orthogonally forward on the first move; Khon (x2): moves one square forward orthogonally or diagonally, may move backward diagonally but not to capture; Maa (x2): moves as a Chess knight; Rooa (x2): moves orthogonally any distance; Bea (x8): move forward one space, but capture diagonally. When they reach the opposite edge of the board, they are promoted to Met. They begin on the third row of the board with respect to each player. When the Khoon is threatened, it is in check and the player's next move must be to remove the check. If the player cannot, it is checkmate and the player loses. If there are no legal moves, the game is a draw. If one player has only a king left, the opponent must checkmate it within a set number of turns, based on the highest ranking piece left on the board, minus the total number of pieces on the board. The values are: two Rooa: eight; one Rooa, sixteen, two Khon, 22; one Khon, 44; two Maa, 33; one Maa, 66; Met and two Bea, 88; one each of Met, Rooa, Maa, Khon, sixteen. With only a Met, the game is a draw. ###Ludii (game "Mak Ruk" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Bishop_noCross" 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 "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 2)) (place "Pawn2" (sites Row 5)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"E1" state:1) (place "King_noCross1" coord:"D1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8" state:1) (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw)) (if (and {(= (count Pieces Next) 1) (= (count Pieces Mover) 2) (!= (where "Ferz_noCross" Mover) -1)}) (result Mover Draw))})))
8x8 board, not checkered. Pieces, their number, and moves are as follows: Ang/Sdaach ("King")x1: moves on space in any direction, on its first move it may move like a Chess knight; Neang ("Queen")x1; moves diagonally one space, on its first move it may move two spaces forward orthogonally, jumping over the intervening space; Koul ("General")x2: move one space diagonally or one space orthogonally forward; Ses ("Horse")x2: moves like a Chess knight; Tuuk ("Boat")x2: move orthogonally any distance; Trey ("Fish")x8: move orthogonally forward one space, diagonally forward one space to capture. When a Trey reaches the rank where the opponent's Treys begin the game, it is promoted to a Neang. The pieces begin arranged along the edge of the board, in the following order: Tuuk, Ses, Koul, Neang, Ang, Koul, Ses, Tuuk. The Treys are arranged on the third rank (I.e., there is an empty row of spaces between the Treys and the other pieces). The opponent's pieces have the same arrangement on the opposite side of the board. Players take turns moving pieces. When a piece is moved to the same space on which a piece belonging to the opponent is positioned, the opposing piece is taken. If an Ang can be taken on the opponent's next move, it is in "Ouk," and the player must either move the Ang to a safe place, capture the threatening piece, or move another piece in the way of the threatened capture. If it is not possible to remove the Ang from this state, the opponent wins by Ouk Ngueb, "checkmate." A draw occurs when the Ang has no legal move but it not in Ouk.
(game "Ouk Chatrang" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Boat" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Ferz_noCross" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step Forward (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "Knight" 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 "Fish" 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 "Queen") Mover))))) (piece "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Hop Forward (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (regions "Promotion" P1 (sites Row 5)) (regions "Promotion" P2 (sites Row 2))}) (rules (start {(place "Fish1" (sites Row 2)) (place "Fish2" (sites Row 5)) (place "Boat1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Ferz_noCross1" {"C1" "F1"}) (place "Queen1" coord:"D1" state:1) (place "King_noCross1" coord:"E1" state:1) (place "Boat2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Ferz_noCross2" {"C8" "F8"}) (place "Queen2" coord:"D8" state:1) (place "King_noCross2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Draw))})))
###Description 8x8 board, not checkered. Pieces, their number, and moves are as follows: Ang/Sdaach ("King")x1: moves on space in any direction, on its first move it may move like a Chess knight; Neang ("Queen")x1; moves diagonally one space, on its first move it may move two spaces forward orthogonally, jumping over the intervening space; Koul ("General")x2: move one space diagonally or one space orthogonally forward; Ses ("Horse")x2: moves like a Chess knight; Tuuk ("Boat")x2: move orthogonally any distance; Trey ("Fish")x8: move orthogonally forward one space, diagonally forward one space to capture. When a Trey reaches the rank where the opponent's Treys begin the game, it is promoted to a Neang. The pieces begin arranged along the edge of the board, in the following order: Tuuk, Ses, Koul, Neang, Ang, Koul, Ses, Tuuk. The Treys are arranged on the third rank (I.e., there is an empty row of spaces between the Treys and the other pieces). The opponent's pieces have the same arrangement on the opposite side of the board. Players take turns moving pieces. When a piece is moved to the same space on which a piece belonging to the opponent is positioned, the opposing piece is taken. If an Ang can be taken on the opponent's next move, it is in "Ouk," and the player must either move the Ang to a safe place, capture the threatening piece, or move another piece in the way of the threatened capture. If it is not possible to remove the Ang from this state, the opponent wins by Ouk Ngueb, "checkmate." A draw occurs when the Ang has no legal move but it not in Ouk. ###Ludii (game "Ouk Chatrang" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Boat" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Ferz_noCross" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step Forward (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))) (piece "Knight" 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 "Fish" 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 "Queen") Mover))))) (piece "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Hop Forward (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (regions "Promotion" P1 (sites Row 5)) (regions "Promotion" P2 (sites Row 2))}) (rules (start {(place "Fish1" (sites Row 2)) (place "Fish2" (sites Row 5)) (place "Boat1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Ferz_noCross1" {"C1" "F1"}) (place "Queen1" coord:"D1" state:1) (place "King_noCross1" coord:"E1" state:1) (place "Boat2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Ferz_noCross2" {"C8" "F8"}) (place "Queen2" coord:"D8" state:1) (place "King_noCross2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Draw))})))
8x8 board, marked as in Chaturanga. Pieces move according to specialized moves, as follows: Pawns (x8): can move one space forward, or one space diagonally to capture. The pawns in front of the Raja, Vizier, or Chariot may move two spaces on their first move, but only if the piece which began on the space behind them remains on that spot. Chariot (or Boat): any number of spaces orthogonally; Elephant (x2): can move any number of spaces diagonally; Horse (2): moves in any direction, one space orthogonally with one space forward diagonally; Vizier (x1): can move any number of spaces orthogonally or diagonally; Raja (x1): can move one space orthogonally or diagonally, but can also move like the horse once in the game, if it has not yet been checked. It cannot take a piece with this move. The pieces are arranged as in Chess, except the Vizier is place to the left of the Raja on both sides. Players capture pieces by moving onto a space occupied by an opponent's piece. When a Pawn reaches the opposite edge of the board from where it started, it may be promoted to the more powerful piece that begins the game in that position, but only if one of these belonging to the player has already been captured. If this has not happened, the pawn cannot move to the final row. When promoted to a Horse, the piece may immediately make a Horse's move. When a player can capture the opponent's Raja on the next turn, the Raja is in Check, the opponent's next move must free the Raja from Check. If the opponent cannot, it is Checkmate and the player wins. If a player captures all of the opponent's pieces aside from the Raja, it is a draw, or Boorj. When both players are left with only a Raja, it is a draw. Players are not allowed to stalemate the opponent. Perpetual check is not allowed, a player must make another move if such a state is entered.
(game "Parsi Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (if (= 1 (state at:(ahead (from) Backward))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))) (move Step Forward (to if:(and (or (not (is In (to) (sites Mover "Promotion"))) (and (is In (to) (sites Mover "Promotion")) (if (and (is In (to) (sites Corners)) (< (count Sites in:(sites Occupied by:Mover component:"Boat")) 2)) True (if (and (or (= (column of:(to)) 1) (= (column of:(to)) 6)) (< (count Sites in:(sites Occupied by:Mover component:"Knight")) 2)) True (if (and (or (= (column of:(to)) 2) (= (column of:(to)) 5)) (< (count Sites in:(sites Occupied by:Mover component:"Elephant")) 2)) True (if (and (or (and (is Mover P1) (= (column of:(to)) 3)) (and (is Mover P2) (= (column of:(to)) 4))) (< (count Sites in:(sites Occupied by:Mover component:"Ferz_noCross")) 1)) True False)))))) (is Empty (to))))) (move Step (directions {FR FL}) (to if:(and (or (not (is In (to) (sites Mover "Promotion"))) (and (is In (to) (sites Mover "Promotion")) (if (and (is In (to) (sites Corners)) (< (count Sites in:(sites Occupied by:Mover component:"Boat")) 2)) True (if (and (or (= (column of:(to)) 1) (= (column of:(to)) 6)) (< (count Sites in:(sites Occupied by:Mover component:"Knight")) 2)) True (if (and (or (= (column of:(to)) 2) (= (column of:(to)) 5)) (< (count Sites in:(sites Occupied by:Mover component:"Elephant")) 2)) True (if (and (or (and (is Mover P1) (= (column of:(to)) 3)) (and (is Mover P2) (= (column of:(to)) 4))) (< (count Sites in:(sites Occupied by:Mover component:"Ferz_noCross")) 1)) True False)))))) (is Enemy (who at:(to)))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (if (is In (last To) (sites Corners)) (id "Boat" Mover) (if (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (id "Knight" Mover) (if (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (id "Elephant" Mover) (if (or (and (is Mover P2) (= (column of:(last To)) 4)) (and (is Mover P1) (= (column of:(last To)) 3))) (id "Ferz_noCross" Mover) (id "King_noCross" Mover))))))))))) (piece "Boat" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (!= (value Player Mover) (mover)) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))) (then (set Value Mover (mover))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Boat1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1" state:1) (place "King_noCross1" coord:"E1" state:1) (place "Boat2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"E8" state:1) (place "King_noCross2" coord:"D8" state:1)}) (play (do (forEach Piece) ifAfterwards:(and (can Move (forEach Piece Next)) (not (is Threatened (id "King_noCross" Mover)))) (then (if (!= (next) (value Player Next)) (if (is Threatened (id "King_noCross" Next)) (set Value Next (next))))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= 1 (count Pieces Next)) (result Mover Draw))})))
###Description 8x8 board, marked as in Chaturanga. Pieces move according to specialized moves, as follows: Pawns (x8): can move one space forward, or one space diagonally to capture. The pawns in front of the Raja, Vizier, or Chariot may move two spaces on their first move, but only if the piece which began on the space behind them remains on that spot. Chariot (or Boat): any number of spaces orthogonally; Elephant (x2): can move any number of spaces diagonally; Horse (2): moves in any direction, one space orthogonally with one space forward diagonally; Vizier (x1): can move any number of spaces orthogonally or diagonally; Raja (x1): can move one space orthogonally or diagonally, but can also move like the horse once in the game, if it has not yet been checked. It cannot take a piece with this move. The pieces are arranged as in Chess, except the Vizier is place to the left of the Raja on both sides. Players capture pieces by moving onto a space occupied by an opponent's piece. When a Pawn reaches the opposite edge of the board from where it started, it may be promoted to the more powerful piece that begins the game in that position, but only if one of these belonging to the player has already been captured. If this has not happened, the pawn cannot move to the final row. When promoted to a Horse, the piece may immediately make a Horse's move. When a player can capture the opponent's Raja on the next turn, the Raja is in Check, the opponent's next move must free the Raja from Check. If the opponent cannot, it is Checkmate and the player wins. If a player captures all of the opponent's pieces aside from the Raja, it is a draw, or Boorj. When both players are left with only a Raja, it is a draw. Players are not allowed to stalemate the opponent. Perpetual check is not allowed, a player must make another move if such a state is entered. ###Ludii (game "Parsi Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (if (= 1 (state at:(ahead (from) Backward))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))) (move Step Forward (to if:(and (or (not (is In (to) (sites Mover "Promotion"))) (and (is In (to) (sites Mover "Promotion")) (if (and (is In (to) (sites Corners)) (< (count Sites in:(sites Occupied by:Mover component:"Boat")) 2)) True (if (and (or (= (column of:(to)) 1) (= (column of:(to)) 6)) (< (count Sites in:(sites Occupied by:Mover component:"Knight")) 2)) True (if (and (or (= (column of:(to)) 2) (= (column of:(to)) 5)) (< (count Sites in:(sites Occupied by:Mover component:"Elephant")) 2)) True (if (and (or (and (is Mover P1) (= (column of:(to)) 3)) (and (is Mover P2) (= (column of:(to)) 4))) (< (count Sites in:(sites Occupied by:Mover component:"Ferz_noCross")) 1)) True False)))))) (is Empty (to))))) (move Step (directions {FR FL}) (to if:(and (or (not (is In (to) (sites Mover "Promotion"))) (and (is In (to) (sites Mover "Promotion")) (if (and (is In (to) (sites Corners)) (< (count Sites in:(sites Occupied by:Mover component:"Boat")) 2)) True (if (and (or (= (column of:(to)) 1) (= (column of:(to)) 6)) (< (count Sites in:(sites Occupied by:Mover component:"Knight")) 2)) True (if (and (or (= (column of:(to)) 2) (= (column of:(to)) 5)) (< (count Sites in:(sites Occupied by:Mover component:"Elephant")) 2)) True (if (and (or (and (is Mover P1) (= (column of:(to)) 3)) (and (is Mover P2) (= (column of:(to)) 4))) (< (count Sites in:(sites Occupied by:Mover component:"Ferz_noCross")) 1)) True False)))))) (is Enemy (who at:(to)))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (if (is In (last To) (sites Corners)) (id "Boat" Mover) (if (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (id "Knight" Mover) (if (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (id "Elephant" Mover) (if (or (and (is Mover P2) (= (column of:(last To)) 4)) (and (is Mover P1) (= (column of:(last To)) 3))) (id "Ferz_noCross" Mover) (id "King_noCross" Mover))))))))))) (piece "Boat" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (!= (value Player Mover) (mover)) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))) (then (set Value Mover (mover))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Boat1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1" state:1) (place "King_noCross1" coord:"E1" state:1) (place "Boat2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"E8" state:1) (place "King_noCross2" coord:"D8" state:1)}) (play (do (forEach Piece) ifAfterwards:(and (can Move (forEach Piece Next)) (not (is Threatened (id "King_noCross" Mover)))) (then (if (!= (next) (value Player Next)) (if (is Threatened (id "King_noCross" Next)) (set Value Next (next))))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= 1 (count Pieces Next)) (result Mover Draw))})))
8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): Any distance orthogonally or diagonally.]. 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): Any distance diagonally. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. The first move must be the Fers's Sarbaz, which moves two spaces forward. Castling can happen in three moves, moving the Shah forward or backward once orthogonally and once with the Asb's move, and moving the Rukh to the Shah's former space. Castling can also be done on the Fers's side, but moving the Rukh to the Fers's space. When a piece moves to a space occupied by an opponent's piece, the opponent's piece is captured. If the Shah can be captured on the opponent's next turn, it is in check. A player's Shah must not be in check at the end of their turn. If this is impossible, it is checkmate and the opponent wins.
(game "Persian Chess with a Queen" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (or {(move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (and (= 1 (state at:(last To))) (= (last To) (mapEntry "AheadKing" Mover))) (set State at:(last To) 2) (if (!= (state at:(last To)) 0) (set State at:(last To) 0))))) (if (and {(= 1 (state at:(from))) (= 1 (state at:(mapEntry "RookRight" Mover))) (is Empty (mapEntry "KnightKingRightForward" Mover))}) (move (from) (to (mapEntry "KnightKingRightForward" Mover)) (then (if (!= (state at:(last To)) 0) (set State at:(last To) 0))))) (if (and {(= 1 (state at:(from))) (= 1 (state at:(mapEntry "RookLeft" Mover))) (is Empty (mapEntry "KnightKingLeftForward" Mover))}) (move (from) (to (mapEntry "KnightKingLeftForward" Mover)) (then (if (!= (state at:(last To)) 0) (set State at:(last To) 0))))) (if (and {(= 2 (state at:(from))) (= 2 (state at:(regionSite (sites Start (piece (id "King" Mover))) index:0)))}) (move (from) (to (mapEntry "KnightKingLeftBackward" Mover)) (then (set State at:(last To) 0)))) (if (and {(= 2 (state at:(from))) (= 3 (state at:(regionSite (sites Start (piece (id "King" Mover))) index:0)))}) (move (from) (to (mapEntry "KnightKingRightBackward" Mover)) (then (set State at:(last To) 0))))})) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (if (and (is In (last To) (sites Start (piece (id "King" Mover)))) (= 2 (state at:(where "King" Mover)))) (if (= (last From) (mapEntry "RookLeft" Mover)) (set State at:(last To) 2) (set State at:(last To) 3)) (set State at:(last To) 0))))) maxState:3) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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)))))})) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (map "AheadKing" {(pair 1 "E2") (pair 2 "E7")}) (map "KnightKingRightForward" {(pair 1 "G2") (pair 2 "G7")}) (map "KnightKingLeftForward" {(pair 1 "C2") (pair 2 "C7")}) (map "KnightKingRightBackward" {(pair 1 "G1") (pair 2 "G8")}) (map "KnightKingLeftBackward" {(pair 1 "C1") (pair 2 "C8")})}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): Any distance orthogonally or diagonally.]. 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): Any distance diagonally. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. The first move must be the Fers's Sarbaz, which moves two spaces forward. Castling can happen in three moves, moving the Shah forward or backward once orthogonally and once with the Asb's move, and moving the Rukh to the Shah's former space. Castling can also be done on the Fers's side, but moving the Rukh to the Fers's space. When a piece moves to a space occupied by an opponent's piece, the opponent's piece is captured. If the Shah can be captured on the opponent's next turn, it is in check. A player's Shah must not be in check at the end of their turn. If this is impossible, it is checkmate and the opponent wins. ###Ludii (game "Persian Chess with a Queen" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (or {(move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (and (= 1 (state at:(last To))) (= (last To) (mapEntry "AheadKing" Mover))) (set State at:(last To) 2) (if (!= (state at:(last To)) 0) (set State at:(last To) 0))))) (if (and {(= 1 (state at:(from))) (= 1 (state at:(mapEntry "RookRight" Mover))) (is Empty (mapEntry "KnightKingRightForward" Mover))}) (move (from) (to (mapEntry "KnightKingRightForward" Mover)) (then (if (!= (state at:(last To)) 0) (set State at:(last To) 0))))) (if (and {(= 1 (state at:(from))) (= 1 (state at:(mapEntry "RookLeft" Mover))) (is Empty (mapEntry "KnightKingLeftForward" Mover))}) (move (from) (to (mapEntry "KnightKingLeftForward" Mover)) (then (if (!= (state at:(last To)) 0) (set State at:(last To) 0))))) (if (and {(= 2 (state at:(from))) (= 2 (state at:(regionSite (sites Start (piece (id "King" Mover))) index:0)))}) (move (from) (to (mapEntry "KnightKingLeftBackward" Mover)) (then (set State at:(last To) 0)))) (if (and {(= 2 (state at:(from))) (= 3 (state at:(regionSite (sites Start (piece (id "King" Mover))) index:0)))}) (move (from) (to (mapEntry "KnightKingRightBackward" Mover)) (then (set State at:(last To) 0))))})) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (if (and (is In (last To) (sites Start (piece (id "King" Mover)))) (= 2 (state at:(where "King" Mover)))) (if (= (last From) (mapEntry "RookLeft" Mover)) (set State at:(last To) 2) (set State at:(last To) 3)) (set State at:(last To) 0))))) maxState:3) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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)))))})) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (map "AheadKing" {(pair 1 "E2") (pair 2 "E7")}) (map "KnightKingRightForward" {(pair 1 "G2") (pair 2 "G7")}) (map "KnightKingLeftForward" {(pair 1 "C2") (pair 2 "C7")}) (map "KnightKingRightBackward" {(pair 1 "G1") (pair 2 "G8")}) (map "KnightKingLeftBackward" {(pair 1 "C1") (pair 2 "C8")})}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
10x10 board. 22 pieces per player. Pieces begin on the board in the following arrangement, and with the following movements: Outer row, from left corner: Rukh: moves orthogonally any distance; Ghora: moves orthogonally one space and then diagonally another space, jumping over the first space; Fil: moves diagonally any distance; Wazir: moves diagonally or orthogonally any distance; Shahzada: can move like the Wazir and like the Ghora; Padshah: moves one space in any direction; Kotwal: moves like the Shahzada; Fil, Ghora, Rukh. In the next row, the central two squares are occupied by the Urdabegini: move one space in the direction of the opponent's Padshah; the other spaces are occupied by Paidal: moves one square forward orthogonally or one diagonally to capture. The central two squares of the third row contain two more Ghora. Players alternate turns moving a piece to a space on the board. If one of the opponent's pieces is on the space to which a player moves their piece, the opponent's piece is captured. If the Padshah can be captured on the opponent's next turn, it is in check. The Padshah cannot remain in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins.
(game "Qatranj" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Commoner" Each (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Mann" Each (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Wazir" Each (do (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) ifAfterwards:(> (count Steps (last From) (where "King_noCross" Next)) (count Steps (last To) (where "King_noCross" Next))))) (piece "Pawn" 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)))))))}) (rules (start {(place "Rook1" (sites {"A1" "J1"})) (place "Rook2" (sites {"A10" "J10"})) (place "Knight1" (sites {"B1" "I1" "E3" "F3"})) (place "Knight2" (sites {"B10" "I10" "E8" "F8"})) (place "Bishop_noCross1" (sites {"C1" "H1"})) (place "Bishop_noCross2" (sites {"C10" "H10"})) (place "Queen1" coord:"D1") (place "Queen2" coord:"G10") (place "Commoner1" coord:"E1") (place "Commoner2" coord:"F10") (place "King_noCross1" coord:"F1") (place "King_noCross2" coord:"E10") (place "Mann1" coord:"G1") (place "Mann2" coord:"D10") (place "Wazir1" (sites {"E2" "F2"})) (place "Wazir2" (sites {"E9" "F9"})) (place "Pawn1" (difference (sites Row 1) (sites {"E2" "F2"}))) (place "Pawn2" (difference (sites Row 8) (sites {"E9" "F9"})))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 10x10 board. 22 pieces per player. Pieces begin on the board in the following arrangement, and with the following movements: Outer row, from left corner: Rukh: moves orthogonally any distance; Ghora: moves orthogonally one space and then diagonally another space, jumping over the first space; Fil: moves diagonally any distance; Wazir: moves diagonally or orthogonally any distance; Shahzada: can move like the Wazir and like the Ghora; Padshah: moves one space in any direction; Kotwal: moves like the Shahzada; Fil, Ghora, Rukh. In the next row, the central two squares are occupied by the Urdabegini: move one space in the direction of the opponent's Padshah; the other spaces are occupied by Paidal: moves one square forward orthogonally or one diagonally to capture. The central two squares of the third row contain two more Ghora. Players alternate turns moving a piece to a space on the board. If one of the opponent's pieces is on the space to which a player moves their piece, the opponent's piece is captured. If the Padshah can be captured on the opponent's next turn, it is in check. The Padshah cannot remain in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. ###Ludii (game "Qatranj" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Commoner" Each (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Mann" Each (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Wazir" Each (do (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) ifAfterwards:(> (count Steps (last From) (where "King_noCross" Next)) (count Steps (last To) (where "King_noCross" Next))))) (piece "Pawn" 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)))))))}) (rules (start {(place "Rook1" (sites {"A1" "J1"})) (place "Rook2" (sites {"A10" "J10"})) (place "Knight1" (sites {"B1" "I1" "E3" "F3"})) (place "Knight2" (sites {"B10" "I10" "E8" "F8"})) (place "Bishop_noCross1" (sites {"C1" "H1"})) (place "Bishop_noCross2" (sites {"C10" "H10"})) (place "Queen1" coord:"D1") (place "Queen2" coord:"G10") (place "Commoner1" coord:"E1") (place "Commoner2" coord:"F10") (place "King_noCross1" coord:"F1") (place "King_noCross2" coord:"E10") (place "Mann1" coord:"G1") (place "Mann2" coord:"D10") (place "Wazir1" (sites {"E2" "F2"})) (place "Wazir2" (sites {"E9" "F9"})) (place "Pawn1" (difference (sites Row 1) (sites {"E2" "F2"}))) (place "Pawn2" (difference (sites Row 8) (sites {"E9" "F9"})))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
8x8 board. The pieces move as follows, with the number per player: King (x1): moves one space orthogonally or diagonally; Counselor (x1): One square diagonally, but may move two spaces forward orthogonally on the first move, jumping over the Soldier in front of it on the first move of the game; Rook (x2): Any number of spaces orthogonally; Elephant (x2): Two squares diagonally, jumping over the first, cannot capture another Elephant; Horse (x2): Moves as a chess knight. Soldier (x8): Moves one space forward orthogonally; one space forward diagonally to capture. The Soldier in front of the Counselor may jump to the space in front of the Counselor when it has used its special move on the first turn, this must be done as the second move of the game, i.e. on the next turn after the Counselor had made its special move. No en passant. Soldiers promote to Counselor when reaching the eighth rank. No castling. Stalemate results in a win for player causing it. The player who checkmates the king wins.
(game "Rumi Shatranj" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "Elephant" Next))))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) phases:{(phase "OpeningCounselor" (play (forEach Piece "Ferz_noCross" (move Hop Forward (between if:True) (to if:(is Empty (to)) (apply (remove (to))))))) (nextPhase Mover "OpeningSoldier")) (phase "OpeningSoldier" (play (forEach Piece "Pawn" (if (is In (from) (sites {"D2" "D7"})) (move Hop Forward (between if:True) (to if:(is Empty (to)) (apply (remove (to)))))))) (nextPhase Mover "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Promote (last To) (piece "Ferz_noCross") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))))} (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
###Description 8x8 board. The pieces move as follows, with the number per player: King (x1): moves one space orthogonally or diagonally; Counselor (x1): One square diagonally, but may move two spaces forward orthogonally on the first move, jumping over the Soldier in front of it on the first move of the game; Rook (x2): Any number of spaces orthogonally; Elephant (x2): Two squares diagonally, jumping over the first, cannot capture another Elephant; Horse (x2): Moves as a chess knight. Soldier (x8): Moves one space forward orthogonally; one space forward diagonally to capture. The Soldier in front of the Counselor may jump to the space in front of the Counselor when it has used its special move on the first turn, this must be done as the second move of the game, i.e. on the next turn after the Counselor had made its special move. No en passant. Soldiers promote to Counselor when reaching the eighth rank. No castling. Stalemate results in a win for player causing it. The player who checkmates the king wins. ###Ludii (game "Rumi Shatranj" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "Elephant" Next))))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) phases:{(phase "OpeningCounselor" (play (forEach Piece "Ferz_noCross" (move Hop Forward (between if:True) (to if:(is Empty (to)) (apply (remove (to))))))) (nextPhase Mover "OpeningSoldier")) (phase "OpeningSoldier" (play (forEach Piece "Pawn" (if (is In (from) (sites {"D2" "D7"})) (move Hop Forward (between if:True) (to if:(is Empty (to)) (apply (remove (to)))))))) (nextPhase Mover "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Promote (last To) (piece "Ferz_noCross") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))))} (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
8x8 board. The pieces move as follows, with the number per player: 1 x Negus (king): moves one space orthogonally or diagonally. 1 x Ferz (counselor): One square diagonally. 2 x Der (castle): Any number of spaces orthogonally. 2 x Säbä (man): Three squares diagonally, jumping over the first two. 2 x Färäs (horse): Moves as a chess knight. 8 x Médéq: Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Ferz when reaching the eighth rank. No castling, except in the opening phase. In the opening phase, players play simultaneously at will, with no turn structure, until the first piece is captured, at which point turns alternate for the main phase of the game. Castling is allowed during the opening phase, and pawns may move any distance forward. If only a player's Negus remains, the opponent must checkmate it in ten moves or less, or the game is a stalemate. The player who checkmates the king wins.
(game "Santaraj" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Castle" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Ferz_noCross" 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 "Knight" 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 "Pawn" 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 "Queen") Mover))))) (piece "Queen" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Castle1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Ferz_noCross1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Castle2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Ferz_noCross2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (and (> (count Pieces P1) 1) (> (count Pieces P2) 1)) (set Counter))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and (or (= (count Pieces P1) 1) (= (count Pieces P2) 1)) (= (counter) 20)) (result Mover Draw))})))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x Negus (king): moves one space orthogonally or diagonally. 1 x Ferz (counselor): One square diagonally. 2 x Der (castle): Any number of spaces orthogonally. 2 x Säbä (man): Three squares diagonally, jumping over the first two. 2 x Färäs (horse): Moves as a chess knight. 8 x Médéq: Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Ferz when reaching the eighth rank. No castling, except in the opening phase. In the opening phase, players play simultaneously at will, with no turn structure, until the first piece is captured, at which point turns alternate for the main phase of the game. Castling is allowed during the opening phase, and pawns may move any distance forward. If only a player's Negus remains, the opponent must checkmate it in ten moves or less, or the game is a stalemate. The player who checkmates the king wins. ###Ludii (game "Santaraj" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Castle" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Ferz_noCross" 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 "Knight" 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 "Pawn" 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 "Queen") Mover))))) (piece "Queen" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Castle1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Ferz_noCross1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Castle2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Ferz_noCross2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (and (> (count Pieces P1) 1) (> (count Pieces P2) 1)) (set Counter))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and (or (= (count Pieces P1) 1) (= (count Pieces P2) 1)) (= (counter) 20)) (result Mover Draw))})))
Played on an 8x8 board. One player plays as one Raja, the other with the following pieces: 8 Bhata (or Padati; move like Chess pawns but without being able to move two on the first turn); 2 Ashva (horses; move like Chess knights); 2 Gaja (elephants; two spaces in any orthogonal direction, jumping over the first square); 2 Ratha (chariots; moves like a rook in chess); 1 Mantri (counselor; moves one square diagonally in any direction); 1 Raja (king; moves one square in any direction). These are set up along one edge of the board: Ratha-Ashva-Gaja-Mantri-Raja-Gaja-Ashva-Ratha, with the eight Bhata lined up in the row in front of these, as in chess. The player with the full complement of pieces rolls a six-sided die to determine which piece to move: 6=Raja, 5= Mantri, 4=Gaja, 3 = Ashva, 2=Ratha, 1= Bhata. The player with the single Raja can move it according to the moves of any piece. Players take turns moving. When one piece lands on the space occupied by another piece, it is captured. The goal of the player with a full complement of pieces is to block the single Raja so that it cannot move. The Goal of the single Raja is to checkmate the opponent's Raja.
(game "Sarvatobhadra" (players {(player N) (player S)}) (equipment {(board (square 8)) (dice d:6 from:1 num:1) (piece "King_noCross" P1 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Ferz_noCross" P1 (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" P1 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" P1 (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" P1 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" P1 (or (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (then (if (is In (last To) (sites Top)) (promote (last To) (piece "Ferz_noCross") Mover))))) (piece "King_noCross" P2 (or {(move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))}))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "King_noCross2" coord:"E8")}) (play (do (if (is Mover P1) (do (roll) next:(if (= (count Pips) 6) (forEach Piece "King_noCross") (if (= (count Pips) 5) (forEach Piece "Ferz_noCross") (if (= (count Pips) 4) (forEach Piece "Elephant") (if (= (count Pips) 3) (forEach Piece "Knight") (if (= (count Pips) 2) (forEach Piece "Rook") (forEach Piece "Pawn"))))))) (forEach Piece)) ifAfterwards:(not (is Threatened (id "King_noCross" Mover) (forEach Piece Next))))) (end {(if (and {(is Mover P2) (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next) (forEach Piece))))))}) (result P2 Win)) (if (and (is Mover P1) (no Moves P2)) (result P1 Win)) (if (and {(is Mover P1) (is Threatened (id "King_noCross" P1)) (no Moves P1)}) (result P2 Win))})))
###Description Played on an 8x8 board. One player plays as one Raja, the other with the following pieces: 8 Bhata (or Padati; move like Chess pawns but without being able to move two on the first turn); 2 Ashva (horses; move like Chess knights); 2 Gaja (elephants; two spaces in any orthogonal direction, jumping over the first square); 2 Ratha (chariots; moves like a rook in chess); 1 Mantri (counselor; moves one square diagonally in any direction); 1 Raja (king; moves one square in any direction). These are set up along one edge of the board: Ratha-Ashva-Gaja-Mantri-Raja-Gaja-Ashva-Ratha, with the eight Bhata lined up in the row in front of these, as in chess. The player with the full complement of pieces rolls a six-sided die to determine which piece to move: 6=Raja, 5= Mantri, 4=Gaja, 3 = Ashva, 2=Ratha, 1= Bhata. The player with the single Raja can move it according to the moves of any piece. Players take turns moving. When one piece lands on the space occupied by another piece, it is captured. The goal of the player with a full complement of pieces is to block the single Raja so that it cannot move. The Goal of the single Raja is to checkmate the opponent's Raja. ###Ludii (game "Sarvatobhadra" (players {(player N) (player S)}) (equipment {(board (square 8)) (dice d:6 from:1 num:1) (piece "King_noCross" P1 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Ferz_noCross" P1 (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" P1 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" P1 (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" P1 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" P1 (or (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (then (if (is In (last To) (sites Top)) (promote (last To) (piece "Ferz_noCross") Mover))))) (piece "King_noCross" P2 (or {(move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Hop Orthogonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))}))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "King_noCross2" coord:"E8")}) (play (do (if (is Mover P1) (do (roll) next:(if (= (count Pips) 6) (forEach Piece "King_noCross") (if (= (count Pips) 5) (forEach Piece "Ferz_noCross") (if (= (count Pips) 4) (forEach Piece "Elephant") (if (= (count Pips) 3) (forEach Piece "Knight") (if (= (count Pips) 2) (forEach Piece "Rook") (forEach Piece "Pawn"))))))) (forEach Piece)) ifAfterwards:(not (is Threatened (id "King_noCross" Mover) (forEach Piece Next))))) (end {(if (and {(is Mover P2) (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next) (forEach Piece))))))}) (result P2 Win)) (if (and (is Mover P1) (no Moves P2)) (result P1 Win)) (if (and {(is Mover P1) (is Threatened (id "King_noCross" P1)) (no Moves P1)}) (result P2 Win))})))
8x8 checkered board. The pieces move as follows: Álix' ("old man"), x1: moves one space orthogonally or diagonally; Férsix' ("fers"), x1: moves any number of spaces orthogonally or diagonally; Lúdkax' ("boat"), x2: moves orthogonally any number of spaces; Slúnax' ("elephant"), x2: moves diagonally any number of spaces; Kúnax' ("horse"), x2: moves like a Chess knight; Layakúcan ("little boys"), x8: move forward one space, capture diagonally forward. Captures are made when a piece moves onto a space occupied by an opponent's piece. A player's Álix' is checked when it can be taken by the opponent on their next turn, and this possibility must be removed before the opponent plays. If a player's Álix' is checkmated, the opponent wins.
(game "Saxun" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "Pawn1" {"F4" "G4" "H4" "B3" "C3" "D3" "E3" "A2"}) (place "Pawn2" {"H7" "H6" "G6" "F6" "E6" "A5" "B5" "C5"}) (place "Rook1" {"C2" "D1"}) (place "Knight1" {"B1" "H2"}) (place "Bishop_noCross1" {"E1" "F1"}) (place "Queen1" coord:"D2") (place "King_noCross1" coord:"C1") (place "Rook2" {"C7" "B8"}) (place "Knight2" {"A7" "H8"}) (place "Bishop_noCross2" {"F7" "G7"}) (place "Queen2" coord:"B7") (place "King_noCross2" coord:"C8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 8x8 checkered board. The pieces move as follows: Álix' ("old man"), x1: moves one space orthogonally or diagonally; Férsix' ("fers"), x1: moves any number of spaces orthogonally or diagonally; Lúdkax' ("boat"), x2: moves orthogonally any number of spaces; Slúnax' ("elephant"), x2: moves diagonally any number of spaces; Kúnax' ("horse"), x2: moves like a Chess knight; Layakúcan ("little boys"), x8: move forward one space, capture diagonally forward. Captures are made when a piece moves onto a space occupied by an opponent's piece. A player's Álix' is checked when it can be taken by the opponent on their next turn, and this possibility must be removed before the opponent plays. If a player's Álix' is checkmated, the opponent wins. ###Ludii (game "Saxun" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "Pawn1" {"F4" "G4" "H4" "B3" "C3" "D3" "E3" "A2"}) (place "Pawn2" {"H7" "H6" "G6" "F6" "E6" "A5" "B5" "C5"}) (place "Rook1" {"C2" "D1"}) (place "Knight1" {"B1" "H2"}) (place "Bishop_noCross1" {"E1" "F1"}) (place "Queen1" coord:"D2") (place "King_noCross1" coord:"C1") (place "Rook2" {"C7" "B8"}) (place "Knight2" {"A7" "H8"}) (place "Bishop_noCross2" {"F7" "G7"}) (place "Queen2" coord:"B7") (place "King_noCross2" coord:"C8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
10x10 board. Pieces move as follows: Raja (x1): moves one space in any direction; Crown Prince (placed to the left of the Raja, x1): moves like any of the other pieces; Kotwal (Police Chief, placed to the right of the Raja, x1): Moves like the Elephant and the Vaha; Mantri (x1): moves any distance orthogonally or diagonally; Elephant (x2): moves diagonally any distance; Vaha (two placed in front of the Queens, x4): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Chariot (x2): moves orthogonally any distance; Queen (placed in front of the Raja and Crown Prince, x2): move one square orthogonally or diagonally; Padati (placed in the second row, except for the central two squares, x8): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. When a player is reduced to only their Raja and Padati, the opponent wins. In the case of a stalemate, the player in stalemate may remove any of the opponent's pieces (except their Raja).
(game "Shataranja" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Bishop_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" Each (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Bishop_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Commoner" Each (or (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (difference (sites Row 1) (sites {"E2" "F2"}))) (place "Pawn2" (difference (sites Row 8) (sites {"E2" "F2"}))) (place "Queen1" {"E2" "F2"}) (place "Queen2" {"E9" "F9"}) (place "Rook1" {"A1" "J1"}) (place "Knight1" {"B1" "I1" "E3" "F3"}) (place "Elephant1" {"C1" "H1"}) (place "Ferz_noCross1" coord:"E1") (place "Commoner1" coord:"G1") (place "Bishop_noCross1" coord:"D1") (place "King_noCross1" coord:"F1") (place "Rook2" {"A10" "J10"}) (place "Knight2" {"B10" "I10" "E8" "F8"}) (place "Elephant2" {"C10" "H10"}) (place "Ferz_noCross2" coord:"F10") (place "Commoner2" coord:"D10") (place "Bishop_noCross2" coord:"G10") (place "King_noCross2" coord:"E10")}) (play (if (no Moves Mover) (move Remove (difference (sites Occupied by:Next) (where "King_noCross" Next))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and {(no Pieces Next "Ferz_noCross") (no Pieces Next "Queen") (no Pieces Next "Knight") (no Pieces Next "Bishop_noCross") (no Pieces Next "Elephant") (no Pieces Next "Rook") (no Pieces Next "Commoner")}) (result Mover Win))})))
###Description 10x10 board. Pieces move as follows: Raja (x1): moves one space in any direction; Crown Prince (placed to the left of the Raja, x1): moves like any of the other pieces; Kotwal (Police Chief, placed to the right of the Raja, x1): Moves like the Elephant and the Vaha; Mantri (x1): moves any distance orthogonally or diagonally; Elephant (x2): moves diagonally any distance; Vaha (two placed in front of the Queens, x4): move orthogonally one space and then diagonally another, jumping over any intervening pieces; Chariot (x2): moves orthogonally any distance; Queen (placed in front of the Raja and Crown Prince, x2): move one square orthogonally or diagonally; Padati (placed in the second row, except for the central two squares, x8): move forward orthogonally one space or one space diagonally forward to capture. When a Padati reaches the opposite edge of the board, it is promoted to a Mantri and is moved immediately to the space it last moved from. An opponent's piece is captured by moving one of the player's own pieces onto the space occupied by the opponent's piece. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot be in check at the end of the player's turn. If this is impossible, the opponent wins. When a player is reduced to only their Raja and Padati, the opponent wins. In the case of a stalemate, the player in stalemate may remove any of the opponent's pieces (except their Raja). ###Ludii (game "Shataranja" (players {(player N) (player S)}) (equipment {(board (square 10)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece "Bishop_noCross") Mover) (fromTo (from (last To)) (to (last From)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" Each (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Bishop_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Commoner" Each (or (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (difference (sites Row 1) (sites {"E2" "F2"}))) (place "Pawn2" (difference (sites Row 8) (sites {"E2" "F2"}))) (place "Queen1" {"E2" "F2"}) (place "Queen2" {"E9" "F9"}) (place "Rook1" {"A1" "J1"}) (place "Knight1" {"B1" "I1" "E3" "F3"}) (place "Elephant1" {"C1" "H1"}) (place "Ferz_noCross1" coord:"E1") (place "Commoner1" coord:"G1") (place "Bishop_noCross1" coord:"D1") (place "King_noCross1" coord:"F1") (place "Rook2" {"A10" "J10"}) (place "Knight2" {"B10" "I10" "E8" "F8"}) (place "Elephant2" {"C10" "H10"}) (place "Ferz_noCross2" coord:"F10") (place "Commoner2" coord:"D10") (place "Bishop_noCross2" coord:"G10") (place "King_noCross2" coord:"E10")}) (play (if (no Moves Mover) (move Remove (difference (sites Occupied by:Next) (where "King_noCross" Next))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (and {(no Pieces Next "Ferz_noCross") (no Pieces Next "Queen") (no Pieces Next "Knight") (no Pieces Next "Bishop_noCross") (no Pieces Next "Elephant") (no Pieces Next "Rook") (no Pieces Next "Commoner")}) (result Mover Win))})))
8x8 board. Two players. Pieces and movement are as follows: King x1, placed on the fifth space from the left on one edge of the board: Moves one space orthogonally or diagonally. Pawns x8, arranged along the row in front of the king: moves one space forward orthogonally or one space forward diagonally to capture. The opponent's pieces are placed in the same position on the opposite side of the board. If the King can be taken on the next turn it is in check, it must not remain in check on the next turn. If the king cannot move out of check, checkmate is declared and the opponent wins.
(game "Shatr ikh Padan" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "King_noCross1" coord:"E1") (place "King_noCross2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 8x8 board. Two players. Pieces and movement are as follows: King x1, placed on the fifth space from the left on one edge of the board: Moves one space orthogonally or diagonally. Pawns x8, arranged along the row in front of the king: moves one space forward orthogonally or one space forward diagonally to capture. The opponent's pieces are placed in the same position on the opposite side of the board. If the King can be taken on the next turn it is in check, it must not remain in check on the next turn. If the king cannot move out of check, checkmate is declared and the opponent wins. ###Ludii (game "Shatr ikh Padan" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "King_noCross1" coord:"E1") (place "King_noCross2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
12x12 board. 24 pieces per player. Pieces begin on the board in the following arrangement, and with the following movements: Outer row, from left corner: Rukh: moves orthogonally any distance; Ghora: moves orthogonally one space and then diagonally another space, jumping over the first space; Dahja: moves orthogonally any distance; Ratha: moves orthogonally any distance; Fil: moves diagonally any distance; Wazir: moves diagonally or orthogonally any distance; Padshah: moves one space in any direction; Fil, Ratha, Dahja, Ghora, Rukh. In the second row are twelve Paidal: moves one square forward orthogonally or one diagonally to capture. Players alternate turns moving a piece to a space on the board. If one of the opponent's pieces is on the space to which a player moves their piece, the opponent's piece is captured. If the Padshah can be captured on the opponent's next turn, it is in check. The Padshah cannot remain in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins.
(game "Shatranj (12x12)" (players 2) (equipment {(board (square 12)) (piece "Pawn" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Commoner" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Wazir" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 10)) (place "Rook1" {"A1" "L1"}) (place "Knight1" {"B1" "K1"}) (place "Commoner1" {"C1" "J1"}) (place "Wazir1" {"D1" "I1"}) (place "Bishop_noCross1" {"E1" "H1"}) (place "Queen1" coord:"F1") (place "King_noCross1" coord:"G1") (place "Rook2" {"A12" "L12"}) (place "Knight2" {"B12" "K12"}) (place "Commoner2" {"C12" "J12"}) (place "Wazir2" {"D12" "I12"}) (place "Bishop_noCross2" {"E12" "H12"}) (place "Queen2" coord:"G12") (place "King_noCross2" coord:"F12")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 12x12 board. 24 pieces per player. Pieces begin on the board in the following arrangement, and with the following movements: Outer row, from left corner: Rukh: moves orthogonally any distance; Ghora: moves orthogonally one space and then diagonally another space, jumping over the first space; Dahja: moves orthogonally any distance; Ratha: moves orthogonally any distance; Fil: moves diagonally any distance; Wazir: moves diagonally or orthogonally any distance; Padshah: moves one space in any direction; Fil, Ratha, Dahja, Ghora, Rukh. In the second row are twelve Paidal: moves one square forward orthogonally or one diagonally to capture. Players alternate turns moving a piece to a space on the board. If one of the opponent's pieces is on the space to which a player moves their piece, the opponent's piece is captured. If the Padshah can be captured on the opponent's next turn, it is in check. The Padshah cannot remain in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. ###Ludii (game "Shatranj (12x12)" (players 2) (equipment {(board (square 12)) (piece "Pawn" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Commoner" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Wazir" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 10)) (place "Rook1" {"A1" "L1"}) (place "Knight1" {"B1" "K1"}) (place "Commoner1" {"C1" "J1"}) (place "Wazir1" {"D1" "I1"}) (place "Bishop_noCross1" {"E1" "H1"}) (place "Queen1" coord:"F1") (place "King_noCross1" coord:"G1") (place "Rook2" {"A12" "L12"}) (place "Knight2" {"B12" "K12"}) (place "Commoner2" {"C12" "J12"}) (place "Wazir2" {"D12" "I12"}) (place "Bishop_noCross2" {"E12" "H12"}) (place "Queen2" coord:"G12") (place "King_noCross2" coord:"F12")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
14x14 board. 28 pieces per player. Pieces begin on the board in the following arrangement, and with the following movements: Outer row, from left corner: Rukh: moves orthogonally any distance; Ghora: moves orthogonally one space and then diagonally another space, jumping over the first space; Dahja: moves orthogonally any distance; Ratha: moves orthogonally any distance; Fil: moves diagonally any distance; Shahzada: moves diagonally or orthogonally any distance; Wazir: moves diagonally or orthogonally any distance; Raja: moves one space in any direction; Rani: moves one square in any direction; Fil, Ratha, Dahja, Ghora, Rukh. In the second row are fourteen Paidal: moves one square forward orthogonally or one diagonally to capture. Players alternate turns moving a piece to a space on the board. If one of the opponent's pieces is on the space to which a player moves their piece, the opponent's piece is captured. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot remain in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins.
(game "Shatranj (14x14)" (players 2) (equipment {(board (square 14)) (piece "Pawn" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Commoner" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Wazir" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Mann" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Amazon" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 12)) (place "Rook1" {"A1" "N1"}) (place "Knight1" {"B1" "M1"}) (place "Commoner1" {"C1" "L1"}) (place "Wazir1" {"D1" "K1"}) (place "Bishop_noCross1" {"E1" "J1"}) (place "Amazon1" coord:"F1") (place "Queen1" coord:"G1") (place "King_noCross1" coord:"H1") (place "Mann1" coord:"I1") (place "Rook2" {"A14" "N14"}) (place "Knight2" {"B14" "M14"}) (place "Commoner2" {"C14" "L14"}) (place "Wazir2" {"D14" "K14"}) (place "Bishop_noCross2" {"E14" "J14"}) (place "Amazon2" coord:"I14") (place "Queen2" coord:"H14") (place "King_noCross2" coord:"G14") (place "Mann2" coord:"F14")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 14x14 board. 28 pieces per player. Pieces begin on the board in the following arrangement, and with the following movements: Outer row, from left corner: Rukh: moves orthogonally any distance; Ghora: moves orthogonally one space and then diagonally another space, jumping over the first space; Dahja: moves orthogonally any distance; Ratha: moves orthogonally any distance; Fil: moves diagonally any distance; Shahzada: moves diagonally or orthogonally any distance; Wazir: moves diagonally or orthogonally any distance; Raja: moves one space in any direction; Rani: moves one square in any direction; Fil, Ratha, Dahja, Ghora, Rukh. In the second row are fourteen Paidal: moves one square forward orthogonally or one diagonally to capture. Players alternate turns moving a piece to a space on the board. If one of the opponent's pieces is on the space to which a player moves their piece, the opponent's piece is captured. If the Raja can be captured on the opponent's next turn, it is in check. The Raja cannot remain in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. ###Ludii (game "Shatranj (14x14)" (players 2) (equipment {(board (square 14)) (piece "Pawn" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Commoner" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Wazir" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Mann" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Amazon" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 12)) (place "Rook1" {"A1" "N1"}) (place "Knight1" {"B1" "M1"}) (place "Commoner1" {"C1" "L1"}) (place "Wazir1" {"D1" "K1"}) (place "Bishop_noCross1" {"E1" "J1"}) (place "Amazon1" coord:"F1") (place "Queen1" coord:"G1") (place "King_noCross1" coord:"H1") (place "Mann1" coord:"I1") (place "Rook2" {"A14" "N14"}) (place "Knight2" {"B14" "M14"}) (place "Commoner2" {"C14" "L14"}) (place "Wazir2" {"D14" "K14"}) (place "Bishop_noCross2" {"E14" "J14"}) (place "Amazon2" coord:"I14") (place "Queen2" coord:"H14") (place "King_noCross2" coord:"G14") (place "Mann2" coord:"F14")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. May move like an Asb if it is not in check and has never been in check. Place to a player's square right of center. 1 x Fers (counselor): Any distance orthogonally or diagonally; 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): Any distance diagonally. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. Promoted to Fers when reaching the eighth rank. No en passant. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a Shah can be captured on the next turn by an opponent's piece, it is in check. The Shah must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a win for that player causing it. The game ends in a draw only when a player's final piece, being a Sarbaz, is lost, that player's Shah captures the opponent's only remaining piece, a Sarbaz.
(game "Shatranj (Algeria)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (!= (value Player Mover) (mover)) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))) (then (set Value Mover (mover))))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"E8") (place "King_noCross2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (!= (next) (value Player Next)) (if (is Threatened (id "King_noCross" Next)) (set Value Next (next))))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. May move like an Asb if it is not in check and has never been in check. Place to a player's square right of center. 1 x Fers (counselor): Any distance orthogonally or diagonally; 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): Any distance diagonally. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. Promoted to Fers when reaching the eighth rank. No en passant. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a Shah can be captured on the next turn by an opponent's piece, it is in check. The Shah must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a win for that player causing it. The game ends in a draw only when a player's final piece, being a Sarbaz, is lost, that player's Shah captures the opponent's only remaining piece, a Sarbaz. ###Ludii (game "Shatranj (Algeria)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (!= (value Player Mover) (mover)) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to))) (then (set Value Mover (mover))))))) (piece "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"E8") (place "King_noCross2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (!= (next) (value Player Next)) (if (is Threatened (id "King_noCross" Next)) (set Value Next (next))))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): Any distance orthogonally or diagonally, or like the Asb. 2 x Rukh (rook): Any number of spaces orthogonally. No castling. 2 x Pil (elephant): Any distance diagonally, jumping over the first. Cannot capture another Pil. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the eighth rank. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a Shah can be captured on the next turn by an opponent's piece, it is in check. The Shah must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a win for that player causing it.
(game "Shatranj (Iraq)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Elephant" (move Slide Diagonal (between if:(or (is In (between) (sites Around (from))) (is Empty (between)))) (to if:(and (not (= (what at:(to)) (id "Elephant" Next))) (is Enemy (who at:(to)))) (apply if:(not (is In (to) (sites Around (from)))) (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))})))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): Any distance orthogonally or diagonally, or like the Asb. 2 x Rukh (rook): Any number of spaces orthogonally. No castling. 2 x Pil (elephant): Any distance diagonally, jumping over the first. Cannot capture another Pil. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the eighth rank. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a Shah can be captured on the next turn by an opponent's piece, it is in check. The Shah must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a win for that player causing it. ###Ludii (game "Shatranj (Iraq)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Elephant" (move Slide Diagonal (between if:(or (is In (between) (sites Around (from))) (is Empty (between)))) (to if:(and (not (= (what at:(to)) (id "Elephant" Next))) (is Enemy (who at:(to)))) (apply if:(not (is In (to) (sites Around (from)))) (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))})))
8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): One square diagonally or, one the first turn, may jump two squares diagonally or orthogonally, over any pieces on the first square. There can be no capture with this move. 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): Two squares diagonally, jumping over the first. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the eighth rank. On its first move, this promoted piece may also use the jumping move of the Fers. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a Shah can be captured on the next turn by an opponent's piece, it is in check. The Shah must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a win for that player causing it.
(game "Shatranj (Turkey)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (not (= 1 (state at:(from)))) (move Hop (between if:True) (to if:(is Empty (to))))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1))))) (piece "Elephant" (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))})))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): One square diagonally or, one the first turn, may jump two squares diagonally or orthogonally, over any pieces on the first square. There can be no capture with this move. 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): Two squares diagonally, jumping over the first. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the eighth rank. On its first move, this promoted piece may also use the jumping move of the Fers. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a Shah can be captured on the next turn by an opponent's piece, it is in check. The Shah must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a win for that player causing it. ###Ludii (game "Shatranj (Turkey)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Ferz_noCross" (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (not (= 1 (state at:(from)))) (move Hop (between if:True) (to if:(is Empty (to))))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1))))) (piece "Elephant" (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))})))
8x8 board. One player plays as one Shah, which can move like any of the other pieces. The other player has the usual complement of pieces, as in Chess. Pawns (x8): can move one space forward and capture one space forward diagonally; Rook (x2): can move any number of spaces orthogonally; Elephant (x2): can move any number of spaces diagonally; Horse (2): moves in any direction, one space orthogonally with one space forward diagonally; Vizier (x1): can move any number of spaces orthogonally or diagonally; Shah (x1): can move one space orthogonally or diagonally, but can also move like the horse on its first move, if it has not yet been checked. The pieces are arranged as in Chess, with the Vizier is place to the left of the Shah. Players capture pieces by moving onto a space occupied by an opponent's piece. When a pawn reaches the opposite edge of the board from where it started, it may be promoted to the more powerful piece that begins the game in that position, but only if one of these belonging to the player has already been captured. If this has not happened, the pawn cannot move to the final row. When a player can capture the opponent's Shah on the next turn, the Shah is in check, the opponent's next move must free the Shah from check. If the opponent cannot, it is checkmate and the player wins.
(game "Shatranj Diwana Shah" (players 2) (equipment {(board (square 8)) (piece "Pawn" P2 S (do (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))}) ifAfterwards:(if (is In (last To) (sites Mover "Promotion")) (!= -1 (if (and (is In (last To) (sites Corners)) (!= 2 (count Pieces Mover "Boat"))) (id "Boat" Mover) (if (and (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (!= 2 (count Pieces Mover "Knight"))) (id "Knight" Mover) (if (and (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (!= 2 (count Pieces Mover "Elephant"))) (id "Elephant" Mover) (if (and (= (column of:(last To)) 3) (!= 1 (count Pieces Mover "Queen"))) (id "Queen" Mover) -1))))) True) (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (if (and (is In (last To) (sites Corners)) (!= 2 (count Pieces Mover "Boat"))) (id "Boat" Mover) (if (and (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (!= 2 (count Pieces Mover "Knight"))) (id "Knight" Mover) (if (and (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (!= 2 (count Pieces Mover "Elephant"))) (id "Elephant" Mover) (if (and (= (column of:(last To)) 3) (!= 1 (count Pieces Mover "Queen"))) (id "Queen" Mover) -1))))) Mover))))) (piece "Boat" P2 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (if (is Mover P1) (or (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)))))) (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= (state at:(from)) 1) (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 (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "Elephant" P2 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" P2 (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 "Queen" P2 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn2" (sites Row 6)) (place "King_noCross1" coord:"D1") (place "Boat2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (and (= (what at:(last To)) (id "King_noCross" P1)) (= (state at:(where "King_noCross" P2)) 1)) (if (is Threatened (id "King_noCross" P2)) (set State at:(where "King_noCross" P2) 0)))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 8x8 board. One player plays as one Shah, which can move like any of the other pieces. The other player has the usual complement of pieces, as in Chess. Pawns (x8): can move one space forward and capture one space forward diagonally; Rook (x2): can move any number of spaces orthogonally; Elephant (x2): can move any number of spaces diagonally; Horse (2): moves in any direction, one space orthogonally with one space forward diagonally; Vizier (x1): can move any number of spaces orthogonally or diagonally; Shah (x1): can move one space orthogonally or diagonally, but can also move like the horse on its first move, if it has not yet been checked. The pieces are arranged as in Chess, with the Vizier is place to the left of the Shah. Players capture pieces by moving onto a space occupied by an opponent's piece. When a pawn reaches the opposite edge of the board from where it started, it may be promoted to the more powerful piece that begins the game in that position, but only if one of these belonging to the player has already been captured. If this has not happened, the pawn cannot move to the final row. When a player can capture the opponent's Shah on the next turn, the Shah is in check, the opponent's next move must free the Shah from check. If the opponent cannot, it is checkmate and the player wins. ###Ludii (game "Shatranj Diwana Shah" (players 2) (equipment {(board (square 8)) (piece "Pawn" P2 S (do (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))}) ifAfterwards:(if (is In (last To) (sites Mover "Promotion")) (!= -1 (if (and (is In (last To) (sites Corners)) (!= 2 (count Pieces Mover "Boat"))) (id "Boat" Mover) (if (and (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (!= 2 (count Pieces Mover "Knight"))) (id "Knight" Mover) (if (and (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (!= 2 (count Pieces Mover "Elephant"))) (id "Elephant" Mover) (if (and (= (column of:(last To)) 3) (!= 1 (count Pieces Mover "Queen"))) (id "Queen" Mover) -1))))) True) (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece (if (and (is In (last To) (sites Corners)) (!= 2 (count Pieces Mover "Boat"))) (id "Boat" Mover) (if (and (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (!= 2 (count Pieces Mover "Knight"))) (id "Knight" Mover) (if (and (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (!= 2 (count Pieces Mover "Elephant"))) (id "Elephant" Mover) (if (and (= (column of:(last To)) 3) (!= 1 (count Pieces Mover "Queen"))) (id "Queen" Mover) -1))))) Mover))))) (piece "Boat" P2 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (if (is Mover P1) (or (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)))))) (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= (state at:(from)) 1) (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 (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "Elephant" P2 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" P2 (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 "Queen" P2 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn2" (sites Row 6)) (place "King_noCross1" coord:"D1") (place "Boat2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))) (then (if (and (= (what at:(last To)) (id "King_noCross" P1)) (= (state at:(where "King_noCross" P2)) 1)) (if (is Threatened (id "King_noCross" P2)) (set State at:(where "King_noCross" P2) 0)))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
10x10 board, with an extra square placed diagonally behind each Rukh. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): One square diagonally. 2 x Rukh (rook): Any number of spaces orthogonally. 2x Dabbaba: any number of squares diagonally. 2 x Pil (elephant): Two squares diagonally, jumping over the first. Cannot capture another Pil. 2 x Asb (horse): Moves as a Chess knight. 12 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the tenth rank. No castling. Stalemate results in win for player causing it. The player who checkmates the king wins. If a player moves their king into one of the extra squares on the opposite side of the board, the game is a draw.
(game "Shatranj al-Husun" (players {(player N) (player S)}) (equipment {(board (merge {(square 10) (shift -1 -1 (square 1)) (shift 10 -1 (square 1)) (shift -1 10 (square 1)) (shift 10 10 (square 1))})) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Elephant" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "Elephant" Next))))) (apply (remove (to)))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "Queen") Mover))))) (regions "Promotion" P1 (sites Row 10)) (regions "Promotion" P2 (sites Row 1)) (regions "OppositeExtraSquares" P1 (sites Top)) (regions "OppositeExtraSquares" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 2)) (place "Pawn2" (sites Row 9)) (place "Rook1" (sites {"B2" "K2"})) (place "Knight1" (sites {"C2" "J2"})) (place "Elephant1" (sites {"D2" "I2"})) (place "Bishop1" (sites {"E2" "H2"})) (place "King1" coord:"F2") (place "Queen1" coord:"G2") (place "Rook2" (sites {"B11" "K11"})) (place "Knight2" (sites {"C11" "J11"})) (place "Elephant2" (sites {"D11" "I11"})) (place "Bishop2" (sites {"E11" "H11"})) (place "King2" coord:"F11") (place "Queen2" coord:"G11")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end {(if (is In (where "King" Mover) (sites Mover "OppositeExtraSquares")) (result Mover Draw)) (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
###Description 10x10 board, with an extra square placed diagonally behind each Rukh. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): One square diagonally. 2 x Rukh (rook): Any number of spaces orthogonally. 2x Dabbaba: any number of squares diagonally. 2 x Pil (elephant): Two squares diagonally, jumping over the first. Cannot capture another Pil. 2 x Asb (horse): Moves as a Chess knight. 12 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the tenth rank. No castling. Stalemate results in win for player causing it. The player who checkmates the king wins. If a player moves their king into one of the extra squares on the opposite side of the board, the game is a draw. ###Ludii (game "Shatranj al-Husun" (players {(player N) (player S)}) (equipment {(board (merge {(square 10) (shift -1 -1 (square 1)) (shift 10 -1 (square 1)) (shift -1 10 (square 1)) (shift 10 10 (square 1))})) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Elephant" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "Elephant" Next))))) (apply (remove (to)))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "Queen") Mover))))) (regions "Promotion" P1 (sites Row 10)) (regions "Promotion" P2 (sites Row 1)) (regions "OppositeExtraSquares" P1 (sites Top)) (regions "OppositeExtraSquares" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 2)) (place "Pawn2" (sites Row 9)) (place "Rook1" (sites {"B2" "K2"})) (place "Knight1" (sites {"C2" "J2"})) (place "Elephant1" (sites {"D2" "I2"})) (place "Bishop1" (sites {"E2" "H2"})) (place "King1" coord:"F2") (place "Queen1" coord:"G2") (place "Rook2" (sites {"B11" "K11"})) (place "Knight2" (sites {"C11" "J11"})) (place "Elephant2" (sites {"D11" "I11"})) (place "Bishop2" (sites {"E11" "H11"})) (place "King2" coord:"F11") (place "Queen2" coord:"G11")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end {(if (is In (where "King" Mover) (sites Mover "OppositeExtraSquares")) (result Mover Draw)) (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
11x10 board, with a twelfth space on the right of the second row of eleven on each side. Each player starts with the following pieces, with their specialized moves: Shah (x1): moves orthogonally or diagonally one space; Wazir (x1): moves one space orthogonally; Firzan (x1) moves one space diagonally; Dabbaba (x2): jumps orthogonally to the third space; Tali'as (x2): moves diagonally two or more spaces; Jamal (x2): jumps diagonally one space then two orthogonally in the same direction; Zurafa (x2): moves diagonally one space then orthogonally three or more spaces; Pil (x2) jumps two spaces diagonally; Asb (x2): jumps one space diagonally and one space orthogonally in the same direction; Rukh(x2): moves any number of spaces orthogonally; Baidaq (x10); move orthogonally forward one space or diagonally forward one space to capture. Each Baidaq is assigned to one of the piece types and promotes to that piece. They are placed in the third rank, with the Baidaq al-Bayadiq on the leftmost square, with the following promotion assignments for each regular Baidaq proceeding from left to right beginning on the second square from the left: Dabbaba, Jamal, Pil, Firzan, Shah, Wazir, Zurafa, Tali'as, Asb, Rukh. Baidaq al-Bayadiq (x1), moves like a Baidaq, but does not promote immediately when it reaches the opposite edge. Instead, it waits there, immune to capture, until a situation arises where two of the opponent's pieces could theoretically be taken by a pawn. The Baidaq al-Bayadiq is then moved to that spot, any piece (including the player's own) being moved from that spot, and then the capture being made on the next turn. It then proceeds as before, and if it is to be promoted again, it becomes a Shah's Baidaq, and is replaced on the appropriate starting position. If it is promoted a third time, it becomes Shah Masnu'a, and the original Shah's Baidaq becomes Shahzada, and both move like the Shah. If the Shah can be taken on the next turn, it is in Check and must not be in Check at the beginning of the next turn. If a Shah is not in Check but no legal moves are available, it is a Stalemate and the opponent wins. If the Shah is in Check and it is impossible to escape, Checkmate occurs and the opponent wins. Once per game, a player may swap a Shah which is in Check or Stalemate with another of the player's pieces. If the player can place the Shah in the extra space on the opponent's side of the board, the game is a draw. The Shah cannot enter the extra space if the opponent's Shah Masnu's occupies it.
(game "Shatranj al-Kabir" (players {(player N) (player S)}) (equipment {(board (merge {(square 11) (shift 11 1 (square 1)) (shift -1 9 (square 1))})) (piece "Pawn" Each (if (= 23 (value Piece at:(from))) (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (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 (and {(> (value Piece at:(last To)) 2) (is In (last To) (sites Next)) (= 0 (state at:(last To)))}) (promote (last To) (piece (value Piece at:(last To)))) (if (and (is In (last To) (sites Next)) (= 2 (state at:(last To)))) (and {(set Value at:(last To) 23) (set State at:(last To) 0) (forEach Site (sites Board) (if (= (if (is Mover P1) 11 12) (value Piece at:(site))) (set Value at:(site) 23)))}))))))) (piece "Wazir" Each (move Hop Orthogonal (between (exact 2) if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (remove (to)))))) (piece "Knight_rotated" Each (move Leap {{F F F R F} {F F F L F}} (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" Each (move Hop Diagonal (between (exact 2) if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (remove (to)))))) (piece "Queen" Each (move Step Diagonal (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "King_noCross" Each (move Step (to if:(or (is Empty (to)) (and (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))}))) (or (!= (to) (mapEntry "ExtraSquare" Next)) (and (= (to) (mapEntry "ExtraSquare" Next)) (< (value Piece at:(to)) 23))))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Amazon" Each (move Step Orthogonal (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Giraffe" Each (forEach Direction Diagonal (to if:(is Empty (to)) (apply (and {(move (from) (to (sites To (slide (from (to)) Orthogonal (between (min 3)) (to if:(and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))}))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))))}))))) (piece "Bishop_noCross" Each (move Slide Diagonal (between (min 2)) (to if:(and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))}))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))}))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "InitShahPawn" {(pair P1 "G3") (pair P2 "G9")}) (map "ExtraSquare" {(pair P1 "M2") (pair P2 "A10")})}) (rules (start {(place "Pawn1" coord:"B3" value:1) (place "Pawn2" coord:"L9" value:2) (place "Pawn1" coord:"C3" value:3) (place "Pawn2" coord:"K9" value:4) (place "Pawn1" coord:"D3" value:5) (place "Pawn2" coord:"J9" value:6) (place "Pawn1" coord:"E3" value:7) (place "Pawn2" coord:"I9" value:8) (place "Pawn1" coord:"F3" value:9) (place "Pawn2" coord:"H9" value:10) (place "Pawn1" coord:"G3" value:11) (place "Pawn2" coord:"G9" value:12) (place "Pawn1" coord:"H3" value:13) (place "Pawn2" coord:"F9" value:14) (place "Pawn1" coord:"I3" value:15) (place "Pawn2" coord:"E9" value:16) (place "Pawn1" coord:"J3" value:17) (place "Pawn2" coord:"D9" value:18) (place "Pawn1" coord:"K3" value:19) (place "Pawn2" coord:"C9" value:20) (place "Pawn1" coord:"L3" value:21) (place "Pawn2" coord:"B9" value:22) (place "King_noCross1" coord:"G2") (place "King_noCross2" coord:"G10") (place "Queen1" coord:"F2") (place "Queen2" coord:"H10") (place "Amazon1" coord:"H2") (place "Amazon2" coord:"F10") (place "Giraffe1" (sites {"E2" "I2"})) (place "Giraffe2" (sites {"E10" "I10"})) (place "Bishop_noCross1" (sites {"D2" "J2"})) (place "Bishop_noCross2" (sites {"D10" "J10"})) (place "Wazir1" (sites {"F1" "H1"})) (place "Wazir2" (sites {"F11" "H11"})) (place "Knight1" (sites {"C2" "K2"})) (place "Knight2" (sites {"C10" "K10"})) (place "Rook1" (sites {"B2" "L2"})) (place "Rook2" (sites {"B10" "L10"})) (place "Elephant1" (sites {"B1" "L1"})) (place "Elephant2" (sites {"B11" "L11"})) (place "Knight_rotated1" (sites {"D1" "J1"})) (place "Knight_rotated2" (sites {"D11" "J11"}))}) (play (do (or {(move (from (forEach (sites Next) if:(and (= (what at:(site)) (id "Pawn" Mover)) (<= (value Piece at:(site)) 2)))) (to (forEach (sites Empty) if:(if (is Mover P1) (and (is Enemy (who at:(ahead (site) NE))) (is Enemy (who at:(ahead (site) NW)))) (and (is Enemy (who at:(ahead (site) SE))) (is Enemy (who at:(ahead (site) SW))))))) (then (and (set Value at:(last To) (if (is Mover P1) 11 12)) (set State at:(last To) 1)))) (move (from (forEach (sites Next) if:(and {(= (what at:(site)) (id "Pawn" Mover)) (or (= (value Piece at:(site)) 11) (= (value Piece at:(site)) 12)) (= (state at:(site)) 1)}))) (to (mapEntry "InitShahPawn" Mover) if:(is Empty (to))) (then (set State at:(last To) 2))) (if (and (!= (value Player Mover) 1) (is Threatened (id "King_noCross" Mover))) (forEach Site (difference (sites Occupied by:Mover container:"Board") (sites Occupied by:Mover container:"Board" component:"King_noCross")) (move Swap Pieces (where "King_noCross" Mover) (site) (then (set Value Mover 1))))) (forEach Piece)}) ifAfterwards:(and (not (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (not (is Threatened (id "King_noCross" Mover)))))) (end {(if (no Moves Next) (result Mover Win)) (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (or (= (what at:(mapEntry "ExtraSquare" P1)) (id "King_noCross" P2)) (= (what at:(mapEntry "ExtraSquare" P2)) (id "King_noCross" P1))) (result Mover Draw))})))
###Description 11x10 board, with a twelfth space on the right of the second row of eleven on each side. Each player starts with the following pieces, with their specialized moves: Shah (x1): moves orthogonally or diagonally one space; Wazir (x1): moves one space orthogonally; Firzan (x1) moves one space diagonally; Dabbaba (x2): jumps orthogonally to the third space; Tali'as (x2): moves diagonally two or more spaces; Jamal (x2): jumps diagonally one space then two orthogonally in the same direction; Zurafa (x2): moves diagonally one space then orthogonally three or more spaces; Pil (x2) jumps two spaces diagonally; Asb (x2): jumps one space diagonally and one space orthogonally in the same direction; Rukh(x2): moves any number of spaces orthogonally; Baidaq (x10); move orthogonally forward one space or diagonally forward one space to capture. Each Baidaq is assigned to one of the piece types and promotes to that piece. They are placed in the third rank, with the Baidaq al-Bayadiq on the leftmost square, with the following promotion assignments for each regular Baidaq proceeding from left to right beginning on the second square from the left: Dabbaba, Jamal, Pil, Firzan, Shah, Wazir, Zurafa, Tali'as, Asb, Rukh. Baidaq al-Bayadiq (x1), moves like a Baidaq, but does not promote immediately when it reaches the opposite edge. Instead, it waits there, immune to capture, until a situation arises where two of the opponent's pieces could theoretically be taken by a pawn. The Baidaq al-Bayadiq is then moved to that spot, any piece (including the player's own) being moved from that spot, and then the capture being made on the next turn. It then proceeds as before, and if it is to be promoted again, it becomes a Shah's Baidaq, and is replaced on the appropriate starting position. If it is promoted a third time, it becomes Shah Masnu'a, and the original Shah's Baidaq becomes Shahzada, and both move like the Shah. If the Shah can be taken on the next turn, it is in Check and must not be in Check at the beginning of the next turn. If a Shah is not in Check but no legal moves are available, it is a Stalemate and the opponent wins. If the Shah is in Check and it is impossible to escape, Checkmate occurs and the opponent wins. Once per game, a player may swap a Shah which is in Check or Stalemate with another of the player's pieces. If the player can place the Shah in the extra space on the opponent's side of the board, the game is a draw. The Shah cannot enter the extra space if the opponent's Shah Masnu's occupies it. ###Ludii (game "Shatranj al-Kabir" (players {(player N) (player S)}) (equipment {(board (merge {(square 11) (shift 11 1 (square 1)) (shift -1 9 (square 1))})) (piece "Pawn" Each (if (= 23 (value Piece at:(from))) (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (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 (and {(> (value Piece at:(last To)) 2) (is In (last To) (sites Next)) (= 0 (state at:(last To)))}) (promote (last To) (piece (value Piece at:(last To)))) (if (and (is In (last To) (sites Next)) (= 2 (state at:(last To)))) (and {(set Value at:(last To) 23) (set State at:(last To) 0) (forEach Site (sites Board) (if (= (if (is Mover P1) 11 12) (value Piece at:(site))) (set Value at:(site) 23)))}))))))) (piece "Wazir" Each (move Hop Orthogonal (between (exact 2) if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (remove (to)))))) (piece "Knight_rotated" Each (move Leap {{F F F R F} {F F F L F}} (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Elephant" Each (move Hop Diagonal (between (exact 2) if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (remove (to)))))) (piece "Queen" Each (move Step Diagonal (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "King_noCross" Each (move Step (to if:(or (is Empty (to)) (and (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))}))) (or (!= (to) (mapEntry "ExtraSquare" Next)) (and (= (to) (mapEntry "ExtraSquare" Next)) (< (value Piece at:(to)) 23))))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Amazon" Each (move Step Orthogonal (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Giraffe" Each (forEach Direction Diagonal (to if:(is Empty (to)) (apply (and {(move (from) (to (sites To (slide (from (to)) Orthogonal (between (min 3)) (to if:(and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))}))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))))}))))) (piece "Bishop_noCross" Each (move Slide Diagonal (between (min 2)) (to if:(and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))}))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))})))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(and (is Enemy (who at:(to))) (not (and {(= (what at:(to)) (id "Pawn" Next)) (is In (to) (sites Mover))}))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (regions P1 (sites Bottom)) (regions P2 (sites Top)) (map "InitShahPawn" {(pair P1 "G3") (pair P2 "G9")}) (map "ExtraSquare" {(pair P1 "M2") (pair P2 "A10")})}) (rules (start {(place "Pawn1" coord:"B3" value:1) (place "Pawn2" coord:"L9" value:2) (place "Pawn1" coord:"C3" value:3) (place "Pawn2" coord:"K9" value:4) (place "Pawn1" coord:"D3" value:5) (place "Pawn2" coord:"J9" value:6) (place "Pawn1" coord:"E3" value:7) (place "Pawn2" coord:"I9" value:8) (place "Pawn1" coord:"F3" value:9) (place "Pawn2" coord:"H9" value:10) (place "Pawn1" coord:"G3" value:11) (place "Pawn2" coord:"G9" value:12) (place "Pawn1" coord:"H3" value:13) (place "Pawn2" coord:"F9" value:14) (place "Pawn1" coord:"I3" value:15) (place "Pawn2" coord:"E9" value:16) (place "Pawn1" coord:"J3" value:17) (place "Pawn2" coord:"D9" value:18) (place "Pawn1" coord:"K3" value:19) (place "Pawn2" coord:"C9" value:20) (place "Pawn1" coord:"L3" value:21) (place "Pawn2" coord:"B9" value:22) (place "King_noCross1" coord:"G2") (place "King_noCross2" coord:"G10") (place "Queen1" coord:"F2") (place "Queen2" coord:"H10") (place "Amazon1" coord:"H2") (place "Amazon2" coord:"F10") (place "Giraffe1" (sites {"E2" "I2"})) (place "Giraffe2" (sites {"E10" "I10"})) (place "Bishop_noCross1" (sites {"D2" "J2"})) (place "Bishop_noCross2" (sites {"D10" "J10"})) (place "Wazir1" (sites {"F1" "H1"})) (place "Wazir2" (sites {"F11" "H11"})) (place "Knight1" (sites {"C2" "K2"})) (place "Knight2" (sites {"C10" "K10"})) (place "Rook1" (sites {"B2" "L2"})) (place "Rook2" (sites {"B10" "L10"})) (place "Elephant1" (sites {"B1" "L1"})) (place "Elephant2" (sites {"B11" "L11"})) (place "Knight_rotated1" (sites {"D1" "J1"})) (place "Knight_rotated2" (sites {"D11" "J11"}))}) (play (do (or {(move (from (forEach (sites Next) if:(and (= (what at:(site)) (id "Pawn" Mover)) (<= (value Piece at:(site)) 2)))) (to (forEach (sites Empty) if:(if (is Mover P1) (and (is Enemy (who at:(ahead (site) NE))) (is Enemy (who at:(ahead (site) NW)))) (and (is Enemy (who at:(ahead (site) SE))) (is Enemy (who at:(ahead (site) SW))))))) (then (and (set Value at:(last To) (if (is Mover P1) 11 12)) (set State at:(last To) 1)))) (move (from (forEach (sites Next) if:(and {(= (what at:(site)) (id "Pawn" Mover)) (or (= (value Piece at:(site)) 11) (= (value Piece at:(site)) 12)) (= (state at:(site)) 1)}))) (to (mapEntry "InitShahPawn" Mover) if:(is Empty (to))) (then (set State at:(last To) 2))) (if (and (!= (value Player Mover) 1) (is Threatened (id "King_noCross" Mover))) (forEach Site (difference (sites Occupied by:Mover container:"Board") (sites Occupied by:Mover container:"Board" component:"King_noCross")) (move Swap Pieces (where "King_noCross" Mover) (site) (then (set Value Mover 1))))) (forEach Piece)}) ifAfterwards:(and (not (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (not (is Threatened (id "King_noCross" Mover)))))) (end {(if (no Moves Next) (result Mover Win)) (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (or (= (what at:(mapEntry "ExtraSquare" P1)) (id "King_noCross" P2)) (= (what at:(mapEntry "ExtraSquare" P2)) (id "King_noCross" P1))) (result Mover Draw))})))
4x16 board. The pieces move as follows, with the number per player: Shah (king)x1: moves one space orthogonally or diagonally. Fers (counselor)x1: one square diagonally; Rukh (rook)x2: any number of spaces orthogonally; Pil (elephant)x2: two squares diagonally, jumping over the first, cannot capture another Pil; Asb (horse)x2: moves orthogonally one space and then diagonally one space, jumping over any intervening pieces; Sarbaz (soldier)x8: moves one space forward orthogonally or one space forward diagonally to capture. No en passant, promoted to Fers when reaching the sixteenth rank. Pieces are placed with the Shah and Fers in the center of the row closest to the player (Shah to the right), a Pil on either side of them, the Asb on the two center squares in the second row, flanked by the Rukh, and the Sarbaz on the fifth and sixth rows. Movement of the pieces is determined by one six-sided die, with the following throws: 6=Shah, 5=Fers, 4=Pil, 3=Asb, 2=Rukh, 1=Sarbaz. No castling. Stalemate results in win for player causing it. When the Shah is in check, the opponent must roll a 6 for it to escape. The player who checkmates the Shah wins.
(game "Shatranj al-Mustatila" (players {(player N) (player S)}) (equipment {(board (rectangle 16 4)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Elephant" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "Elephant" Next))))) (apply (remove (to)))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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 "Queen") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (dice d:6 from:1 num:1)}) (rules (start {(place "Pawn1" (union (sites Row 4) (sites Row 5))) (place "Pawn2" (union (sites Row 10) (sites Row 11))) (place "Elephant1" (sites {"A1" "D1"})) (place "Knight1" (sites {"B2" "C2"})) (place "Rook1" (sites {"A2" "D2"})) (place "King_noCross1" coord:"B1") (place "Queen1" coord:"C1") (place "Elephant2" (sites {"A16" "D16"})) (place "Knight2" (sites {"B15" "C15"})) (place "Rook2" (sites {"A15" "D15"})) (place "King_noCross2" coord:"C16") (place "Queen2" coord:"B16")}) (play (do (do (roll) next:(if (is Threatened (id "King_noCross" Next) (forEach Piece)) (move Pass (then (trigger "NextCanNotEscape" (next)))) (if (= (count Pips) 6) (forEach Piece "King_noCross") (if (= (count Pips) 5) (forEach Piece "Queen") (if (= (count Pips) 4) (forEach Piece "Elephant") (if (= (count Pips) 3) (forEach Piece "Knight") (if (= (count Pips) 2) (forEach Piece "Rook") (forEach Piece "Pawn")))))))) ifAfterwards:(not (is Threatened (id "King_noCross" Mover) (forEach Piece Next))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (is Triggered "CanNotEscape" Next) (result Mover Win)) (if (not (can Move (forEach Piece Next))) (result Mover Win))})))
###Description 4x16 board. The pieces move as follows, with the number per player: Shah (king)x1: moves one space orthogonally or diagonally. Fers (counselor)x1: one square diagonally; Rukh (rook)x2: any number of spaces orthogonally; Pil (elephant)x2: two squares diagonally, jumping over the first, cannot capture another Pil; Asb (horse)x2: moves orthogonally one space and then diagonally one space, jumping over any intervening pieces; Sarbaz (soldier)x8: moves one space forward orthogonally or one space forward diagonally to capture. No en passant, promoted to Fers when reaching the sixteenth rank. Pieces are placed with the Shah and Fers in the center of the row closest to the player (Shah to the right), a Pil on either side of them, the Asb on the two center squares in the second row, flanked by the Rukh, and the Sarbaz on the fifth and sixth rows. Movement of the pieces is determined by one six-sided die, with the following throws: 6=Shah, 5=Fers, 4=Pil, 3=Asb, 2=Rukh, 1=Sarbaz. No castling. Stalemate results in win for player causing it. When the Shah is in check, the opponent must roll a 6 for it to escape. The player who checkmates the Shah wins. ###Ludii (game "Shatranj al-Mustatila" (players {(player N) (player S)}) (equipment {(board (rectangle 16 4)) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Elephant" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "Elephant" Next))))) (apply (remove (to)))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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 "Queen") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (dice d:6 from:1 num:1)}) (rules (start {(place "Pawn1" (union (sites Row 4) (sites Row 5))) (place "Pawn2" (union (sites Row 10) (sites Row 11))) (place "Elephant1" (sites {"A1" "D1"})) (place "Knight1" (sites {"B2" "C2"})) (place "Rook1" (sites {"A2" "D2"})) (place "King_noCross1" coord:"B1") (place "Queen1" coord:"C1") (place "Elephant2" (sites {"A16" "D16"})) (place "Knight2" (sites {"B15" "C15"})) (place "Rook2" (sites {"A15" "D15"})) (place "King_noCross2" coord:"C16") (place "Queen2" coord:"B16")}) (play (do (do (roll) next:(if (is Threatened (id "King_noCross" Next) (forEach Piece)) (move Pass (then (trigger "NextCanNotEscape" (next)))) (if (= (count Pips) 6) (forEach Piece "King_noCross") (if (= (count Pips) 5) (forEach Piece "Queen") (if (= (count Pips) 4) (forEach Piece "Elephant") (if (= (count Pips) 3) (forEach Piece "Knight") (if (= (count Pips) 2) (forEach Piece "Rook") (forEach Piece "Pawn")))))))) ifAfterwards:(not (is Threatened (id "King_noCross" Mover) (forEach Piece Next))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (is Triggered "CanNotEscape" Next) (result Mover Win)) (if (not (can Move (forEach Piece Next))) (result Mover Win))})))
Circular board. Empty central circle, with four concentric rows of spaces, sixteen spaces per circle. Pieces are as follows: Rukh (x2), placed on two adjacent squares in the outer circle, move any number of spaces orthogonally; Asb (x2), placed in the two spaces adjacent to the Rukh in the next circle, move as Chess knights; Pil (x2): Placed in the two spaces adjacent to the Asb in the next circle in, move two spaces diagonally, jumping over the first space; Fres (x1): placed on the inner circle adjacent to the left Pil, moves one space diagonally; Shah (x1), placed to the right of the Fers, moves one space in any direction, Baidaq (x8), placed in each space flanking the other pieces, those on the left move clockwise, those on the right anti-clockwise, one space forward or one space diagonally forward to capture. No en passant, no promotion. When two Baidaq meet and neither can move, the opponent captures them. The opponent who can checkmate the opponent's Shah wins. Rules Murray.
(game "Shatranj ar-Rumiya" (players 2) (equipment {(board (remove (concentric {0 0 0 16 16 16 16}) cells:{1})) (piece "Pawn" Each (or {(move Step (if (= (state at:(from)) 0) CW CCW) (to if:(is Empty (to)))) (move (from) (to (sites Around (sites To (move Step (if (= (state at:(from)) 0) CW CCW) (to if:True))) Orthogonal) if:(and (is Related Diagonal (from) (to)) (is Enemy (who at:(to))))))} (then (if (= (state at:(last To)) 0) (if (= (what at:(ahead (last To) CW)) (id "Pawn" Next)) (and (remove (last To)) (remove (ahead (last To) CW)))) (if (= (what at:(ahead (last To) CCW)) (id "Pawn" Next)) (and (remove (last To)) (remove (ahead (last To) CCW)))))))) (piece "Rook" Each (move Slide Rotational (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" Each (forEach Direction Orthogonal (to if:True (apply (forEach Direction (from (to)) Diagonal (if (and (not (is Friend (who at:(to)))) (= 3 (count Steps Orthogonal (from) (to)))) (move (from) (to (apply if:(is Enemy (who at:(to))) (remove (to))))))))))) (piece "Elephant" Each (move (from) (to (sites Around (sites Around (from) Diagonal) Diagonal) if:(and (not (is Friend (who at:(to)))) (< 2 (count Steps Orthogonal (from) (to)))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))}) (rules (start {(place "Rook1" (sites {52 53})) (place "Rook2" (sites {61 60})) (place "Knight1" (sites {36 37})) (place "Knight2" (sites {44 45})) (place "Elephant1" (sites {20 21})) (place "Elephant2" (sites {28 29})) (place "Queen1" 4) (place "Queen2" 12) (place "King_noCross1" 5) (place "King_noCross2" 13) (place "Pawn1" (sites {3 19 35 51}) state:0) (place "Pawn1" (sites {54 38 22 6}) state:1) (place "Pawn2" (sites {11 27 43 59}) state:0) (place "Pawn2" (sites {14 30 46 62}) state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win))})))
###Description Circular board. Empty central circle, with four concentric rows of spaces, sixteen spaces per circle. Pieces are as follows: Rukh (x2), placed on two adjacent squares in the outer circle, move any number of spaces orthogonally; Asb (x2), placed in the two spaces adjacent to the Rukh in the next circle, move as Chess knights; Pil (x2): Placed in the two spaces adjacent to the Asb in the next circle in, move two spaces diagonally, jumping over the first space; Fres (x1): placed on the inner circle adjacent to the left Pil, moves one space diagonally; Shah (x1), placed to the right of the Fers, moves one space in any direction, Baidaq (x8), placed in each space flanking the other pieces, those on the left move clockwise, those on the right anti-clockwise, one space forward or one space diagonally forward to capture. No en passant, no promotion. When two Baidaq meet and neither can move, the opponent captures them. The opponent who can checkmate the opponent's Shah wins. Rules Murray. ###Ludii (game "Shatranj ar-Rumiya" (players 2) (equipment {(board (remove (concentric {0 0 0 16 16 16 16}) cells:{1})) (piece "Pawn" Each (or {(move Step (if (= (state at:(from)) 0) CW CCW) (to if:(is Empty (to)))) (move (from) (to (sites Around (sites To (move Step (if (= (state at:(from)) 0) CW CCW) (to if:True))) Orthogonal) if:(and (is Related Diagonal (from) (to)) (is Enemy (who at:(to))))))} (then (if (= (state at:(last To)) 0) (if (= (what at:(ahead (last To) CW)) (id "Pawn" Next)) (and (remove (last To)) (remove (ahead (last To) CW)))) (if (= (what at:(ahead (last To) CCW)) (id "Pawn" Next)) (and (remove (last To)) (remove (ahead (last To) CCW)))))))) (piece "Rook" Each (move Slide Rotational (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" Each (forEach Direction Orthogonal (to if:True (apply (forEach Direction (from (to)) Diagonal (if (and (not (is Friend (who at:(to)))) (= 3 (count Steps Orthogonal (from) (to)))) (move (from) (to (apply if:(is Enemy (who at:(to))) (remove (to))))))))))) (piece "Elephant" Each (move (from) (to (sites Around (sites Around (from) Diagonal) Diagonal) if:(and (not (is Friend (who at:(to)))) (< 2 (count Steps Orthogonal (from) (to)))) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))}) (rules (start {(place "Rook1" (sites {52 53})) (place "Rook2" (sites {61 60})) (place "Knight1" (sites {36 37})) (place "Knight2" (sites {44 45})) (place "Elephant1" (sites {20 21})) (place "Elephant2" (sites {28 29})) (place "Queen1" 4) (place "Queen2" 12) (place "King_noCross1" 5) (place "King_noCross2" 13) (place "Pawn1" (sites {3 19 35 51}) state:0) (place "Pawn1" (sites {54 38 22 6}) state:1) (place "Pawn2" (sites {11 27 43 59}) state:0) (place "Pawn2" (sites {14 30 46 62}) state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win))})))
10x10 board. The pieces move as follows, with the number per player: 1 x Shah (king): one space orthogonally or diagonally; 1 x Fers (counselor): one square diagonally; 2 x Rukh (rook): any number of spaces orthogonally; 2x Dabbaba: one space orthogonally or diagonally; 2 x Pil (elephant): two squares diagonally, jumping over the first. Cannot capture another Pil; 2 x Asb (horse): one square orthogonally, and then one square diagonally, jumping over any intervening pieces; 10 x Sarbaz (soldier): one space forward orthogonally or one space forward diagonally to capture. No en passant. Sarbaz begins in the third rank, and is promoted to Fers when reaching the tenth rank, only if the Fers has been captured. Otherwise, the other player captures it. No castling. Stalemate results in win for player causing it. The player who checkmates the king wins.
(game "Shatranj at-Tamma" (players {(player N) (player S)}) (equipment {(piece "Pawn" 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 "Queen" Mover) -1) (promote (last To) (piece "Queen") Mover) (remove (last To))))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Wazir" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "Elephant" Next))))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (board (square 10))}) (rules (start {(place "Pawn1" (sites Row 2)) (place "Pawn2" (sites Row 7)) (place "Rook1" (sites {"A1" "J1"})) (place "Rook2" (sites {"A10" "J10"})) (place "Knight1" (sites {"B1" "I1"})) (place "Knight2" (sites {"B10" "I10"})) (place "Elephant1" (sites {"C1" "H1"})) (place "Elephant2" (sites {"C10" "H10"})) (place "Wazir1" (sites {"D1" "G1"})) (place "Wazir2" (sites {"D10" "G10"})) (place "Queen1" coord:"E1") (place "Queen2" coord:"F10") (place "King_noCross1" coord:"F1") (place "King_noCross2" coord:"E10")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
###Description 10x10 board. The pieces move as follows, with the number per player: 1 x Shah (king): one space orthogonally or diagonally; 1 x Fers (counselor): one square diagonally; 2 x Rukh (rook): any number of spaces orthogonally; 2x Dabbaba: one space orthogonally or diagonally; 2 x Pil (elephant): two squares diagonally, jumping over the first. Cannot capture another Pil; 2 x Asb (horse): one square orthogonally, and then one square diagonally, jumping over any intervening pieces; 10 x Sarbaz (soldier): one space forward orthogonally or one space forward diagonally to capture. No en passant. Sarbaz begins in the third rank, and is promoted to Fers when reaching the tenth rank, only if the Fers has been captured. Otherwise, the other player captures it. No castling. Stalemate results in win for player causing it. The player who checkmates the king wins. ###Ludii (game "Shatranj at-Tamma" (players {(player N) (player S)}) (equipment {(piece "Pawn" 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 "Queen" Mover) -1) (promote (last To) (piece "Queen") Mover) (remove (last To))))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Wazir" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (and (is Enemy (who at:(to))) (not (= (what at:(to)) (id "Elephant" Next))))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (board (square 10))}) (rules (start {(place "Pawn1" (sites Row 2)) (place "Pawn2" (sites Row 7)) (place "Rook1" (sites {"A1" "J1"})) (place "Rook2" (sites {"A10" "J10"})) (place "Knight1" (sites {"B1" "I1"})) (place "Knight2" (sites {"B10" "I10"})) (place "Elephant1" (sites {"C1" "H1"})) (place "Elephant2" (sites {"C10" "H10"})) (place "Wazir1" (sites {"D1" "G1"})) (place "Wazir2" (sites {"D10" "G10"})) (place "Queen1" coord:"E1") (place "Queen2" coord:"F10") (place "King_noCross1" coord:"F1") (place "King_noCross2" coord:"E10")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): One square diagonally. 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): Two squares diagonally, jumping over the first. Cannot capture another Pil. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the eighth rank. No castling. Stalemate results in win for player causing it. The player who checkmates the king wins.
(game "Shatranj" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "Ferz_noCross") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x Shah (king): moves one space orthogonally or diagonally. 1 x Fers (counselor): One square diagonally. 2 x Rukh (rook): Any number of spaces orthogonally. 2 x Pil (elephant): Two squares diagonally, jumping over the first. Cannot capture another Pil. 2 x Asb (horse): Moves as a chess knight. 8 x Sarbaz (soldier): Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the eighth rank. No castling. Stalemate results in win for player causing it. The player who checkmates the king wins. ###Ludii (game "Shatranj" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "Ferz_noCross") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
8x8 checkered board. Pieces move according to specialized moves, as follows: Piyatha (x8): can move one space forward, and one space forward diagonally to capture. When they reach the final rank, they may be promoted to the piece belonging to that rank, as long as it has already been captured by the opponent; Rukh (castle), (x2): can move any number of spaces orthogonally; Fil (elephant), (x2): can move any number of spaces diagonally; Ghoda (horse), (2): moves in any direction, one space orthogonally with one space forward diagonally; Farthir (x1): can move any number of spaces orthogonally or diagonally; Shah (x1): can move one space orthogonally or diagonally, and can also move like the horse if it has not yet been checked. The pieces are arranged as in Chess. Players capture pieces by moving onto a space occupied by an opponent's piece. When a player can capture the opponent's Shah on the next turn, the Shah is in Check, the opponent's next move must free the Shah from Check. If the opponent cannot, it is Checkmate and the player wins. Stalemate is allowed.
(game "Shatren" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 (and (is In (last To) (sites Corners)) (< (count Sites in:(sites Occupied by:Mover component:"Castle")) 2)) (promote (last To) (piece (id "Castle" Mover))) (if (and (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (< (count Sites in:(sites Occupied by:Mover component:"Horse")) 2)) (promote (last To) (piece (id "Horse" Mover))) (if (and (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (< (count Sites in:(sites Occupied by:Mover component:"Elephant")) 2)) (promote (last To) (piece (id "Elephant" Mover))) (if (and (= (column of:(last To)) 3) (< (count Sites in:(sites Occupied by:Mover component:"Queen")) 1)) (promote (last To) (piece (id "Queen" Mover))))))))))) (piece "Castle" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (not (is Threatened (id "King_noCross" Mover))) (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 "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Horse" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Castle1" {"A1" "H1"} state:1) (place "Horse1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King_noCross1" coord:"E1" state:1) (place "Castle2" {"A8" "H8"} state:1) (place "Horse2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 8x8 checkered board. Pieces move according to specialized moves, as follows: Piyatha (x8): can move one space forward, and one space forward diagonally to capture. When they reach the final rank, they may be promoted to the piece belonging to that rank, as long as it has already been captured by the opponent; Rukh (castle), (x2): can move any number of spaces orthogonally; Fil (elephant), (x2): can move any number of spaces diagonally; Ghoda (horse), (2): moves in any direction, one space orthogonally with one space forward diagonally; Farthir (x1): can move any number of spaces orthogonally or diagonally; Shah (x1): can move one space orthogonally or diagonally, and can also move like the horse if it has not yet been checked. The pieces are arranged as in Chess. Players capture pieces by moving onto a space occupied by an opponent's piece. When a player can capture the opponent's Shah on the next turn, the Shah is in Check, the opponent's next move must free the Shah from Check. If the opponent cannot, it is Checkmate and the player wins. Stalemate is allowed. ###Ludii (game "Shatren" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 (and (is In (last To) (sites Corners)) (< (count Sites in:(sites Occupied by:Mover component:"Castle")) 2)) (promote (last To) (piece (id "Castle" Mover))) (if (and (or (= (column of:(last To)) 1) (= (column of:(last To)) 6)) (< (count Sites in:(sites Occupied by:Mover component:"Horse")) 2)) (promote (last To) (piece (id "Horse" Mover))) (if (and (or (= (column of:(last To)) 2) (= (column of:(last To)) 5)) (< (count Sites in:(sites Occupied by:Mover component:"Elephant")) 2)) (promote (last To) (piece (id "Elephant" Mover))) (if (and (= (column of:(last To)) 3) (< (count Sites in:(sites Occupied by:Mover component:"Queen")) 1)) (promote (last To) (piece (id "Queen" Mover))))))))))) (piece "Castle" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (not (is Threatened (id "King_noCross" Mover))) (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 "Elephant" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Horse" 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 "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Castle1" {"A1" "H1"} state:1) (place "Horse1" {"B1" "G1"}) (place "Elephant1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King_noCross1" coord:"E1" state:1) (place "Castle2" {"A8" "H8"} state:1) (place "Horse2" {"B8" "G8"}) (place "Elephant2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King_noCross2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
8x8 checkered board, with the left corner black for each player. Pieces with specialized moves, as follows: Noyion (x1): moves one space in any direction; Merzé (x1, "dog"): moves one space diagonally; Taba (x2, "camel"): move two spaces diagonally, jumping over the first square; Ot (x2, "horse"): move as a Chess knight; Targa (x2, "cart"); moves orthogonally over any distance; Oi (x8, "child"): moves one space forward orthogonally, one space forward diagonally to capture. May move two spaces on the first turn of the game. When it reaches the opposite edge of the board, it is promoted to Merzé. Pieces are captured when an opponent's piece moves to the square occupied by that piece. The goal is to checkmate the Noyion, and it must not be in check at the end of the player's turn, if possible. If checkmate is made without capturing all of the Oi, the game is a draw.
(game "Shodra" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Camel" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "Dog") Mover))))) (piece "Dog" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Camel1" {"C1" "F1"}) (place "Dog1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Camel2" {"C8" "F8"}) (place "Dog2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) {(if (no Pieces Next "Pawn") (result Mover Win)) (if (!= (count Pieces Next "Pawn") 0) (result Mover Draw))}))))
###Description 8x8 checkered board, with the left corner black for each player. Pieces with specialized moves, as follows: Noyion (x1): moves one space in any direction; Merzé (x1, "dog"): moves one space diagonally; Taba (x2, "camel"): move two spaces diagonally, jumping over the first square; Ot (x2, "horse"): move as a Chess knight; Targa (x2, "cart"); moves orthogonally over any distance; Oi (x8, "child"): moves one space forward orthogonally, one space forward diagonally to capture. May move two spaces on the first turn of the game. When it reaches the opposite edge of the board, it is promoted to Merzé. Pieces are captured when an opponent's piece moves to the square occupied by that piece. The goal is to checkmate the Noyion, and it must not be in check at the end of the player's turn, if possible. If checkmate is made without capturing all of the Oi, the game is a draw. ###Ludii (game "Shodra" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:5) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Camel" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (promote (last To) (piece "Dog") Mover))))) (piece "Dog" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Camel1" {"C1" "F1"}) (place "Dog1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Camel2" {"C8" "F8"}) (place "Dog2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) {(if (no Pieces Next "Pawn") (result Mover Win)) (if (!= (count Pieces Next "Pawn") 0) (result Mover Draw))}))))
8x8 board, with diagonals drawn in the 2x2 squares in each corner, as well as the diagonals of the entire board. Each player has a complement of pieces, with special moves as follows: Min-gyi (x1, "Great King"): moves one space in any direction; Sit-ké (x1, "Lieutenant-General"): moves one space diagonally; Sin (x2, "Elephant"): moves one space diagonally or orthogonally forward; Myin (x2, "Horse"): moves as a Chess knight; Yattah (x2, "Chariot"): moves orthogonally any distance; Nè (x8): moves one space orthogonally forward or one space forward diagonally to capture. Promotes to Sit-kè on the next turn after moving to one of the spaces with a diagonal on the opponent's side of the board. At the beginning of the game, the board is laid out with the four of the Nè in the left half of the third third row of squares, and four in the right half of the fourth row of squares. Players alternate turns placing the remaining pieces. The Min-gyi are placed in the second space from the right in the second row, and a Sin must be placed next to it. If a player wishes to place one of their pieces in a spot occupied by a Nè, they may do so and place the Nè elsewhere behind the rows of Nè. When all of the pieces are placed, players may continue alternating turns rearranging pieces, one at a time, as they see fit. When one player is satisfied with their pieces, they move a Nè forward and the rearrangement phase ends. Players alternate turns moving their pieces according to their assigned movements. Pieces are captured when an player's piece lands on a space occupied by an opponent's piece. The Min-gyi is in check when it can be taken on the opponent's next turn; it must not remain in check at the end of the player's subsequent turn. The goal is to checkmate the Min-gyi, where it cannot move out of check. A move which causes a stalemate is not allowed.
(game "Sittuyin" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:6) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Step Forwards (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" 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) (difference (sites "DiagonalSites") (sites Mover "Home"))) (promote (last To) (piece "Queen") Mover))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Home" P1 (expand (sites Bottom) steps:3)) (regions "Home" P2 (expand (sites Top) steps:3)) (regions "NoPawnSites" (union (difference (sites Row 3) (expand (sites Right) steps:3)) (difference (sites Row 4) (expand (sites Left) steps:3)))) (regions "PawnSites" (union {(difference (sites Row 2) (expand (sites Right) steps:3)) (difference (sites Row 3) (expand (sites Left) steps:3)) (difference (sites Row 4) (expand (sites Right) steps:3)) (difference (sites Row 5) (expand (sites Left) steps:3))})) (regions "DiagonalSites" (union (union (sites Centre) (expand (sites Corners) steps:1)) (sites {"C6" "F6" "F3" "C3"}))) (map "KingInitPos" {(pair P1 (coord "G2")) (pair P2 (coord "B7"))})}) (rules (start {(place "Pawn1" (difference (sites Row 2) (expand (sites Right) steps:3))) (place "Pawn1" (difference (sites Row 3) (expand (sites Left) steps:3))) (place "Pawn2" (difference (sites Row 4) (expand (sites Right) steps:3))) (place "Pawn2" (difference (sites Row 5) (expand (sites Left) steps:3))) (place "King_noCross1" (handSite P1)) (place "King_noCross2" (handSite P2)) (place "Queen1" (handSite P1 1)) (place "Queen2" (handSite P2 1)) (place "Elephant1" (handSite P1 2) count:2) (place "Elephant2" (handSite P2 2) count:2) (place "Knight1" (handSite P1 3) count:2) (place "Knight2" (handSite P2 3) count:2) (place "Rook1" (handSite P1 4) count:2) (place "Rook2" (handSite P2 4) count:2)}) phases:{(phase "PlaceKing" (play (move (from (sites Occupied by:Mover container:"Hand" component:"King_noCross")) (to (mapEntry "KingInitPos" Mover)))) (nextPhase Mover "PlaceFirstElephant")) (phase "PlaceFirstElephant" (play (move (from (sites Occupied by:Mover container:"Hand" component:"Elephant")) (to (sites Around (mapEntry "KingInitPos" Mover))))) (nextPhase Mover "PlaceOtherPieces")) (phase "PlaceOtherPieces" (play (if (!= 0 (count Sites in:(sites Occupied by:Mover container:"Hand" component:"Pawn"))) (move (from (sites Occupied by:Mover container:"Hand" component:"Pawn")) (to (intersection (difference (sites Mover) (union (sites "PawnSites") (sites "NoPawnSites"))) (sites Empty)))) (or (if (= 0 (count Sites in:(union (sites Occupied by:P1 container:"Hand") (sites Occupied by:P2 container:"Hand")))) (or (forEach Piece "Pawn" (move Step Forward (to if:(is Empty (to))))) (move (from (difference (sites Occupied by:Mover container:"Board") (sites Occupied by:Mover container:"Board" component:"Pawn"))) (to (difference (intersection (sites Mover) (union (sites Empty) (sites Occupied by:Mover container:"Board" component:"Pawn"))) (sites "NoPawnSites")) (apply (if (is Occupied (to)) (fromTo (from (to)) (to (handSite Mover 5)))))) (then (if (!= 0 (count Sites in:(sites Occupied by:Mover container:"Hand" component:"Pawn"))) (moveAgain)))))) (move (from (sites Occupied by:Mover container:"Hand")) (to (difference (intersection (sites Mover) (union (sites Empty) (sites Occupied by:Mover container:"Board" component:"Pawn"))) (sites "NoPawnSites")) (apply (if (is Occupied (to)) (fromTo (from (to)) (to (handSite Mover 5)))))) (then (if (!= 0 (count Sites in:(sites Occupied by:Mover container:"Hand" component:"Pawn"))) (moveAgain))))))) (nextPhase (and (is In (last From) (sites Board)) (= (what at:(last To)) (id "Pawn" Mover))) "Playing")) (phase "Playing" (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win))))}))
###Description 8x8 board, with diagonals drawn in the 2x2 squares in each corner, as well as the diagonals of the entire board. Each player has a complement of pieces, with special moves as follows: Min-gyi (x1, "Great King"): moves one space in any direction; Sit-ké (x1, "Lieutenant-General"): moves one space diagonally; Sin (x2, "Elephant"): moves one space diagonally or orthogonally forward; Myin (x2, "Horse"): moves as a Chess knight; Yattah (x2, "Chariot"): moves orthogonally any distance; Nè (x8): moves one space orthogonally forward or one space forward diagonally to capture. Promotes to Sit-kè on the next turn after moving to one of the spaces with a diagonal on the opponent's side of the board. At the beginning of the game, the board is laid out with the four of the Nè in the left half of the third third row of squares, and four in the right half of the fourth row of squares. Players alternate turns placing the remaining pieces. The Min-gyi are placed in the second space from the right in the second row, and a Sin must be placed next to it. If a player wishes to place one of their pieces in a spot occupied by a Nè, they may do so and place the Nè elsewhere behind the rows of Nè. When all of the pieces are placed, players may continue alternating turns rearranging pieces, one at a time, as they see fit. When one player is satisfied with their pieces, they move a Nè forward and the rearrangement phase ends. Players alternate turns moving their pieces according to their assigned movements. Pieces are captured when an player's piece lands on a space occupied by an opponent's piece. The Min-gyi is in check when it can be taken on the opponent's next turn; it must not remain in check at the end of the player's subsequent turn. The goal is to checkmate the Min-gyi, where it cannot move out of check. A move which causes a stalemate is not allowed. ###Ludii (game "Sittuyin" (players {(player N) (player S)}) (equipment {(board (square 8)) (hand Each size:6) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Elephant" Each (move Step Forwards (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Pawn" 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) (difference (sites "DiagonalSites") (sites Mover "Home"))) (promote (last To) (piece "Queen") Mover))))) (piece "Queen" Each (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (regions "Home" P1 (expand (sites Bottom) steps:3)) (regions "Home" P2 (expand (sites Top) steps:3)) (regions "NoPawnSites" (union (difference (sites Row 3) (expand (sites Right) steps:3)) (difference (sites Row 4) (expand (sites Left) steps:3)))) (regions "PawnSites" (union {(difference (sites Row 2) (expand (sites Right) steps:3)) (difference (sites Row 3) (expand (sites Left) steps:3)) (difference (sites Row 4) (expand (sites Right) steps:3)) (difference (sites Row 5) (expand (sites Left) steps:3))})) (regions "DiagonalSites" (union (union (sites Centre) (expand (sites Corners) steps:1)) (sites {"C6" "F6" "F3" "C3"}))) (map "KingInitPos" {(pair P1 (coord "G2")) (pair P2 (coord "B7"))})}) (rules (start {(place "Pawn1" (difference (sites Row 2) (expand (sites Right) steps:3))) (place "Pawn1" (difference (sites Row 3) (expand (sites Left) steps:3))) (place "Pawn2" (difference (sites Row 4) (expand (sites Right) steps:3))) (place "Pawn2" (difference (sites Row 5) (expand (sites Left) steps:3))) (place "King_noCross1" (handSite P1)) (place "King_noCross2" (handSite P2)) (place "Queen1" (handSite P1 1)) (place "Queen2" (handSite P2 1)) (place "Elephant1" (handSite P1 2) count:2) (place "Elephant2" (handSite P2 2) count:2) (place "Knight1" (handSite P1 3) count:2) (place "Knight2" (handSite P2 3) count:2) (place "Rook1" (handSite P1 4) count:2) (place "Rook2" (handSite P2 4) count:2)}) phases:{(phase "PlaceKing" (play (move (from (sites Occupied by:Mover container:"Hand" component:"King_noCross")) (to (mapEntry "KingInitPos" Mover)))) (nextPhase Mover "PlaceFirstElephant")) (phase "PlaceFirstElephant" (play (move (from (sites Occupied by:Mover container:"Hand" component:"Elephant")) (to (sites Around (mapEntry "KingInitPos" Mover))))) (nextPhase Mover "PlaceOtherPieces")) (phase "PlaceOtherPieces" (play (if (!= 0 (count Sites in:(sites Occupied by:Mover container:"Hand" component:"Pawn"))) (move (from (sites Occupied by:Mover container:"Hand" component:"Pawn")) (to (intersection (difference (sites Mover) (union (sites "PawnSites") (sites "NoPawnSites"))) (sites Empty)))) (or (if (= 0 (count Sites in:(union (sites Occupied by:P1 container:"Hand") (sites Occupied by:P2 container:"Hand")))) (or (forEach Piece "Pawn" (move Step Forward (to if:(is Empty (to))))) (move (from (difference (sites Occupied by:Mover container:"Board") (sites Occupied by:Mover container:"Board" component:"Pawn"))) (to (difference (intersection (sites Mover) (union (sites Empty) (sites Occupied by:Mover container:"Board" component:"Pawn"))) (sites "NoPawnSites")) (apply (if (is Occupied (to)) (fromTo (from (to)) (to (handSite Mover 5)))))) (then (if (!= 0 (count Sites in:(sites Occupied by:Mover container:"Hand" component:"Pawn"))) (moveAgain)))))) (move (from (sites Occupied by:Mover container:"Hand")) (to (difference (intersection (sites Mover) (union (sites Empty) (sites Occupied by:Mover container:"Board" component:"Pawn"))) (sites "NoPawnSites")) (apply (if (is Occupied (to)) (fromTo (from (to)) (to (handSite Mover 5)))))) (then (if (!= 0 (count Sites in:(sites Occupied by:Mover container:"Hand" component:"Pawn"))) (moveAgain))))))) (nextPhase (and (is In (last From) (sites Board)) (= (what at:(last To)) (id "Pawn" Mover))) "Playing")) (phase "Playing" (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win))))}))
8x8 board, with diagonals in every square. Pieces have special moves, as follows: Raja (king), moves one square in any direction, but on the first move, it may jump two squares or move as a knight, with the exception that it cannot jump two squares diagonally; Mantri (minister), moves orthogonally or diagonally any number of spaces; Gajah (x2); move diagonally any distance; Kuda (horse) x2, moves orthogonally one space then diagonal one space from there, jumping over any intervening pieces; Ter/Chemor (chariot) x2, moves orthogonally any distance; Bídaq (pawn) x8: moves one square forward or one square forward diagonally to capture. May move two spaces forward orthogonally if it is that piece's first move. Upon reaching the opposite edge of the board, the Bídaq moves in the opposite direction, reversing again if it reaches the opposite edge. The Mantri is placed to the right of the Raja at the beginning of play. Castling occurs in two moves, the rook moving to the king and then the king jumping over the rook. Pieces are captured by moving onto a space occupied by an opponent's piece. If the Raja can be captured on its next turn, it is in check. The Raja cannot be in check at the end of its turn. When this is unavoidable, it is checkmate and the opponent wins.
(game "Tepong" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1)))) (if (not (= 1 (state at:(from)))) (or {(move Hop Orthogonal (between (exact 2) if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (if (is In (from) (sites {"E8" "D1"})) (or (if (and {(is Empty (ahead (from) steps:2 W)) (= (what at:(ahead (from) W)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) W))))}) (move (from) (to (ahead (from) steps:2 W)))) (if (and {(is Empty (ahead (from) steps:2 E)) (= (what at:(ahead (from) E)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) E))))}) (move (from) (to (ahead (from) steps:2 E))))))} (then (set State at:(last To) 1)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (and (not (= 1 (state at:(last To)))) (not (is In (last To) (sites {"C1" "E1" "D8" "F8"})))) (set State at:(last To) 1))))) (piece "Pawn" Each (or {(if (and (= 0 (state at:(last To))) (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 (if (= 1 (state at:(from))) Backward Forward) (to if:(is Empty (to)))) (move Step (if (= 1 (state at:(from))) (directions {BR BL}) (directions {FR FL})) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (union (sites Bottom) (sites Top))) (if (= 0 (state at:(last To))) (set State at:(last To) 1) (set State at:(last To) 2))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "King_noCross1" coord:"D1") (place "Queen1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "King_noCross2" coord:"E8") (place "Queen2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 8x8 board, with diagonals in every square. Pieces have special moves, as follows: Raja (king), moves one square in any direction, but on the first move, it may jump two squares or move as a knight, with the exception that it cannot jump two squares diagonally; Mantri (minister), moves orthogonally or diagonally any number of spaces; Gajah (x2); move diagonally any distance; Kuda (horse) x2, moves orthogonally one space then diagonal one space from there, jumping over any intervening pieces; Ter/Chemor (chariot) x2, moves orthogonally any distance; Bídaq (pawn) x8: moves one square forward or one square forward diagonally to capture. May move two spaces forward orthogonally if it is that piece's first move. Upon reaching the opposite edge of the board, the Bídaq moves in the opposite direction, reversing again if it reaches the opposite edge. The Mantri is placed to the right of the Raja at the beginning of play. Castling occurs in two moves, the rook moving to the king and then the king jumping over the rook. Pieces are captured by moving onto a space occupied by an opponent's piece. If the Raja can be captured on its next turn, it is in check. The Raja cannot be in check at the end of its turn. When this is unavoidable, it is checkmate and the opponent wins. ###Ludii (game "Tepong" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King_noCross" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1)))) (if (not (= 1 (state at:(from)))) (or {(move Hop Orthogonal (between (exact 2) if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (if (is In (from) (sites {"E8" "D1"})) (or (if (and {(is Empty (ahead (from) steps:2 W)) (= (what at:(ahead (from) W)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) W))))}) (move (from) (to (ahead (from) steps:2 W)))) (if (and {(is Empty (ahead (from) steps:2 E)) (= (what at:(ahead (from) E)) (id "Rook" Mover)) (not (= 1 (state at:(ahead (from) E))))}) (move (from) (to (ahead (from) steps:2 E))))))} (then (set State at:(last To) 1)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop_noCross" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (if (and (not (= 1 (state at:(last To)))) (not (is In (last To) (sites {"C1" "E1" "D8" "F8"})))) (set State at:(last To) 1))))) (piece "Pawn" Each (or {(if (and (= 0 (state at:(last To))) (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 (if (= 1 (state at:(from))) Backward Forward) (to if:(is Empty (to)))) (move Step (if (= 1 (state at:(from))) (directions {BR BL}) (directions {FR FL})) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (union (sites Bottom) (sites Top))) (if (= 0 (state at:(last To))) (set State at:(last To) 1) (set State at:(last To) 2))))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "King_noCross1" coord:"D1") (place "Queen1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "King_noCross2" coord:"E8") (place "Queen2" coord:"D8")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
8x8 board. Pieces have specific moves, as follows: Mai (x1): moves one space in any direction; Chiroma (x1): Moves one space diagonally; Bintu (x2): moves exactly two spaces diagonally, jumping over the first square; Fer (x2): moves orthogonally one space and then diagonally another space, jumping over any intervening pieces; Kaigamma (x2): moves orthogonally any distance; Gollo: (x8) move one space forward orthogonally, or one space diagonally forward to capture. Pieces capture the opponent's pieces by moving onto the spot they occupy. No en passant; no castling. When the Mai can be captured at the beginning of the opponent's next turn, it is in check and must be removed from this state on the player's turn. If this is not possible, it is checkmate and the player who threatened the Mai wins.
(game "Tsatsarandi" (players 2) (equipment {(board (square 8)) (piece "Pawn" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))}) (rules (start {(place "King_noCross1" coord:"E1") (place "King_noCross2" coord:"E8") (place "Ferz_noCross1" coord:"D1") (place "Ferz_noCross2" coord:"D8") (place "Bishop_noCross1" {"C1" "F1"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Knight1" {"B1" "G1"}) (place "Knight2" {"B8" "G8"}) (place "Rook1" {"A1" "H1"}) (place "Rook2" {"A8" "H8"}) (place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
###Description 8x8 board. Pieces have specific moves, as follows: Mai (x1): moves one space in any direction; Chiroma (x1): Moves one space diagonally; Bintu (x2): moves exactly two spaces diagonally, jumping over the first square; Fer (x2): moves orthogonally one space and then diagonally another space, jumping over any intervening pieces; Kaigamma (x2): moves orthogonally any distance; Gollo: (x8) move one space forward orthogonally, or one space diagonally forward to capture. Pieces capture the opponent's pieces by moving onto the spot they occupy. No en passant; no castling. When the Mai can be captured at the beginning of the opponent's next turn, it is in check and must be removed from this state on the player's turn. If this is not possible, it is checkmate and the player who threatened the Mai wins. ###Ludii (game "Tsatsarandi" (players 2) (equipment {(board (square 8)) (piece "Pawn" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))))}) (rules (start {(place "King_noCross1" coord:"E1") (place "King_noCross2" coord:"E8") (place "Ferz_noCross1" coord:"D1") (place "Ferz_noCross2" coord:"D8") (place "Bishop_noCross1" {"C1" "F1"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Knight1" {"B1" "G1"}) (place "Knight2" {"B8" "G8"}) (place "Rook1" {"A1" "H1"}) (place "Rook2" {"A8" "H8"}) (place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6))}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))) (end (if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)))))
Here, the King and Rook move as usual, and the knight moves exactly two squares, and may jump over a piece doing that. Gardner asks his readers whether white can win. (White can make a draw by taking the opponents rook and thus giving stalemate.). Board of length 8.
(game "1D Chess" (players 2) (equipment {(board (rectangle 1 8)) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" Each (move Leap {{F F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))}) (rules (start {(place "Rook1" coord:"C1") (place "Knight1" coord:"B1") (place "King1" coord:"A1") (place "Rook2" coord:"F1") (place "Knight2" coord:"G1") (place "King2" coord:"H1")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
###Description Here, the King and Rook move as usual, and the knight moves exactly two squares, and may jump over a piece doing that. Gardner asks his readers whether white can win. (White can make a draw by taking the opponents rook and thus giving stalemate.). Board of length 8. ###Ludii (game "1D Chess" (players 2) (equipment {(board (rectangle 1 8)) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" Each (move Leap {{F F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))))}) (rules (start {(place "Rook1" coord:"C1") (place "Knight1" coord:"B1") (place "King1" coord:"A1") (place "Rook2" coord:"F1") (place "Knight2" coord:"G1") (place "King2" coord:"H1")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
8x8 board. The pieces move as follows: King (x1): one space in any direction' Queen (x1): moves one square diagonally. On its first move, the Queen may jump diagonally two squares. The Queen cannot capture when making this move. Bishop (x2): jumps exactly two squares diagonally; Knight (x2): moves one space orthogonally and then one space diagonally, jumping over the intervening spaces; Rook (x2): moves any distance orthogonally; Pawns (x8): move one square forward orthogonally or one square forward diagonally to capture. Pawns may move two squares on their first move, but only if there have been no captures yet in the game. When reaching the opposite edge of the board, pawns may be promoted to Queen if the Queen has already been taken. If the King can be captured on the opponent's next move, it is in check. The King must not be in check at the end of the player's turn. If this is impossible, it is checkmate, and the opponent wins.
(game "Acedrex (Alfonso)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King" 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 "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1))))))) (if (not (= 1 (state at:(from)))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1))))) (piece "Bishop" 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 "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Var 1))))))) (piece "Pawn" 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 "Queen" Mover) -1) (is In (last To) (sites Mover "Promotion"))) (promote (last To) (piece "Queen") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
###Description 8x8 board. The pieces move as follows: King (x1): one space in any direction' Queen (x1): moves one square diagonally. On its first move, the Queen may jump diagonally two squares. The Queen cannot capture when making this move. Bishop (x2): jumps exactly two squares diagonally; Knight (x2): moves one space orthogonally and then one space diagonally, jumping over the intervening spaces; Rook (x2): moves any distance orthogonally; Pawns (x8): move one square forward orthogonally or one square forward diagonally to capture. Pawns may move two squares on their first move, but only if there have been no captures yet in the game. When reaching the opposite edge of the board, pawns may be promoted to Queen if the Queen has already been taken. If the King can be captured on the opponent's next move, it is in check. The King must not be in check at the end of the player's turn. If this is impossible, it is checkmate, and the opponent wins. ###Ludii (game "Acedrex (Alfonso)" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King" 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 "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Var 1))))))) (if (not (= 1 (state at:(from)))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (not (= 1 (state at:(last To)))) (set State at:(last To) 1))))) (piece "Bishop" 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 "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Var 1))))))) (piece "Pawn" 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 "Queen" Mover) -1) (is In (last To) (sites Mover "Promotion"))) (promote (last To) (piece "Queen") Mover))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
A move in Alice chess has two basic stipulations: the move must be legal on the board on which it is played, and the square transferred to on the opposite board must be vacant. (Consequently, capture is possible only on the board upon which a piece currently stands). The en passant rule is removed.
(game "Alice Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:(is Empty (to)) (apply if:(is Empty (to)))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (apply (remove (to)))))} (then (and {(if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter) (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2))})))) (piece "Rook" Each (move Slide Orthogonal (between if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:(and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (and (if (= (state at:(last To)) 1) (set State at:(last To) 0)) (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2)))))) (piece "King" Each (move Step (to if:(and (not (is Friend (who at:(to)))) (or (is Empty (to)) (= (value Piece at:(from)) (value Piece at:(to))))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (and (if (= (state at:(last To)) 1) (set State at:(last To) 0)) (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2)))))) (piece "Bishop" Each (move Slide Diagonal (between if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:(and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (or (is Empty (to)) (= (value Piece at:(from)) (value Piece at:(to))))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2))))) (piece "Queen" Each (move Slide (between if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:(and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (do (set Var "promotedValue" (value Piece at:(last To))) next:(move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover (then (set Value at:(last To) (var "promotedValue"))))) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (do (set Value at:(mapEntry "RookLeft" (mover)) (% (+ (value Piece at:(mapEntry "RookLeft" (mover))) 1) 2)) next:(slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:True (apply (set State at:(from) 0))))))) (do (set Value at:(mapEntry "King" (mover)) (% (+ (value Piece at:(mapEntry "King" (mover))) 1) 2)) next:(move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (do (set Value at:(mapEntry "RookLeft" (mover)) (% (+ (value Piece at:(mapEntry "RookLeft" (mover))) 1) 2)) next:(slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (do (set Value at:(mapEntry "RookRight" (mover)) (% (+ (value Piece at:(mapEntry "RookRight" (mover))) 1) 2)) next:(slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:True (apply (set State at:(from) 0))))))) (do (set Value at:(mapEntry "King" (mover)) (% (+ (value Piece at:(mapEntry "King" (mover))) 1) 2)) next:(move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (do (set Value at:(mapEntry "RookRight" (mover)) (% (+ (value Piece at:(mapEntry "RookRight" (mover))) 1) 2)) next:(slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
###Description A move in Alice chess has two basic stipulations: the move must be legal on the board on which it is played, and the square transferred to on the opposite board must be vacant. (Consequently, capture is possible only on the board upon which a piece currently stands). The en passant rule is removed. ###Ludii (game "Alice Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:(is Empty (to)) (apply if:(is Empty (to)))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (apply (remove (to)))))} (then (and {(if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter) (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2))})))) (piece "Rook" Each (move Slide Orthogonal (between if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:(and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (and (if (= (state at:(last To)) 1) (set State at:(last To) 0)) (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2)))))) (piece "King" Each (move Step (to if:(and (not (is Friend (who at:(to)))) (or (is Empty (to)) (= (value Piece at:(from)) (value Piece at:(to))))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (and (if (= (state at:(last To)) 1) (set State at:(last To) 0)) (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2)))))) (piece "Bishop" Each (move Slide Diagonal (between if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:(and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (or (is Empty (to)) (= (value Piece at:(from)) (value Piece at:(to))))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2))))) (piece "Queen" Each (move Slide (between if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:(and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (apply if:(or (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (is Empty (to))) (if (and (is Enemy (who at:(to))) (= (value Piece at:(from)) (value Piece at:(to)))) (remove (to) (then (set Counter)))))) (then (set Value at:(last To) (% (+ (value Piece at:(last To)) 1) 2))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (do (set Var "promotedValue" (value Piece at:(last To))) next:(move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover (then (set Value at:(last To) (var "promotedValue"))))) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (do (set Value at:(mapEntry "RookLeft" (mover)) (% (+ (value Piece at:(mapEntry "RookLeft" (mover))) 1) 2)) next:(slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:True (apply (set State at:(from) 0))))))) (do (set Value at:(mapEntry "King" (mover)) (% (+ (value Piece at:(mapEntry "King" (mover))) 1) 2)) next:(move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (do (set Value at:(mapEntry "RookLeft" (mover)) (% (+ (value Piece at:(mapEntry "RookLeft" (mover))) 1) 2)) next:(slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (do (set Value at:(mapEntry "RookRight" (mover)) (% (+ (value Piece at:(mapEntry "RookRight" (mover))) 1) 2)) next:(slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(or (is Empty (between)) (!= (value Piece at:(from)) (value Piece at:(between))))) (to if:True (apply (set State at:(from) 0))))))) (do (set Value at:(mapEntry "King" (mover)) (% (+ (value Piece at:(mapEntry "King" (mover))) 1) 2)) next:(move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (do (set Value at:(mapEntry "RookRight" (mover)) (% (+ (value Piece at:(mapEntry "RookRight" (mover))) 1) 2)) next:(slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
The rules are exactly the same as in Chess, except the Queen also has the ability to move as a knight.
(game "Amazon Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter)))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
###Description The rules are exactly the same as in Chess, except the Queen also has the ability to move as a knight. ###Ludii (game "Amazon Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (or (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter)))))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
In standard chess, the captured piece is removed from the board and the capturing piece takes its place. In atomic chess, a capture causes an "explosion" through which both pieces are removed from the board as well as all non-pawn pieces in the eight squares immediately surrounding the capture. Pawns are removed only when capturing, captured directly, or promoted. In case of en passant, the capture is considered to take place on the sixth rank square where the capturing pawn would have landed. Captures that result in the explosion of a player's own king are illegal, and therefore a king can never capture any other piece. To win, a checkmate or an explosion of the opponent king is necessary.
(game "Atomic Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (and {(remove (last To)) (forEach Site (sites Around (last To) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site))))}))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (and {(remove (ahead (last To) Backward)) (remove (last To)) (forEach Site (sites Around (last To) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site))))})))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and {(remove (to)) (forEach Site (sites Around (to) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site)))) (set Counter)})))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(is Empty (to))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and {(remove (to)) (forEach Site (sites Around (to) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site)))) (set Counter)})))))) (piece "Knight" 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))) (and {(remove (to)) (forEach Site (sites Around (to) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site)))) (set Counter)})))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and {(remove (to)) (forEach Site (sites Around (to) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site)))) (set Counter)})))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(and (not (is Threatened (id "King" Mover))) (!= (where "King" Mover) -1))))) (end {(if (or (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (= (where "King" Next) -1)) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
###Description In standard chess, the captured piece is removed from the board and the capturing piece takes its place. In atomic chess, a capture causes an "explosion" through which both pieces are removed from the board as well as all non-pawn pieces in the eight squares immediately surrounding the capture. Pawns are removed only when capturing, captured directly, or promoted. In case of en passant, the capture is considered to take place on the sixth rank square where the capturing pawn would have landed. Captures that result in the explosion of a player's own king are illegal, and therefore a king can never capture any other piece. To win, a checkmate or an explosion of the opponent king is necessary. ###Ludii (game "Atomic Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (and {(remove (last To)) (forEach Site (sites Around (last To) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site))))}))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (and {(remove (ahead (last To) Backward)) (remove (last To)) (forEach Site (sites Around (last To) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site))))})))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and {(remove (to)) (forEach Site (sites Around (to) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site)))) (set Counter)})))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(is Empty (to))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and {(remove (to)) (forEach Site (sites Around (to) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site)))) (set Counter)})))))) (piece "Knight" 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))) (and {(remove (to)) (forEach Site (sites Around (to) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site)))) (set Counter)})))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and {(remove (to)) (forEach Site (sites Around (to) includeSelf:False) (if (and {(is Occupied (site)) (and (not (= (what at:(site)) (id "Pawn" P1))) (not (= (what at:(site)) (id "Pawn" P2))))}) (remove (site)))) (set Counter)})))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(and (not (is Threatened (id "King" Mover))) (!= (where "King" Mover) -1))))) (end {(if (or (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (= (where "King" Next) -1)) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
Beirut chess follows all the rules and conventions of standard chess, with one difference: Before the game begins, each player secretly attaches a red dot to the bottom of one of their pieces (but not the king). This piece is called a bomb carrier. On any turn, instead of moving, a player may say "Boom!" and overturn their bomb carrier. All pieces of either color on squares adjacent to the bomb carrier are removed from the game, as well as the bomb carrier itself. There are two ways to win: Checkmate the opponent. Blow up the enemy king. A captured piece may not be inspected to see whether or not it was a bomb carrier.
(game "Beirut Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) phases:{(phase "Bomb" (play (forEach Site (sites Occupied by:Mover) (if (!= (what at:(site)) (id "King" Mover)) (move Select (from (site)) (then (and (set Value at:(last To) 1) (set Hidden Value at:(last To) to:Next))))))) (nextPhase Mover "Play")) (phase "Play" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (or (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (move Select (from (sites Occupied by:Mover) if:(= 1 (value Piece at:(from)))) (then (forEach Site (sites Around (last To) includeSelf:True) (if (is Occupied (site)) (remove (site))))))))))} (end {(if (or (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (= (where "King" Next) -1)) (result Mover Win)) (if (= (where "King" Mover) -1) (result Mover Loss)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
###Description Beirut chess follows all the rules and conventions of standard chess, with one difference: Before the game begins, each player secretly attaches a red dot to the bottom of one of their pieces (but not the king). This piece is called a bomb carrier. On any turn, instead of moving, a player may say "Boom!" and overturn their bomb carrier. All pieces of either color on squares adjacent to the bomb carrier are removed from the game, as well as the bomb carrier itself. There are two ways to win: Checkmate the opponent. Blow up the enemy king. A captured piece may not be inspected to see whether or not it was a bomb carrier. ###Ludii (game "Beirut Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) phases:{(phase "Bomb" (play (forEach Site (sites Occupied by:Mover) (if (!= (what at:(site)) (id "King" Mover)) (move Select (from (site)) (then (and (set Value at:(last To) 1) (set Hidden Value at:(last To) to:Next))))))) (nextPhase Mover "Play")) (phase "Play" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (or (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (move Select (from (sites Occupied by:Mover) if:(= 1 (value Piece at:(from)))) (then (forEach Site (sites Around (last To) includeSelf:True) (if (is Occupied (site)) (remove (site))))))))))} (end {(if (or (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (= (where "King" Next) -1)) (result Mover Win)) (if (= (where "King" Mover) -1) (result Mover Loss)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
Brusky Chess is played on a hexagonal board with sides of length 4, 5, and 9, and each space oriented vertically. It has 84 spaces. Piece Movement: * Queens, Rooks, Bishops, and Knights move as in Glinski Chess. - Queens slide in any of the 12 directions. - Rooks slide in any of the 6 adjacent directions. - Bishops slide in any of the 6 'diagonal' directions. - Knights move two spaces in any adjacent direction, then one space in another direction. * Kings step in any of the 12 direction, and castle either kingside (moving two spaces) or queenside (moving three spaces). Castling can only take place when neither the King nor the Rook being moved have moved before. * Pawns, when moving from a Pawn start space, can advance without capturing to either of the two spaces slightly left of forward, or either of the two spaces slightly right of forward, unless they are 'blocked'. A Pawn on a Pawn start space is 'blocked' if an enemy piece is adjacent to it in either of the forward adjacent directions. Pawns not on a Pawn start space can only advance one space without capturing. Pawns capture in a forward diagonal direction (i.e., to a space one row forward and off to the side, to a space connected by an edge, and having the same colour). A Pawn on a Pawn start space can also capture forwards (i.e., to the space directly ahead, having the same colour). En passant capture and Pawn promotion take place as in Glinski Chess. The game ends on a checkmate or stalemate.
(game "Brusky Chess" (players {(player N) (player S)}) (equipment {(board (remove (hex Rectangle 8 13) cells:{0 1 13 25 75 88 11 12 24 37 62 74 86 87 98 99})) (piece "King" Each (or {(move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or {(if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True)))))) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 3) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True))))))}))})) (piece "Queen" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step (if (is Mover P1) (directions {WNW ENE}) (directions {WSW ESE})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (if (is Mover P1) (and (is In (ahead (from) steps:1 NNW) (sites Empty)) (is In (ahead (from) steps:1 NNE) (sites Empty))) (and (is In (ahead (from) steps:1 SSW) (sites Empty)) (is In (ahead (from) steps:1 SSE) (sites Empty)))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is In (to) (sites Empty))))) (if (is In (from) (sites Start (piece (what at:(from))))) (or (move Step (if (is Mover P1) (directions {N}) (directions {S})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (if (is Mover P1) (and (is In (ahead (from) steps:1 NNW) (sites Empty)) (is In (ahead (from) steps:1 NNE) (sites Empty))) (and (is In (ahead (from) steps:1 SSW) (sites Empty)) (is In (ahead (from) steps:1 SSE) (sites Empty)))) (if (is Mover P1) (or (move Hop NNW (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) SSE)) (set Var (last To))}))) (move Hop NNE (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) SSW)) (set Var (last To))})))) (or (move Hop SSW (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) NNE)) (set Var (last To))}))) (move Hop SSE (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) NNW)) (set Var (last To))}))))))) (move Step (if (is Mover P1) (directions {WNW ENE}) (directions {WSW ESE})) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (var)))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (map "King" {(pair 1 "F1") (pair 2 "I8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "D8")}) (map "RookRight" {(pair 1 "I1") (pair 2 "L8")}) (regions "PromotionZone" P1 (sites Top)) (regions "PromotionZone" P2 (sites Bottom)) (regions "Region-Dark" (sites Phase 2)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 0))}) (rules (start {(place "King1" coord:"F1" state:1) (place "Queen1" coord:"D1") (place "Rook1" {"A1" "I1"} state:1) (place "Bishop1" {"C1" "G1" "E1"}) (place "Knight1" {"B1" "H1"}) (place "King2" coord:"I8" state:1) (place "Queen2" coord:"G8") (place "Rook2" {"D8" "L8"} state:1) (place "Bishop2" {"F8" "H8" "J8"}) (place "Knight2" {"E8" "K8"}) (place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6))}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
###Description Brusky Chess is played on a hexagonal board with sides of length 4, 5, and 9, and each space oriented vertically. It has 84 spaces. Piece Movement: * Queens, Rooks, Bishops, and Knights move as in Glinski Chess. - Queens slide in any of the 12 directions. - Rooks slide in any of the 6 adjacent directions. - Bishops slide in any of the 6 'diagonal' directions. - Knights move two spaces in any adjacent direction, then one space in another direction. * Kings step in any of the 12 direction, and castle either kingside (moving two spaces) or queenside (moving three spaces). Castling can only take place when neither the King nor the Rook being moved have moved before. * Pawns, when moving from a Pawn start space, can advance without capturing to either of the two spaces slightly left of forward, or either of the two spaces slightly right of forward, unless they are 'blocked'. A Pawn on a Pawn start space is 'blocked' if an enemy piece is adjacent to it in either of the forward adjacent directions. Pawns not on a Pawn start space can only advance one space without capturing. Pawns capture in a forward diagonal direction (i.e., to a space one row forward and off to the side, to a space connected by an edge, and having the same colour). A Pawn on a Pawn start space can also capture forwards (i.e., to the space directly ahead, having the same colour). En passant capture and Pawn promotion take place as in Glinski Chess. The game ends on a checkmate or stalemate. ###Ludii (game "Brusky Chess" (players {(player N) (player S)}) (equipment {(board (remove (hex Rectangle 8 13) cells:{0 1 13 25 75 88 11 12 24 37 62 74 86 87 98 99})) (piece "King" Each (or {(move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or {(if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True)))))) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 3) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True))))))}))})) (piece "Queen" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step (if (is Mover P1) (directions {WNW ENE}) (directions {WSW ESE})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (if (is Mover P1) (and (is In (ahead (from) steps:1 NNW) (sites Empty)) (is In (ahead (from) steps:1 NNE) (sites Empty))) (and (is In (ahead (from) steps:1 SSW) (sites Empty)) (is In (ahead (from) steps:1 SSE) (sites Empty)))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is In (to) (sites Empty))))) (if (is In (from) (sites Start (piece (what at:(from))))) (or (move Step (if (is Mover P1) (directions {N}) (directions {S})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (if (is Mover P1) (and (is In (ahead (from) steps:1 NNW) (sites Empty)) (is In (ahead (from) steps:1 NNE) (sites Empty))) (and (is In (ahead (from) steps:1 SSW) (sites Empty)) (is In (ahead (from) steps:1 SSE) (sites Empty)))) (if (is Mover P1) (or (move Hop NNW (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) SSE)) (set Var (last To))}))) (move Hop NNE (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) SSW)) (set Var (last To))})))) (or (move Hop SSW (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) NNE)) (set Var (last To))}))) (move Hop SSE (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) NNW)) (set Var (last To))}))))))) (move Step (if (is Mover P1) (directions {WNW ENE}) (directions {WSW ESE})) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (var)))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (map "King" {(pair 1 "F1") (pair 2 "I8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "D8")}) (map "RookRight" {(pair 1 "I1") (pair 2 "L8")}) (regions "PromotionZone" P1 (sites Top)) (regions "PromotionZone" P2 (sites Bottom)) (regions "Region-Dark" (sites Phase 2)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 0))}) (rules (start {(place "King1" coord:"F1" state:1) (place "Queen1" coord:"D1") (place "Rook1" {"A1" "I1"} state:1) (place "Bishop1" {"C1" "G1" "E1"}) (place "Knight1" {"B1" "H1"}) (place "King2" coord:"I8" state:1) (place "Queen2" coord:"G8") (place "Rook2" {"D8" "L8"} state:1) (place "Bishop2" {"F8" "H8" "J8"}) (place "Knight2" {"E8" "K8"}) (place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6))}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
Played on an 8x8 board with pieces with specialized moves: Pawns (8): can move one space forward; Rooks (2): can move any number of spaces orthogonally; Bishops (2): can move any number of spaces diagonally; Knight (2): moves in any direction, one space orthogonally with one space forward diagonally; Queens (1): can move any number of spaces orthogonally or diagonally; Kings (1): can move one space orthogonally or diagonally. Players capture pieces by moving onto a space occupied by an opponent's piece. Player wins when they checkmate the other player's king.
(game "Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
###Description Played on an 8x8 board with pieces with specialized moves: Pawns (8): can move one space forward; Rooks (2): can move any number of spaces orthogonally; Bishops (2): can move any number of spaces diagonally; Knight (2): moves in any direction, one space orthogonally with one space forward diagonally; Queens (1): can move any number of spaces orthogonally or diagonally; Kings (1): can move one space orthogonally or diagonally. Players capture pieces by moving onto a space occupied by an opponent's piece. Player wins when they checkmate the other player's king. ###Ludii (game "Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
In Chessence, kings do not move and must remain fixed on their starting squares the entire game. (Thus, a king is unable to move out of check.) A man has capability to move based on its relative position to other friendly men on the board, as follows: - If a man is orthogonally adjacent to a friendly man, then both have the ability to move as a rook in chess. - If a man is diagonally adjacent to a friendly man, then both have the ability to move as a chess bishop. - If a man is a knight's move away from a friendly man, then both have the ability to move as a knight. A man with more than one position relationship has the ability to move in more than one way. Likewise, if a man has no position relationship defined above, that man cannot move. The king has no bearing on how the other men may move. A man may not move to, nor through, a non-existent (blackened-out) square; except that a man moving as a knight may jump over a non-existent square. For a turn, a player may move a man on the board, or alternatively, they may put one of their reserve men in play by placing it on any of their six initial starting squares that are currently open. Checks, checkmate, and captures are as in standard chess. If a player has no legal moves, they lose the game.
(game "Chessence" (players 2) (equipment {(board (rectangle 9 6)) (piece "Pawn" Each (or {(if (not (all Sites (sites Around (from) Orthogonal) if:(not (= (what at:(site)) (id "Pawn" Mover))))) (move Slide Orthogonal (between if:(and (is Empty (between)) (not (is In (between) (sites "BlackenedSquares"))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to))))))) (if (not (all Sites (sites Around (from) Diagonal) if:(not (= (what at:(site)) (id "Pawn" Mover))))) (move Slide Diagonal (between if:(and (is Empty (between)) (not (is In (between) (sites "BlackenedSquares"))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to))))))) (if (not (all Sites (forEach (sites Around (sites To (hop Orthogonal (between if:True) (to if:True))) Orthogonal) if:(= 2 (count Steps (from) (site)))) if:(!= (what at:(site)) (id "Pawn" Mover)))) (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites "BlackenedSquares")))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to)))))))})) (piece "King" Each) (hand Each) (regions "BlackenedSquares" (sites {"A2" "B3" "B5" "C6" "D4" "E5" "E7" "F8"})) (regions "PawnStart" P1 (sites {"E1" "E2" "F2" "D2" "D3" "E3"})) (regions "PawnStart" P2 (sites {"B9" "B8" "A8" "C8" "C7" "B7"}))}) (rules (start {(place "Pawn" "Hand" count:3) (place "Pawn1" (sites P1 "PawnStart")) (place "Pawn2" (sites P2 "PawnStart")) (place "King1" coord:"F1") (place "King2" coord:"A9")}) (play (or (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))) (if (is Occupied (handSite Mover)) (move (from (sites Hand)) (to (sites Mover "PawnStart") if:(is Empty (to))))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))})))
###Description In Chessence, kings do not move and must remain fixed on their starting squares the entire game. (Thus, a king is unable to move out of check.) A man has capability to move based on its relative position to other friendly men on the board, as follows: - If a man is orthogonally adjacent to a friendly man, then both have the ability to move as a rook in chess. - If a man is diagonally adjacent to a friendly man, then both have the ability to move as a chess bishop. - If a man is a knight's move away from a friendly man, then both have the ability to move as a knight. A man with more than one position relationship has the ability to move in more than one way. Likewise, if a man has no position relationship defined above, that man cannot move. The king has no bearing on how the other men may move. A man may not move to, nor through, a non-existent (blackened-out) square; except that a man moving as a knight may jump over a non-existent square. For a turn, a player may move a man on the board, or alternatively, they may put one of their reserve men in play by placing it on any of their six initial starting squares that are currently open. Checks, checkmate, and captures are as in standard chess. If a player has no legal moves, they lose the game. ###Ludii (game "Chessence" (players 2) (equipment {(board (rectangle 9 6)) (piece "Pawn" Each (or {(if (not (all Sites (sites Around (from) Orthogonal) if:(not (= (what at:(site)) (id "Pawn" Mover))))) (move Slide Orthogonal (between if:(and (is Empty (between)) (not (is In (between) (sites "BlackenedSquares"))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to))))))) (if (not (all Sites (sites Around (from) Diagonal) if:(not (= (what at:(site)) (id "Pawn" Mover))))) (move Slide Diagonal (between if:(and (is Empty (between)) (not (is In (between) (sites "BlackenedSquares"))))) (to if:(is Enemy (who at:(to))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to))))))) (if (not (all Sites (forEach (sites Around (sites To (hop Orthogonal (between if:True) (to if:True))) Orthogonal) if:(= 2 (count Steps (from) (site)))) if:(!= (what at:(site)) (id "Pawn" Mover)))) (move Leap {{F F R F} {F F L F}} (to if:(and (not (is Friend (who at:(to)))) (not (is In (to) (sites "BlackenedSquares")))) (apply if:(not (is In (to) (sites "BlackenedSquares"))) (if (is Enemy (who at:(to))) (remove (to)))))))})) (piece "King" Each) (hand Each) (regions "BlackenedSquares" (sites {"A2" "B3" "B5" "C6" "D4" "E5" "E7" "F8"})) (regions "PawnStart" P1 (sites {"E1" "E2" "F2" "D2" "D3" "E3"})) (regions "PawnStart" P2 (sites {"B9" "B8" "A8" "C8" "C7" "B7"}))}) (rules (start {(place "Pawn" "Hand" count:3) (place "Pawn1" (sites P1 "PawnStart")) (place "Pawn2" (sites P2 "PawnStart")) (place "King1" coord:"F1") (place "King2" coord:"A9")}) (play (or (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))) (if (is Occupied (handSite Mover)) (move (from (sites Hand)) (to (sites Mover "PawnStart") if:(is Empty (to))))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Loss))})))
The 32 pieces in Chex represent the 16 chess pieces on each side of a normal chess game. Each player shuffles his own 16 tiles and places them face down, then white draws his top tile and places it, with the piece oriented so it looks upright to him. Black then draws the top tile in his pile and places it so that it touches white's piece, either orthogonally or diagonally, and oriented so that it looks upright to him. At that point, white can either add another piece or move his piece on the board. A move must be a legal chess move and may not separate any element of the board; all pieces much remain touching, even if just diagonally, when a move has ended. Thus you can "pin" a piece by placing a new piece on the far corner of a piece already in play. The game ends in checkmate or stalemate, with a stalemate occurring when you must place your king into check when you draw it.
(game "Chex" (players {(player N) (player S)}) (equipment {(boardless Square) (hand Each) (tile "Pawn" Each numSides:4 (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))})) (tile "Rook" Each numSides:4 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (tile "King" Each numSides:4 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (tile "Bishop" Each numSides:4 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (tile "Knight" Each numSides:4 (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))))))) (tile "Queen" Each numSides:4 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place Random {(count "Pawn1" 8) (count "Rook1" 2) (count "Knight1" 2) (count "Bishop1" 2) (count "Queen1" 1) (count "King1" 1)} (handSite 1)) (place Random {(count "Pawn2" 8) (count "Rook2" 2) (count "Knight2" 2) (count "Bishop2" 2) (count "Queen2" 1) (count "King2" 1)} (handSite 2)) (forEach Value min:0 max:(topLevel at:(handSite 1)) (set Hidden What at:(handSite 1) level:(value) to:P1)) (forEach Value min:0 max:(topLevel at:(handSite 1)) (set Hidden What at:(handSite 1) level:(value) to:P2)) (forEach Value min:0 max:(topLevel at:(handSite 2)) (set Hidden What at:(handSite 2) level:(value) to:P1)) (forEach Value min:0 max:(topLevel at:(handSite 2)) (set Hidden What at:(handSite 2) level:(value) to:P2))}) (play (if (is Prev Mover) (if (= (count Moves) 1) (move (from (handSite (mover))) (to (centrePoint))) (do (move (from (handSite (mover))) (to (sites Around (union (sites Occupied by:P1 container:"Board") (sites Occupied by:P2 container:"Board")) Empty))) ifAfterwards:(not (is Threatened (id "King" Mover))))) (or (if (is Occupied (handSite (mover))) (move Select (from (handSite (mover))) (then (and {(moveAgain) (set Hidden What at:(last To) level:(topLevel at:(last To)) False to:P1) (set Hidden What at:(last To) level:(topLevel at:(last To)) False to:P2)})))) (do (forEach Piece) ifAfterwards:(and (= 1 (count Groups)) (not (is Threatened (id "King" Mover)))))))) (end {(if (and {(not (can Move (if (!= (what at:(handSite (mover))) 0) (move Select (from (handSite (mover))))))) (!= (where "King" Next) -1) (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(and (= 1 (count Groups)) (not (is Threatened (id "King" Next)))))))}) (result Mover Win)) (if (and {(is Prev Mover) (is Threatened (id "King" Mover)) (not (can Move (do (move (from (handSite (mover))) (to (sites Around (union (sites Occupied by:P1 container:"Board") (sites Occupied by:P2 container:"Board")) Empty))) ifAfterwards:(not (is Threatened (id "King" Mover))))))}) (result Next Win)) (if (no Moves Mover) (result Mover Draw))})))
###Description The 32 pieces in Chex represent the 16 chess pieces on each side of a normal chess game. Each player shuffles his own 16 tiles and places them face down, then white draws his top tile and places it, with the piece oriented so it looks upright to him. Black then draws the top tile in his pile and places it so that it touches white's piece, either orthogonally or diagonally, and oriented so that it looks upright to him. At that point, white can either add another piece or move his piece on the board. A move must be a legal chess move and may not separate any element of the board; all pieces much remain touching, even if just diagonally, when a move has ended. Thus you can "pin" a piece by placing a new piece on the far corner of a piece already in play. The game ends in checkmate or stalemate, with a stalemate occurring when you must place your king into check when you draw it. ###Ludii (game "Chex" (players {(player N) (player S)}) (equipment {(boardless Square) (hand Each) (tile "Pawn" Each numSides:4 (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))})) (tile "Rook" Each numSides:4 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (tile "King" Each numSides:4 (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (tile "Bishop" Each numSides:4 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (tile "Knight" Each numSides:4 (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))))))) (tile "Queen" Each numSides:4 (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to))))))}) (rules (start {(place Random {(count "Pawn1" 8) (count "Rook1" 2) (count "Knight1" 2) (count "Bishop1" 2) (count "Queen1" 1) (count "King1" 1)} (handSite 1)) (place Random {(count "Pawn2" 8) (count "Rook2" 2) (count "Knight2" 2) (count "Bishop2" 2) (count "Queen2" 1) (count "King2" 1)} (handSite 2)) (forEach Value min:0 max:(topLevel at:(handSite 1)) (set Hidden What at:(handSite 1) level:(value) to:P1)) (forEach Value min:0 max:(topLevel at:(handSite 1)) (set Hidden What at:(handSite 1) level:(value) to:P2)) (forEach Value min:0 max:(topLevel at:(handSite 2)) (set Hidden What at:(handSite 2) level:(value) to:P1)) (forEach Value min:0 max:(topLevel at:(handSite 2)) (set Hidden What at:(handSite 2) level:(value) to:P2))}) (play (if (is Prev Mover) (if (= (count Moves) 1) (move (from (handSite (mover))) (to (centrePoint))) (do (move (from (handSite (mover))) (to (sites Around (union (sites Occupied by:P1 container:"Board") (sites Occupied by:P2 container:"Board")) Empty))) ifAfterwards:(not (is Threatened (id "King" Mover))))) (or (if (is Occupied (handSite (mover))) (move Select (from (handSite (mover))) (then (and {(moveAgain) (set Hidden What at:(last To) level:(topLevel at:(last To)) False to:P1) (set Hidden What at:(last To) level:(topLevel at:(last To)) False to:P2)})))) (do (forEach Piece) ifAfterwards:(and (= 1 (count Groups)) (not (is Threatened (id "King" Mover)))))))) (end {(if (and {(not (can Move (if (!= (what at:(handSite (mover))) 0) (move Select (from (handSite (mover))))))) (!= (where "King" Next) -1) (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(and (= 1 (count Groups)) (not (is Threatened (id "King" Next)))))))}) (result Mover Win)) (if (and {(is Prev Mover) (is Threatened (id "King" Mover)) (not (can Move (do (move (from (handSite (mover))) (to (sites Around (union (sites Occupied by:P1 container:"Board") (sites Occupied by:P2 container:"Board")) Empty))) ifAfterwards:(not (is Threatened (id "King" Mover))))))}) (result Next Win)) (if (no Moves Mover) (result Mover Draw))})))
8x12 board. Each player begins with a complement of pieces, each with their own powers of movement as follows: King (x1): may move one space in any direction; Queen (x1): moves one space diagonally, may leap two spaces diagonally on its first move over any intervening pieces; Man (x1): moves one space in any direction; Fool (x1): moves orthogonally one space; Courier (x2): moves diagonally any distance; Bishop (x2): moves diagonally two spaces, jumping over any intervening pieces; Knight (x2): moves orthogonally one space and then diagonally another space, jumping over any intervening pieces; Rook (x2): moves orthogonally any distance; Pawns (x12): move forward one space or diagonally forward one space to capture. Only the Rooks' and Queens' pawns may move forward two spaces for their first move. Each player must move the Rooks' Pawns and Queens' Pawn in this way in their first three moves. A piece is captured when an opponent's piece moves onto its space. The King is in check when it can be taken on the opponent's next turn; it must not remain in check at the end of the player's turn. When the king cannot move out of check, it is checkmated and the opponent wins.
(game "Currierspiel" (players {(player N) (player S)}) (equipment {(board (rectangle 8 12)) (regions "StartingPawnRookQueen" P1 (sites {"A2" "G2" "L2"})) (regions "StartingPawnRookQueen" P2 (sites {"A7" "G7" "L7"})) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Hop (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (then (set State at:(last To) 0))))) (piece "Mann" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Fool" Each (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Ferz" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop" Each (move Hop (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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)))))}))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "L1"}) (place "Knight1" {"B1" "K1"}) (place "Ferz1" {"C1" "J1"}) (place "Bishop1" {"D1" "I1"}) (place "Queen1" coord:"G1" state:1) (place "Fool1" coord:"H1") (place "Mann1" coord:"E1") (place "King1" coord:"F1") (place "Rook2" {"A8" "L8"}) (place "Knight2" {"B8" "K8"}) (place "Ferz2" {"C8" "J8"}) (place "Bishop2" {"D8" "I8"}) (place "Queen2" coord:"G8" state:1) (place "Fool2" coord:"H8") (place "Mann2" coord:"E8") (place "King2" coord:"F8")}) phases:{(phase "Opening" (play (forEach Site (intersection (sites Occupied by:Mover) (sites Mover)) (move (from (site)) (to (ahead (site) steps:2 Forward))))) (nextPhase Mover (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Mover)))) "Playing")) (phase "Playing" (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))))} (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
###Description 8x12 board. Each player begins with a complement of pieces, each with their own powers of movement as follows: King (x1): may move one space in any direction; Queen (x1): moves one space diagonally, may leap two spaces diagonally on its first move over any intervening pieces; Man (x1): moves one space in any direction; Fool (x1): moves orthogonally one space; Courier (x2): moves diagonally any distance; Bishop (x2): moves diagonally two spaces, jumping over any intervening pieces; Knight (x2): moves orthogonally one space and then diagonally another space, jumping over any intervening pieces; Rook (x2): moves orthogonally any distance; Pawns (x12): move forward one space or diagonally forward one space to capture. Only the Rooks' and Queens' pawns may move forward two spaces for their first move. Each player must move the Rooks' Pawns and Queens' Pawn in this way in their first three moves. A piece is captured when an opponent's piece moves onto its space. The King is in check when it can be taken on the opponent's next turn; it must not remain in check at the end of the player's turn. When the king cannot move out of check, it is checkmated and the opponent wins. ###Ludii (game "Currierspiel" (players {(player N) (player S)}) (equipment {(board (rectangle 8 12)) (regions "StartingPawnRookQueen" P1 (sites {"A2" "G2" "L2"})) (regions "StartingPawnRookQueen" P2 (sites {"A7" "G7" "L7"})) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Hop (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (then (set State at:(last To) 0))))) (piece "Mann" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Fool" Each (move Step Orthogonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Ferz" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop" Each (move Hop (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Pawn" 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)))))}))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "L1"}) (place "Knight1" {"B1" "K1"}) (place "Ferz1" {"C1" "J1"}) (place "Bishop1" {"D1" "I1"}) (place "Queen1" coord:"G1" state:1) (place "Fool1" coord:"H1") (place "Mann1" coord:"E1") (place "King1" coord:"F1") (place "Rook2" {"A8" "L8"}) (place "Knight2" {"B8" "K8"}) (place "Ferz2" {"C8" "J8"}) (place "Bishop2" {"D8" "I8"}) (place "Queen2" coord:"G8" state:1) (place "Fool2" coord:"H8") (place "Mann2" coord:"E8") (place "King2" coord:"F8")}) phases:{(phase "Opening" (play (forEach Site (intersection (sites Occupied by:Mover) (sites Mover)) (move (from (site)) (to (ahead (site) steps:2 Forward))))) (nextPhase Mover (= 0 (count Sites in:(intersection (sites Occupied by:Mover) (sites Mover)))) "Playing")) (phase "Playing" (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))))} (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
De Vasa Chess is most commonly played on a 9x9 rhombus-shaped board with 81 spaces. It is sometimes played on the original layout, involving a 9x8 rhombus-shaped board with only 72 spaces. Piece Movement: * All pieces other than Kings and Pawns move as in Glinski Chess. - Queens slide in any of the 12 directions. - Rooks slide in any of the 6 adjacent directions. - Bishops slide in any of the 6 'diagonal' directions. - Knights move two spaces in any adjacent direction, then one space in another direction. * Kings step one space in any of the 12 directions, and can castle either kingside (moving two spaces) or queenside (moving three spaces). Castling can only take place when neither the King nor the Rook being moved have moved before. * Pawns advance without capturing to an adjacent space slightly left or right of forward. On their first move, they can move two spaces in either of these directions without capturing. They capture 'diagonally forward' (i.e., to a space ahead connected by an edge, and having the same colour). En passant capture and Pawn promotion take place as in Glinski Chess. The game ends on a checkmate or stalemate. 9x9 rhombus-shaped board, with pieces on rows 1, 3, 7, and 9
(game "De Vasa Chess" (players {(player NNE) (player SSW)}) (equipment {(board (hex Diamond 9)) (piece "King" Each (or {(move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or {(if (is Mover P1) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) WNW (between (exact 2) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) ESE (between (exact 2) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) WNW (between (exact 2) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) WNW (between (exact 2) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) ESE (between (exact 2) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) WNW (between (exact 2) if:True))))))) (if (is Mover P1) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) ESE (between (exact 3) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) WNW (between (exact 3) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) ESE (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) ESE (between (exact 3) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) WNW (between (exact 3) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) ESE (between (exact 3) if:True)))))))}))})) (piece "Queen" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step (if (is Mover P1) (directions {N ENE}) (directions {S WSW})) (to if:(is Empty (to)))) (if (is In (from) (sites Start (piece (what at:(from))))) (if (is Mover P1) (or (move Hop N (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) S)) (set Var (last To))}))) (move Hop ENE (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) WSW)) (set Var (last To))})))) (or (move Hop S (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) N)) (set Var (last To))}))) (move Hop WSW (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) ENE)) (set Var (last To))})))))) (move Step (if (is Mover P1) (directions {NNW E}) (directions {SSE W})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (if (is Mover P1) (directions {NNW E}) (directions {SSE W})) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (var))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (map "King" {(pair 1 "A4") (pair 2 "I4")}) (map "RookLeft" {(pair 1 "A9") (pair 2 "I9")}) (map "RookRight" {(pair 1 "A1") (pair 2 "I1")}) (regions "Region-Dark" (sites Phase 0)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 2)) (regions "PromotionZone" P1 (sites Side NE)) (regions "PromotionZone" P2 (sites Side SW))}) (rules (start {(place "King1" coord:"A4" state:1) (place "Queen1" coord:"A6") (place "Rook1" {"A9" "A1"} state:1) (place "Bishop1" {"A3" "A5" "A7"}) (place "Knight1" {"A8" "A2"}) (place "King2" coord:"I4" state:1) (place "Queen2" coord:"I6") (place "Rook2" {"I9" "I1"} state:1) (place "Bishop2" {"I7" "I5" "I3"}) (place "Knight2" {"I8" "I2"}) (place "Pawn1" {"C9" "C8" "C7" "C6" "C5" "C4" "C3" "C2" "C1"}) (place "Pawn2" {"G1" "G2" "G3" "G4" "G5" "G6" "G7" "G8" "G9"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
###Description De Vasa Chess is most commonly played on a 9x9 rhombus-shaped board with 81 spaces. It is sometimes played on the original layout, involving a 9x8 rhombus-shaped board with only 72 spaces. Piece Movement: * All pieces other than Kings and Pawns move as in Glinski Chess. - Queens slide in any of the 12 directions. - Rooks slide in any of the 6 adjacent directions. - Bishops slide in any of the 6 'diagonal' directions. - Knights move two spaces in any adjacent direction, then one space in another direction. * Kings step one space in any of the 12 directions, and can castle either kingside (moving two spaces) or queenside (moving three spaces). Castling can only take place when neither the King nor the Rook being moved have moved before. * Pawns advance without capturing to an adjacent space slightly left or right of forward. On their first move, they can move two spaces in either of these directions without capturing. They capture 'diagonally forward' (i.e., to a space ahead connected by an edge, and having the same colour). En passant capture and Pawn promotion take place as in Glinski Chess. The game ends on a checkmate or stalemate. 9x9 rhombus-shaped board, with pieces on rows 1, 3, 7, and 9 ###Ludii (game "De Vasa Chess" (players {(player NNE) (player SSW)}) (equipment {(board (hex Diamond 9)) (piece "King" Each (or {(move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or {(if (is Mover P1) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) WNW (between (exact 2) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) ESE (between (exact 2) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) WNW (between (exact 2) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) WNW (between (exact 2) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) ESE (between (exact 2) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) WNW (between (exact 2) if:True))))))) (if (is Mover P1) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) ESE (between (exact 3) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) WNW (between (exact 3) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) ESE (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) ESE (between (exact 3) if:(is In (to) (sites Empty)))))) (move Slide (from (mapEntry "King" (mover))) WNW (between (exact 3) if:(and (is In (to) (sites Empty)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) ESE (between (exact 3) if:True)))))))}))})) (piece "Queen" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step (if (is Mover P1) (directions {N ENE}) (directions {S WSW})) (to if:(is Empty (to)))) (if (is In (from) (sites Start (piece (what at:(from))))) (if (is Mover P1) (or (move Hop N (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) S)) (set Var (last To))}))) (move Hop ENE (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) WSW)) (set Var (last To))})))) (or (move Hop S (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) N)) (set Var (last To))}))) (move Hop WSW (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) ENE)) (set Var (last To))})))))) (move Step (if (is Mover P1) (directions {NNW E}) (directions {SSE W})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (if (is Mover P1) (directions {NNW E}) (directions {SSE W})) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (var))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (map "King" {(pair 1 "A4") (pair 2 "I4")}) (map "RookLeft" {(pair 1 "A9") (pair 2 "I9")}) (map "RookRight" {(pair 1 "A1") (pair 2 "I1")}) (regions "Region-Dark" (sites Phase 0)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 2)) (regions "PromotionZone" P1 (sites Side NE)) (regions "PromotionZone" P2 (sites Side SW))}) (rules (start {(place "King1" coord:"A4" state:1) (place "Queen1" coord:"A6") (place "Rook1" {"A9" "A1"} state:1) (place "Bishop1" {"A3" "A5" "A7"}) (place "Knight1" {"A8" "A2"}) (place "King2" coord:"I4" state:1) (place "Queen2" coord:"I6") (place "Rook2" {"I9" "I1"} state:1) (place "Bishop2" {"I7" "I5" "I3"}) (place "Knight2" {"I8" "I2"}) (place "Pawn1" {"C9" "C8" "C7" "C6" "C5" "C4" "C3" "C2" "C1"}) (place "Pawn2" {"G1" "G2" "G3" "G4" "G5" "G6" "G7" "G8" "G9"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
This game is a variant of classic Chess, which adds a random factor to the strategy. The following list describes all differences of the rules: There is no check or checkmate, it is allowed to move the king to a square attacked by opponent's piece. The goal is to capture opponent's king. A die is rolled for every move. The number determines which piece can be used to make the move. 1 - pawn, 2 - knight, 3 - bishop, 4 - rook, 5 - queen, 6 - king. If a pawn is to be promoted (would advance to the last row), the player can move it even if the die does not show 1. However, he can only promote it to the piece chosen by the die roll - for example, if 3 is rolled, the pawn can be promoted to a bishop only. If 1 is rolled, the pawn can be promoted to any piece. The game is played on a 8x8 board.
(game "Dice Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (dice d:6 from:1 num:1) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" {"A2" "B2" "C2" "D2" "E2" "F2" "G2" "H2"}) (place "Pawn2" {"H7" "G7" "E7" "F7" "D7" "C7" "B7" "A7"}) (place "Bishop1" {"C1" "F1"}) (place "Bishop2" {"C8" "F8"}) (place "Knight1" {"B1" "G1"}) (place "Knight2" {"G8" "B8"}) (place "Rook1" {"A1" "H1"}) (place "Rook2" {"H8" "A8"}) (place "Queen1" coord:"D1") (place "Queen2" coord:"D8") (place "King_noCross1" coord:"E1") (place "King_noCross2" coord:"E8")}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (is Prev Mover) (if (= (count Pips) 1) (or {(move Promote (last To) (piece "Bishop") Mover) (move Promote (last To) (piece "Knight") Mover) (move Promote (last To) (piece "Rook") Mover) (move Promote (last To) (piece "Queen") Mover) (move Promote (last To) (piece "King_noCross") Mover)}) (if (= (count Pips) 2) (move Promote (last To) (piece "Knight") Mover) (if (= (count Pips) 3) (move Promote (last To) (piece "Bishop") Mover) (if (= (count Pips) 4) (move Promote (last To) (piece "Rook") Mover) (if (= (count Pips) 5) (move Promote (last To) (piece "Queen") Mover) (move Promote (last To) (piece "King_noCross") Mover)))))) (or (forEach Die (if (= (pips) 6) (forEach Piece "King_noCross") (if (= (pips) 5) (forEach Piece "Queen") (if (= (pips) 4) (forEach Piece "Rook") (if (= (pips) 2) (forEach Piece "Knight") (if (= (pips) 3) (forEach Piece "Bishop") (if (= (pips) 1) (forEach Piece "Pawn")))))))) (forEach Site (sites Direction from:(sites Mover) (if (is Mover P1) S N) distance:1) (if (= (what at:(site)) (id "Pawn" Mover)) (or (if (can Move (move Step (from (site)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (move Step (from (site)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (if (can Move (move Step (from (site)) Forward (to if:(is Empty (to))))) (move Step (from (site)) Forward (to if:(is Empty (to))))) (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain)))))))))) (end (if (no Pieces Next "King_noCross") (result Next Loss)))))
###Description This game is a variant of classic Chess, which adds a random factor to the strategy. The following list describes all differences of the rules: There is no check or checkmate, it is allowed to move the king to a square attacked by opponent's piece. The goal is to capture opponent's king. A die is rolled for every move. The number determines which piece can be used to make the move. 1 - pawn, 2 - knight, 3 - bishop, 4 - rook, 5 - queen, 6 - king. If a pawn is to be promoted (would advance to the last row), the player can move it even if the die does not show 1. However, he can only promote it to the piece chosen by the die roll - for example, if 3 is rolled, the pawn can be promoted to a bishop only. If 1 is rolled, the pawn can be promoted to any piece. The game is played on a 8x8 board. ###Ludii (game "Dice Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (dice d:6 from:1 num:1) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Knight" 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 "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" {"A2" "B2" "C2" "D2" "E2" "F2" "G2" "H2"}) (place "Pawn2" {"H7" "G7" "E7" "F7" "D7" "C7" "B7" "A7"}) (place "Bishop1" {"C1" "F1"}) (place "Bishop2" {"C8" "F8"}) (place "Knight1" {"B1" "G1"}) (place "Knight2" {"G8" "B8"}) (place "Rook1" {"A1" "H1"}) (place "Rook2" {"H8" "A8"}) (place "Queen1" coord:"D1") (place "Queen2" coord:"D8") (place "King_noCross1" coord:"E1") (place "King_noCross2" coord:"E8")}) (play (do (if (not (is Prev Mover)) (roll)) next:(if (is Prev Mover) (if (= (count Pips) 1) (or {(move Promote (last To) (piece "Bishop") Mover) (move Promote (last To) (piece "Knight") Mover) (move Promote (last To) (piece "Rook") Mover) (move Promote (last To) (piece "Queen") Mover) (move Promote (last To) (piece "King_noCross") Mover)}) (if (= (count Pips) 2) (move Promote (last To) (piece "Knight") Mover) (if (= (count Pips) 3) (move Promote (last To) (piece "Bishop") Mover) (if (= (count Pips) 4) (move Promote (last To) (piece "Rook") Mover) (if (= (count Pips) 5) (move Promote (last To) (piece "Queen") Mover) (move Promote (last To) (piece "King_noCross") Mover)))))) (or (forEach Die (if (= (pips) 6) (forEach Piece "King_noCross") (if (= (pips) 5) (forEach Piece "Queen") (if (= (pips) 4) (forEach Piece "Rook") (if (= (pips) 2) (forEach Piece "Knight") (if (= (pips) 3) (forEach Piece "Bishop") (if (= (pips) 1) (forEach Piece "Pawn")))))))) (forEach Site (sites Direction from:(sites Mover) (if (is Mover P1) S N) distance:1) (if (= (what at:(site)) (id "Pawn" Mover)) (or (if (can Move (move Step (from (site)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (move Step (from (site)) (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (if (can Move (move Step (from (site)) Forward (to if:(is Empty (to))))) (move Step (from (site)) Forward (to if:(is Empty (to))))) (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain)))))))))) (end (if (no Pieces Next "King_noCross") (result Next Loss)))))
Rules are the same as Chess except pawns may move up to four squares on their first move and kings may only castle on their own half of the board. The player that checkmates one of the opposing kings wins.
(game "Double Chess" (players {(player N) (player S)}) (equipment {(board (rectangle 12 16)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (forEach Value min:2 max:4 (move Slide Forward (between (exact (value)) if:(is Empty (between)) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (set Var (last To)))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(is In (to) (sites Pending))) (then (remove (var))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "KingLeft" {(pair 1 "E1") (pair 2 "E12")}) (map "RookLeftLeft" {(pair 1 "A1") (pair 2 "A12")}) (map "RookLeftRight" {(pair 1 "H1") (pair 2 "H12")}) (map "KingRight" {(pair 1 "M1") (pair 2 "M12")}) (map "RookRightLeft" {(pair 1 "I1") (pair 2 "I12")}) (map "RookRightRight" {(pair 1 "P1") (pair 2 "P12")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 10)) (place "Rook1" {"A1" "H1" "I1" "P1"} state:1) (place "Knight1" {"B1" "G1" "J1" "O1"}) (place "Bishop1" {"C1" "F1" "K1" "N1"}) (place "Queen1" {"D1" "L1"}) (place "King1" {"E1" "M1"} state:1) (place "Rook2" {"A12" "H12" "I12" "P12"} state:1) (place "Knight2" {"B12" "G12" "J12" "O12"}) (place "Bishop2" {"C12" "F12" "K12" "N12"}) (place "Queen2" {"D12" "L12"}) (place "King2" {"E12" "M12"} state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (or (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover) in:(sites Occupied by:Mover component:"King")))) (or (if (and {(= (what at:(mapEntry "KingLeft" (mover))) (id "King" Mover)) (= (state at:(mapEntry "KingLeft" (mover))) 1) (not (is Threatened (id "King" Mover) at:(mapEntry "KingLeft" (mover))))}) (or (if (and (= (state at:(mapEntry "RookLeftLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeftLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "KingLeft" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeftLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookLeftRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeftRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "KingLeft" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeftRight" (mover))) W (between (exact 2) if:True)))))))) (if (and {(= (what at:(mapEntry "KingRight" (mover))) (id "King" Mover)) (= (state at:(mapEntry "KingRight" (mover))) 1) (not (is Threatened (id "King" Mover) at:(mapEntry "KingRight" (mover))))}) (or (if (and (= (state at:(mapEntry "RookRightLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRightLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "KingRight" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRightRight" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRightRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRightRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "KingRight" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRightRight" (mover))) W (between (exact 2) if:True)))))))))))) (end {(if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw)) (if (and (is Threatened (id "King" Next) in:(sites Occupied by:Next component:"King")) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next) in:(sites Occupied by:Next component:"King"))))))) (result Mover Win))})))
###Description Rules are the same as Chess except pawns may move up to four squares on their first move and kings may only castle on their own half of the board. The player that checkmates one of the opposing kings wins. ###Ludii (game "Double Chess" (players {(player N) (player S)}) (equipment {(board (rectangle 12 16)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (forEach Value min:2 max:4 (move Slide Forward (between (exact (value)) if:(is Empty (between)) (apply (set Pending (between)))) (to if:(is Empty (to))) (then (set Var (last To)))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(is In (to) (sites Pending))) (then (remove (var))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "KingLeft" {(pair 1 "E1") (pair 2 "E12")}) (map "RookLeftLeft" {(pair 1 "A1") (pair 2 "A12")}) (map "RookLeftRight" {(pair 1 "H1") (pair 2 "H12")}) (map "KingRight" {(pair 1 "M1") (pair 2 "M12")}) (map "RookRightLeft" {(pair 1 "I1") (pair 2 "I12")}) (map "RookRightRight" {(pair 1 "P1") (pair 2 "P12")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 10)) (place "Rook1" {"A1" "H1" "I1" "P1"} state:1) (place "Knight1" {"B1" "G1" "J1" "O1"}) (place "Bishop1" {"C1" "F1" "K1" "N1"}) (place "Queen1" {"D1" "L1"}) (place "King1" {"E1" "M1"} state:1) (place "Rook2" {"A12" "H12" "I12" "P12"} state:1) (place "Knight2" {"B12" "G12" "J12" "O12"}) (place "Bishop2" {"C12" "F12" "K12" "N12"}) (place "Queen2" {"D12" "L12"}) (place "King2" {"E12" "M12"} state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (or (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover) in:(sites Occupied by:Mover component:"King")))) (or (if (and {(= (what at:(mapEntry "KingLeft" (mover))) (id "King" Mover)) (= (state at:(mapEntry "KingLeft" (mover))) 1) (not (is Threatened (id "King" Mover) at:(mapEntry "KingLeft" (mover))))}) (or (if (and (= (state at:(mapEntry "RookLeftLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeftLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "KingLeft" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeftLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookLeftRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeftRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "KingLeft" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeftRight" (mover))) W (between (exact 2) if:True)))))))) (if (and {(= (what at:(mapEntry "KingRight" (mover))) (id "King" Mover)) (= (state at:(mapEntry "KingRight" (mover))) 1) (not (is Threatened (id "King" Mover) at:(mapEntry "KingRight" (mover))))}) (or (if (and (= (state at:(mapEntry "RookRightLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRightLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "KingRight" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRightRight" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRightRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRightRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "KingRight" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRightRight" (mover))) W (between (exact 2) if:True)))))))))))) (end {(if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw)) (if (and (is Threatened (id "King" Next) in:(sites Occupied by:Next component:"King")) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next) in:(sites Occupied by:Next component:"King"))))))) (result Mover Win))})))
Same rules as Chess. Dragons move like queens, but at most three squares.
(game "Dragonchess" (players {(player N) (player S)}) (equipment {(board (merge (square 10) (shift -3 3 (rectangle 4 16)))) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Dragon" Each (move Slide (between (max 3) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "I1") (pair 2 "H10")}) (map "RookLeft" {(pair 1 "E1") (pair 2 "L10")}) (map "RookRight" {(pair 1 "L1") (pair 2 "E10")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 8)) (place "Dragon1" {"D1" "M1"}) (place "Rook1" {"E1" "L1"} state:1) (place "Knight1" {"F1" "K1"}) (place "Bishop1" {"G1" "J1"}) (place "Queen1" coord:"H1") (place "King1" coord:"I1" state:1) (place "Dragon2" {"D10" "M10"}) (place "Rook2" {"E10" "L10"} state:1) (place "Knight2" {"F10" "K10"}) (place "Bishop2" {"G10" "J10"}) (place "Queen2" coord:"I10") (place "King2" coord:"H10" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook" "Dragon"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
###Description Same rules as Chess. Dragons move like queens, but at most three squares. ###Ludii (game "Dragonchess" (players {(player N) (player S)}) (equipment {(board (merge (square 10) (shift -3 3 (rectangle 4 16)))) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Dragon" Each (move Slide (between (max 3) if:(is Empty (between))) (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "I1") (pair 2 "H10")}) (map "RookLeft" {(pair 1 "E1") (pair 2 "L10")}) (map "RookRight" {(pair 1 "L1") (pair 2 "E10")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 8)) (place "Dragon1" {"D1" "M1"}) (place "Rook1" {"E1" "L1"} state:1) (place "Knight1" {"F1" "K1"}) (place "Bishop1" {"G1" "J1"}) (place "Queen1" coord:"H1") (place "King1" coord:"I1" state:1) (place "Dragon2" {"D10" "M10"}) (place "Rook2" {"E10" "L10"} state:1) (place "Knight2" {"F10" "K10"}) (place "Bishop2" {"G10" "J10"}) (place "Queen2" coord:"I10") (place "King2" coord:"H10" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook" "Dragon"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
Before the game, a starting position is randomly determined and set up, subject to certain requirements. White's pieces (not pawns) are placed randomly on the first rank, following two rules: The bishops must be placed on opposite-color squares. The king must be placed on a square between the rooks. Black's pieces are placed equal-and-opposite to White's pieces. (For example, if the white king is randomly determined to start on f1, then the black king is placed on f8.) Pawns are placed on the players' second ranks as in classical chess. After setup, the game is played the same as classical chess in all respects.
(game "Fischer Random Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Rook1" (sites Random (difference (sites Bottom) (expand (sites Right)))) state:1) (place "King1" (sites Random (difference (intersection {(sites Bottom) (expand (sites Occupied by:Mover) steps:8 E) (sites Empty)}) (sites Right))) state:1) (place "Rook1" (sites Random (intersection {(sites Bottom) (expand (sites Occupied by:Mover component:"King") steps:8 E) (sites Empty)})) state:1) (place "Bishop1" (sites Random (intersection {(sites Bottom) (sites Empty) (sites Phase 0)}))) (place "Bishop1" (sites Random (intersection {(sites Bottom) (sites Empty) (sites Phase 1)}))) (place "Knight1" (sites Random (intersection (sites Bottom) (sites Empty)) num:2)) (place "Queen1" (sites Random (intersection (sites Bottom) (sites Empty)))) (place "Pawn1" (sites Row 1)) (place "Rook2" (forEach (sites Top) if:(= (id "Rook1") (what at:(ahead (site) steps:7 S)))) state:1) (place "Bishop2" (forEach (sites Top) if:(= (id "Bishop1") (what at:(ahead (site) steps:7 S))))) (place "Knight2" (forEach (sites Top) if:(= (id "Knight1") (what at:(ahead (site) steps:7 S))))) (place "Queen2" (forEach (sites Top) if:(= (id "Queen1") (what at:(ahead (site) steps:7 S))))) (place "King2" (forEach (sites Top) if:(= (id "King1") (what at:(ahead (site) steps:7 S)))) state:1) (place "Pawn2" (sites Row 6))}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(where "King" Mover)) 1) (not (is Threatened (id "King" Mover)))) (if (is Mover P1) (forEach Site (sites Occupied by:Mover component:"Rook") (if (= (state at:(site)) 1) (if (< (column of:(site)) (column of:(where "King" Mover))) (if (or (can Move (slide (from (site)) (if (< (column of:(site)) (column of:(coord "D1"))) E W) (between (exact (count Steps (coord "D1") (site))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0))))) (= (site) (coord "D1"))) (if (= (where "King" Mover) (coord "C1")) (do (set Var "RookToMove" (site)) next:(move Select (from (where "King" Mover)))) (move Slide (from (where "King" Mover)) (if (< (column of:(where "King" Mover)) (column of:(coord "C1"))) E W) (between (exact (count Steps (coord "C1") (where "King" Mover))) if:(and (or (is Empty (to)) (= (to) (site))) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply if:(or (= (to) (site)) (is Empty (to))) (and (set State at:(from) 0) (set Var "RookToMove" (site)))))) (then (if (= (what at:(var "RookToMove")) (id "Rook" Mover)) (slide (from (var "RookToMove")) (if (< (column of:(var "RookToMove")) (column of:(coord "D1"))) E W) (between (exact (count Steps (coord "D1") (var "RookToMove"))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0)))) (add (piece (id "Rook" Mover)) (to (coord "D1"))))))) (if (or (can Move (slide (from (site)) (if (< (column of:(site)) (column of:(coord "F1"))) E W) (between (exact (count Steps (coord "F1") (site))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0))))) (= (site) (coord "F1"))) (if (= (where "King" Mover) (coord "G1")) (do (set Var "RookToMove" (site)) next:(move Select (from (where "King" Mover)))) (move Slide (from (where "King" Mover)) (if (< (column of:(where "King" Mover)) (column of:(coord "G1"))) E W) (between (exact (count Steps (coord "G1") (where "King" Mover))) if:(and (or (is Empty (to)) (= (to) (site))) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply if:(or (= (to) (site)) (is Empty (to))) (and (set State at:(from) 0) (set Var "RookToMove" (site)))))) (then (if (= (what at:(var "RookToMove")) (id "Rook" Mover)) (slide (from (var "RookToMove")) (if (< (column of:(var "RookToMove")) (column of:(coord "F1"))) E W) (between (exact (count Steps (coord "F1") (var "RookToMove"))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0)))) (add (piece (id "Rook" Mover)) (to (coord "F1")))))))))) (forEach Site (sites Occupied by:Mover component:"Rook") (if (= (state at:(site)) 1) (if (> (column of:(site)) (column of:(where "King" Mover))) (if (or (can Move (slide (from (site)) (if (< (column of:(site)) (column of:(coord "F8"))) E W) (between (exact (count Steps (coord "F8") (site))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0))))) (= (site) (coord "F8"))) (if (= (where "King" Mover) (coord "G8")) (do (set Var "RookToMove" (site)) next:(move Select (from (where "King" Mover)))) (move Slide (from (where "King" Mover)) (if (< (column of:(where "King" Mover)) (column of:(coord "G8"))) E W) (between (exact (count Steps (coord "G8") (where "King" Mover))) if:(and (or (is Empty (to)) (= (to) (site))) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply if:(or (= (to) (site)) (is Empty (to))) (and (set State at:(from) 0) (set Var "RookToMove" (site)))))) (then (if (= (what at:(var "RookToMove")) (id "Rook" Mover)) (slide (from (var "RookToMove")) (if (< (column of:(var "RookToMove")) (column of:(coord "F8"))) E W) (between (exact (count Steps (coord "F8") (var "RookToMove"))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0)))) (add (piece (id "Rook" Mover)) (to (coord "F8"))))))) (if (or (can Move (slide (from (site)) (if (< (column of:(site)) (column of:(coord "D8"))) E W) (between (exact (count Steps (coord "D8") (site))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0))))) (= (site) (coord "D8"))) (if (= (where "King" Mover) (coord "C8")) (do (set Var "RookToMove" (site)) next:(move Select (from (where "King" Mover)))) (move Slide (from (where "King" Mover)) (if (< (column of:(where "King" Mover)) (column of:(coord "C8"))) E W) (between (exact (count Steps (coord "C8") (where "King" Mover))) if:(and (or (is Empty (to)) (= (to) (site))) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply if:(or (= (to) (site)) (is Empty (to))) (and (set State at:(from) 0) (set Var "RookToMove" (site)))))) (then (if (= (what at:(var "RookToMove")) (id "Rook" Mover)) (slide (from (var "RookToMove")) (if (< (column of:(var "RookToMove")) (column of:(coord "D8"))) E W) (between (exact (count Steps (coord "D8") (var "RookToMove"))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0)))) (add (piece (id "Rook" Mover)) (to (coord "D8"))))))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
###Description Before the game, a starting position is randomly determined and set up, subject to certain requirements. White's pieces (not pawns) are placed randomly on the first rank, following two rules: The bishops must be placed on opposite-color squares. The king must be placed on a square between the rooks. Black's pieces are placed equal-and-opposite to White's pieces. (For example, if the white king is randomly determined to start on f1, then the black king is placed on f8.) Pawns are placed on the players' second ranks as in classical chess. After setup, the game is played the same as classical chess in all respects. ###Ludii (game "Fischer Random Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Rook1" (sites Random (difference (sites Bottom) (expand (sites Right)))) state:1) (place "King1" (sites Random (difference (intersection {(sites Bottom) (expand (sites Occupied by:Mover) steps:8 E) (sites Empty)}) (sites Right))) state:1) (place "Rook1" (sites Random (intersection {(sites Bottom) (expand (sites Occupied by:Mover component:"King") steps:8 E) (sites Empty)})) state:1) (place "Bishop1" (sites Random (intersection {(sites Bottom) (sites Empty) (sites Phase 0)}))) (place "Bishop1" (sites Random (intersection {(sites Bottom) (sites Empty) (sites Phase 1)}))) (place "Knight1" (sites Random (intersection (sites Bottom) (sites Empty)) num:2)) (place "Queen1" (sites Random (intersection (sites Bottom) (sites Empty)))) (place "Pawn1" (sites Row 1)) (place "Rook2" (forEach (sites Top) if:(= (id "Rook1") (what at:(ahead (site) steps:7 S)))) state:1) (place "Bishop2" (forEach (sites Top) if:(= (id "Bishop1") (what at:(ahead (site) steps:7 S))))) (place "Knight2" (forEach (sites Top) if:(= (id "Knight1") (what at:(ahead (site) steps:7 S))))) (place "Queen2" (forEach (sites Top) if:(= (id "Queen1") (what at:(ahead (site) steps:7 S))))) (place "King2" (forEach (sites Top) if:(= (id "King1") (what at:(ahead (site) steps:7 S)))) state:1) (place "Pawn2" (sites Row 6))}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(where "King" Mover)) 1) (not (is Threatened (id "King" Mover)))) (if (is Mover P1) (forEach Site (sites Occupied by:Mover component:"Rook") (if (= (state at:(site)) 1) (if (< (column of:(site)) (column of:(where "King" Mover))) (if (or (can Move (slide (from (site)) (if (< (column of:(site)) (column of:(coord "D1"))) E W) (between (exact (count Steps (coord "D1") (site))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0))))) (= (site) (coord "D1"))) (if (= (where "King" Mover) (coord "C1")) (do (set Var "RookToMove" (site)) next:(move Select (from (where "King" Mover)))) (move Slide (from (where "King" Mover)) (if (< (column of:(where "King" Mover)) (column of:(coord "C1"))) E W) (between (exact (count Steps (coord "C1") (where "King" Mover))) if:(and (or (is Empty (to)) (= (to) (site))) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply if:(or (= (to) (site)) (is Empty (to))) (and (set State at:(from) 0) (set Var "RookToMove" (site)))))) (then (if (= (what at:(var "RookToMove")) (id "Rook" Mover)) (slide (from (var "RookToMove")) (if (< (column of:(var "RookToMove")) (column of:(coord "D1"))) E W) (between (exact (count Steps (coord "D1") (var "RookToMove"))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0)))) (add (piece (id "Rook" Mover)) (to (coord "D1"))))))) (if (or (can Move (slide (from (site)) (if (< (column of:(site)) (column of:(coord "F1"))) E W) (between (exact (count Steps (coord "F1") (site))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0))))) (= (site) (coord "F1"))) (if (= (where "King" Mover) (coord "G1")) (do (set Var "RookToMove" (site)) next:(move Select (from (where "King" Mover)))) (move Slide (from (where "King" Mover)) (if (< (column of:(where "King" Mover)) (column of:(coord "G1"))) E W) (between (exact (count Steps (coord "G1") (where "King" Mover))) if:(and (or (is Empty (to)) (= (to) (site))) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply if:(or (= (to) (site)) (is Empty (to))) (and (set State at:(from) 0) (set Var "RookToMove" (site)))))) (then (if (= (what at:(var "RookToMove")) (id "Rook" Mover)) (slide (from (var "RookToMove")) (if (< (column of:(var "RookToMove")) (column of:(coord "F1"))) E W) (between (exact (count Steps (coord "F1") (var "RookToMove"))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0)))) (add (piece (id "Rook" Mover)) (to (coord "F1")))))))))) (forEach Site (sites Occupied by:Mover component:"Rook") (if (= (state at:(site)) 1) (if (> (column of:(site)) (column of:(where "King" Mover))) (if (or (can Move (slide (from (site)) (if (< (column of:(site)) (column of:(coord "F8"))) E W) (between (exact (count Steps (coord "F8") (site))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0))))) (= (site) (coord "F8"))) (if (= (where "King" Mover) (coord "G8")) (do (set Var "RookToMove" (site)) next:(move Select (from (where "King" Mover)))) (move Slide (from (where "King" Mover)) (if (< (column of:(where "King" Mover)) (column of:(coord "G8"))) E W) (between (exact (count Steps (coord "G8") (where "King" Mover))) if:(and (or (is Empty (to)) (= (to) (site))) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply if:(or (= (to) (site)) (is Empty (to))) (and (set State at:(from) 0) (set Var "RookToMove" (site)))))) (then (if (= (what at:(var "RookToMove")) (id "Rook" Mover)) (slide (from (var "RookToMove")) (if (< (column of:(var "RookToMove")) (column of:(coord "F8"))) E W) (between (exact (count Steps (coord "F8") (var "RookToMove"))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0)))) (add (piece (id "Rook" Mover)) (to (coord "F8"))))))) (if (or (can Move (slide (from (site)) (if (< (column of:(site)) (column of:(coord "D8"))) E W) (between (exact (count Steps (coord "D8") (site))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0))))) (= (site) (coord "D8"))) (if (= (where "King" Mover) (coord "C8")) (do (set Var "RookToMove" (site)) next:(move Select (from (where "King" Mover)))) (move Slide (from (where "King" Mover)) (if (< (column of:(where "King" Mover)) (column of:(coord "C8"))) E W) (between (exact (count Steps (coord "C8") (where "King" Mover))) if:(and (or (is Empty (to)) (= (to) (site))) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply if:(or (= (to) (site)) (is Empty (to))) (and (set State at:(from) 0) (set Var "RookToMove" (site)))))) (then (if (= (what at:(var "RookToMove")) (id "Rook" Mover)) (slide (from (var "RookToMove")) (if (< (column of:(var "RookToMove")) (column of:(coord "D8"))) E W) (between (exact (count Steps (coord "D8") (var "RookToMove"))) if:(or (is Empty (to)) (= (what at:(to)) (id "King" Mover)))) (to if:True (apply if:(or (= (what at:(to)) (id "King" Mover)) (is Empty (to))) (set State at:(from) 0)))) (add (piece (id "Rook" Mover)) (to (coord "D8"))))))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
8x8 board. The pieces move as follows, with the number per player: 1 x King: moves one space orthogonally or diagonally. 1 x Queen : One square diagonally. 2 x Rook: Any number of spaces orthogonally. 2 x Fil: Two squares diagonally, jumping over the first. Cannot capture another Fil. 2 x Knight: Moves orthogonally one space and then diagonally another space, jumping over any intervening pieces; 8 x Pawns: Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Pawns are promoted to Queen when reaching the eighth rank. No castling. When a piece can be captured, it must be. The highest ranking piece must be captured, and the lowest ranking piece must make the capture if several are able to capture the same piece. The ranking, from highest to lowest, is: King, Rook, Knight, Queen, Fil, Pawn. Stalemate results in a win for player causing it. The player who checkmates the king wins.
(game "Forcado" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (priority {(do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))})) (end (if (or (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (no Moves Next)) (result Mover Win)))))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x King: moves one space orthogonally or diagonally. 1 x Queen : One square diagonally. 2 x Rook: Any number of spaces orthogonally. 2 x Fil: Two squares diagonally, jumping over the first. Cannot capture another Fil. 2 x Knight: Moves orthogonally one space and then diagonally another space, jumping over any intervening pieces; 8 x Pawns: Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Pawns are promoted to Queen when reaching the eighth rank. No castling. When a piece can be captured, it must be. The highest ranking piece must be captured, and the lowest ranking piece must make the capture if several are able to capture the same piece. The ranking, from highest to lowest, is: King, Rook, Knight, Queen, Fil, Pawn. Stalemate results in a win for player causing it. The player who checkmates the king wins. ###Ludii (game "Forcado" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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 "Ferz_noCross") Mover))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (priority {(do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Rook" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Knight" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Ferz_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Bishop_noCross" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Pawn"} (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (remove (to))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Bishop_noCross"} (move Hop Diagonal (between if:True) (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Ferz_noCross"} (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Knight"} (move Leap {{F F R F} {F F L F}} (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"Rook"} (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece {"King_noCross"} (move Step (to if:(and (is Enemy (who at:(to))) (= (what at:(to)) (id "Pawn" Next))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) Mover) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover))))})) (end (if (or (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (no Moves Next)) (result Mover Win)))))
Once a player is checkmated their king is removed, but all their other pieces remain on the board as neutral obstacles. Neutral pieces cannot help checkmate other players. If a player cannot make a move when there are more than two players remaining, they skip their turn rather than giving a stalemate. Four Players.
(game "Four-Player Chess" (players {(player N) (player S) (player E) (player W)}) (equipment {(board (merge (shift 0 3 (rectangle 8 14)) (shift 3 0 (rectangle 14 8)))) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "H1") (pair 2 "H14") (pair 3 "A7") (pair 4 "N7")}) (map "RookLeft" {(pair 1 "D1") (pair 2 "K14") (pair 3 "A11") (pair 4 "N4")}) (map "RookRight" {(pair 1 "K1") (pair 2 "D14") (pair 3 "A4") (pair 4 "N11")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (regions "Promotion" P3 (sites Right)) (regions "Promotion" P4 (sites Left))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 12)) (place "Pawn3" (sites Column 1)) (place "Pawn4" (sites Column 12)) (place "Rook1" {"D1" "K1"} state:1) (place "Knight1" {"E1" "J1"}) (place "Bishop1" {"F1" "I1"}) (place "Queen1" coord:"G1") (place "King1" coord:"H1" state:1) (place "Rook2" {"D14" "K14"} state:1) (place "Knight2" {"E14" "J14"}) (place "Bishop2" {"F14" "I14"}) (place "Queen2" coord:"G14") (place "King2" coord:"H14" state:1) (place "Rook3" {"A11" "A4"} state:1) (place "Knight3" {"A10" "A5"}) (place "Bishop3" {"A6" "A9"}) (place "Queen3" coord:"A8") (place "King3" coord:"A7" state:1) (place "Rook4" {"N4" "N11"} state:1) (place "Knight4" {"N5" "N10"}) (place "Bishop4" {"N6" "N9"}) (place "Queen4" coord:"N8") (place "King4" coord:"N7" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or {(if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) S (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) N (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) S (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) N (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) S (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) N (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))}))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (and {(if (and (is Active P1) (not (is Mover P1))) (if (and (is Threatened (id "King" P1)) (not (can Move (do (and (forEach Piece P1) (set NextPlayer (player 1))) ifAfterwards:(not (is Threatened (id "King" P1))))))) (remove (where (id "King" P1))))) (if (and (is Active P2) (not (is Mover P2))) (if (and (is Threatened (id "King" P2)) (not (can Move (do (and (forEach Piece P2) (set NextPlayer (player 2))) ifAfterwards:(not (is Threatened (id "King" P2))))))) (remove (where (id "King" P2))))) (if (and (is Active P3) (not (is Mover P3))) (if (and (is Threatened (id "King" P3)) (not (can Move (do (and (forEach Piece P3) (set NextPlayer (player 3))) ifAfterwards:(not (is Threatened (id "King" P3))))))) (remove (where (id "King" P3))))) (if (and (is Active P4) (not (is Mover P4))) (if (and (is Threatened (id "King" P4)) (not (can Move (do (and (forEach Piece P4) (set NextPlayer (player 4))) ifAfterwards:(not (is Threatened (id "King" P4))))))) (remove (where (id "King" P4)))))})))) (end {(forEach NonMover if:(= (where "King" Player) -1) (result Player Loss)) (if (and (<= (count Active) 2) (or (no Moves Mover) (= (counter) (* 50 (count Active))))) (result Mover Draw))})))
###Description Once a player is checkmated their king is removed, but all their other pieces remain on the board as neutral obstacles. Neutral pieces cannot help checkmate other players. If a player cannot make a move when there are more than two players remaining, they skip their turn rather than giving a stalemate. Four Players. ###Ludii (game "Four-Player Chess" (players {(player N) (player S) (player E) (player W)}) (equipment {(board (merge (shift 0 3 (rectangle 8 14)) (shift 3 0 (rectangle 14 8)))) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "H1") (pair 2 "H14") (pair 3 "A7") (pair 4 "N7")}) (map "RookLeft" {(pair 1 "D1") (pair 2 "K14") (pair 3 "A11") (pair 4 "N4")}) (map "RookRight" {(pair 1 "K1") (pair 2 "D14") (pair 3 "A4") (pair 4 "N11")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (regions "Promotion" P3 (sites Right)) (regions "Promotion" P4 (sites Left))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 12)) (place "Pawn3" (sites Column 1)) (place "Pawn4" (sites Column 12)) (place "Rook1" {"D1" "K1"} state:1) (place "Knight1" {"E1" "J1"}) (place "Bishop1" {"F1" "I1"}) (place "Queen1" coord:"G1") (place "King1" coord:"H1" state:1) (place "Rook2" {"D14" "K14"} state:1) (place "Knight2" {"E14" "J14"}) (place "Bishop2" {"F14" "I14"}) (place "Queen2" coord:"G14") (place "King2" coord:"H14" state:1) (place "Rook3" {"A11" "A4"} state:1) (place "Knight3" {"A10" "A5"}) (place "Bishop3" {"A6" "A9"}) (place "Queen3" coord:"A8") (place "King3" coord:"A7" state:1) (place "Rook4" {"N4" "N11"} state:1) (place "Knight4" {"N5" "N10"}) (place "Bishop4" {"N6" "N9"}) (place "Queen4" coord:"N8") (place "King4" coord:"N7" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or {(if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) S (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) N (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) S (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) N (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) S (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) N (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))}))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (and {(if (and (is Active P1) (not (is Mover P1))) (if (and (is Threatened (id "King" P1)) (not (can Move (do (and (forEach Piece P1) (set NextPlayer (player 1))) ifAfterwards:(not (is Threatened (id "King" P1))))))) (remove (where (id "King" P1))))) (if (and (is Active P2) (not (is Mover P2))) (if (and (is Threatened (id "King" P2)) (not (can Move (do (and (forEach Piece P2) (set NextPlayer (player 2))) ifAfterwards:(not (is Threatened (id "King" P2))))))) (remove (where (id "King" P2))))) (if (and (is Active P3) (not (is Mover P3))) (if (and (is Threatened (id "King" P3)) (not (can Move (do (and (forEach Piece P3) (set NextPlayer (player 3))) ifAfterwards:(not (is Threatened (id "King" P3))))))) (remove (where (id "King" P3))))) (if (and (is Active P4) (not (is Mover P4))) (if (and (is Threatened (id "King" P4)) (not (can Move (do (and (forEach Piece P4) (set NextPlayer (player 4))) ifAfterwards:(not (is Threatened (id "King" P4))))))) (remove (where (id "King" P4)))))})))) (end {(forEach NonMover if:(= (where "King" Player) -1) (result Player Loss)) (if (and (<= (count Active) 2) (or (no Moves Mover) (= (counter) (* 50 (count Active))))) (result Mover Draw))})))
Glinski Chess is played on a hexagonal board with each side having length 6, and each space oriented horizontally. The board has 91 spaces. Piece Movement: * Kings can move one space in any of the 12 directions from the current space. There is no castling. * Rooks can slide in any of the six 'adjacent' directions from their current space---North, South, or 60 degrees off either of those. * Bishops can slide in the six 'diagonal' directions: West, East, or 30 degrees off due North or 30 degrees off due South. Note that, given the 3-colour colouring of the board, each of the three Bishops remains on the same colour that it started the game on. * Queens can make any move that would be available to a Rook or a Bishop on the current space. * Knights can leap to any space that is two spaces away in an adjacent direction (North, South, or 60 degrees off either of those), plus one more space 60 degrees off of that direction. Note that a Knight always moves to a space of a different colour than the space it moved from. * Pawns can advance one space forward without capturing. They capture by moving to one of the two adjacent spaces 60 degrees left or right of forward. A Pawn on a Pawn start space can advance two spaces forward without capturing, even if it has previously moved (by capturing) to a different Pawn start space than it started the game on. A Pawn can capture an opponent Pawn 'en passant' if the opponent Pawn just advanced two spaces on its previous turn, and the capture direction of the current player's Pawn lands it on the space that the opponent Pawn just skipped over. On reaching the farthest rank in a given file, Pawns are promoted to a Queen, Rook, Bishop, or Knight, as the player chooses. The game ends on a checkmate or stalemate. By convention, the player that causes the stalemate is awarded 3/4 of a point, while the other player is awarded 1/4 of a point. Variations: Shift the innermost 3 or 5 Pawns toward the edge of the board by one space, as proposed in A Player's Guide to Table Games, by John Jackson, Stackpole Books, 1975. Pawns in the starting position chosen by Władysław Gliński in 1936
(game "Glinski Chess" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 6))) (piece "King" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Hop Forward (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) Backward)) (set Var (last To))})))) (move Step (if (is Mover P1) (directions {WNW ENE}) (directions {WSW ESE})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (if (is Mover P1) (directions {WNW ENE}) (directions {WSW ESE})) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (var))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 0)) (regions "Region-Light" (sites Phase 2)) (regions "Region-Medium" (sites Phase 1))}) (rules (start {(place "King1" coord:"B1") (place "Queen1" coord:"A2") (place "Rook1" {"A4" "D1"}) (place "Bishop1" {"A1" "B2" "C3"}) (place "Knight1" {"A3" "C1"}) (place "King2" coord:"K10") (place "Queen2" coord:"J11") (place "Rook2" {"H11" "K8"}) (place "Bishop2" {"K11" "J10" "I9"}) (place "Knight2" {"I11" "K9"}) (place "Pawn1" {"A5" "B5" "C5" "D5" "E5" "E4" "E3" "E2" "E1"}) (place "Pawn2" {"G11" "G10" "G9" "G8" "G7" "H7" "I7" "J7" "K7"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
###Description Glinski Chess is played on a hexagonal board with each side having length 6, and each space oriented horizontally. The board has 91 spaces. Piece Movement: * Kings can move one space in any of the 12 directions from the current space. There is no castling. * Rooks can slide in any of the six 'adjacent' directions from their current space---North, South, or 60 degrees off either of those. * Bishops can slide in the six 'diagonal' directions: West, East, or 30 degrees off due North or 30 degrees off due South. Note that, given the 3-colour colouring of the board, each of the three Bishops remains on the same colour that it started the game on. * Queens can make any move that would be available to a Rook or a Bishop on the current space. * Knights can leap to any space that is two spaces away in an adjacent direction (North, South, or 60 degrees off either of those), plus one more space 60 degrees off of that direction. Note that a Knight always moves to a space of a different colour than the space it moved from. * Pawns can advance one space forward without capturing. They capture by moving to one of the two adjacent spaces 60 degrees left or right of forward. A Pawn on a Pawn start space can advance two spaces forward without capturing, even if it has previously moved (by capturing) to a different Pawn start space than it started the game on. A Pawn can capture an opponent Pawn 'en passant' if the opponent Pawn just advanced two spaces on its previous turn, and the capture direction of the current player's Pawn lands it on the space that the opponent Pawn just skipped over. On reaching the farthest rank in a given file, Pawns are promoted to a Queen, Rook, Bishop, or Knight, as the player chooses. The game ends on a checkmate or stalemate. By convention, the player that causes the stalemate is awarded 3/4 of a point, while the other player is awarded 1/4 of a point. Variations: Shift the innermost 3 or 5 Pawns toward the edge of the board by one space, as proposed in A Player's Guide to Table Games, by John Jackson, Stackpole Books, 1975. Pawns in the starting position chosen by Władysław Gliński in 1936 ###Ludii (game "Glinski Chess" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 6))) (piece "King" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Hop Forward (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) Backward)) (set Var (last To))})))) (move Step (if (is Mover P1) (directions {WNW ENE}) (directions {WSW ESE})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (if (is Mover P1) (directions {WNW ENE}) (directions {WSW ESE})) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (var))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 0)) (regions "Region-Light" (sites Phase 2)) (regions "Region-Medium" (sites Phase 1))}) (rules (start {(place "King1" coord:"B1") (place "Queen1" coord:"A2") (place "Rook1" {"A4" "D1"}) (place "Bishop1" {"A1" "B2" "C3"}) (place "Knight1" {"A3" "C1"}) (place "King2" coord:"K10") (place "Queen2" coord:"J11") (place "Rook2" {"H11" "K8"}) (place "Bishop2" {"K11" "J10" "I9"}) (place "Knight2" {"I11" "K9"}) (place "Pawn1" {"A5" "B5" "C5" "D5" "E5" "E4" "E3" "E2" "E1"}) (place "Pawn2" {"G11" "G10" "G9" "G8" "G7" "H7" "I7" "J7" "K7"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
12x12 checkered board. Each player begins with 24 pieces with special moves: King (x1): Moves one space orthogonally or diagonally or may jump over one space forward orthogonally or diagonally on its first move; Aanca (x2): Moves diagonally one and one space orthogonally in the same direction, and may continue moving in that same direction any distance; Crocodile (x2): moves diagonally any distance; Giraffe (x2): moves two spaces diagonally and then one orthogonally in the same direction, jumping over any intervening pieces; Rhinoceros (x2): moves diagonally one space and then one orthogonally in the same directions, jumping over any intervening pieces, and then may continue along the diagonal in the same direction; Lion (x2); jumps orthogonally three spaces away. Rook (x2): moves any distance orthogonally; Pawns (12): move forward orthogonally one pace or diagonally one space to capture. When they reach the opposite edge of the board, they are promoted to the piece which began in that space. If this is the King's space, it is promoted to Aanca. The opening position is for white: Rook, Lion, Rhinoceros, Giraffe, Crocodile, Aanca, King, Crocodile, Giraffe, Rhinoceros, Lion, Rook. This is mirrored for black so that the kings face each other. The pawns begin on the fourth row. Pieces are captured when a piece lands on a space occupied by the opposing player. The goal is to checkmnate the King. When the King can be captured on the opponent's next turn, it is in check. The player must remove the King from check on their next turn. If the King cannot move out of check, it is checkmated and the opponent wins. The rules of Alfonso X without dice.
(game "Grande Acedrex" (players {(player N) (player S)}) (equipment {(board (square 12)) (piece "Pawn" 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 (if (is In (last To) (sites Corners)) (id "Rook" Mover) (if (or (= (column of:(last To)) 1) (= (column of:(last To)) 10)) (id "Lion" Mover) (if (or (= (column of:(last To)) 2) (= (column of:(last To)) 9)) (id "Rhino" Mover) (if (or (= (column of:(last To)) 3) (= (column of:(last To)) 8)) (id "Giraffe" Mover) (if (or (= (column of:(last To)) 4) (= (column of:(last To)) 7)) (id "Crocodile" Mover) (id "Eagle" Mover)))))))))))) (piece "Crocodile" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Eagle" Each (move (from) (to (union {(sites To (if (and (!= (ahead (from) NW) -1) (not (is Friend (who at:(ahead (from) NW))))) (or (fromTo (from) (to (ahead (from) NW))) (slide (from (ahead (from) NW)) (directions {N W}) (to if:(is Enemy (who at:(to)))))))) (sites To (if (and (!= (ahead (from) NE) -1) (not (is Friend (who at:(ahead (from) NE))))) (or (fromTo (from) (to (ahead (from) NE))) (slide (from (ahead (from) NE)) (directions {N E}) (to if:(is Enemy (who at:(to)))))))) (sites To (if (and (!= (ahead (from) SW) -1) (not (is Friend (who at:(ahead (from) SW))))) (or (fromTo (from) (to (ahead (from) SW))) (slide (from (ahead (from) SW)) (directions {S W}) (to if:(is Enemy (who at:(to)))))))) (sites To (if (and (!= (ahead (from) SE) -1) (not (is Friend (who at:(ahead (from) SE))))) (or (fromTo (from) (to (ahead (from) SE))) (slide (from (ahead (from) SE)) (directions {E S}) (to if:(is Enemy (who at:(to))))))))}) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (piece "Rhino" Each (move (from) (to (union {(sites To (if (!= (ahead (from) N) -1) (slide (from (ahead (from) N)) (directions {NE NW}) (to if:(is Enemy (who at:(to))))))) (sites To (if (!= (ahead (from) W) -1) (slide (from (ahead (from) W)) (directions {NW SW}) (to if:(is Enemy (who at:(to))))))) (sites To (if (!= (ahead (from) S) -1) (slide (from (ahead (from) S)) (directions {SW SE}) (to if:(is Enemy (who at:(to))))))) (sites To (if (!= (ahead (from) E) -1) (slide (from (ahead (from) E)) (directions {SE NE}) (to if:(is Enemy (who at:(to)))))))}) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (piece "Giraffe" Each (move Leap {{F F F R F F} {F F F L F F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Lion" Each (move Leap {{F F F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "King" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= (state at:(from)) 1) (move Hop Forwards (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 3)) (place "Rook1" (sites {"A1" "L1"})) (place "Lion1" (sites {"B1" "K1"})) (place "Rhino1" (sites {"C1" "J1"})) (place "Giraffe1" (sites {"D1" "I1"})) (place "Crocodile1" (sites {"E1" "H1"})) (place "Eagle1" coord:"F1") (place "King1" coord:"G1" state:1) (place "Pawn2" (sites Row 8)) (place "Rook2" (sites {"A12" "L12"})) (place "Lion2" (sites {"B12" "K12"})) (place "Rhino2" (sites {"C12" "J12"})) (place "Giraffe2" (sites {"D12" "I12"})) (place "Crocodile2" (sites {"E12" "H12"})) (place "Eagle2" coord:"F12") (place "King2" coord:"G12" state:1)}) (play (do (or {(forEach Piece "Pawn") (forEach Piece "King") (forEach Piece "Rook") (forEach Piece "Lion") (forEach Piece "Giraffe") (forEach Piece "Eagle") (forEach Piece "Crocodile") (forEach Piece "Rhino")}) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
###Description 12x12 checkered board. Each player begins with 24 pieces with special moves: King (x1): Moves one space orthogonally or diagonally or may jump over one space forward orthogonally or diagonally on its first move; Aanca (x2): Moves diagonally one and one space orthogonally in the same direction, and may continue moving in that same direction any distance; Crocodile (x2): moves diagonally any distance; Giraffe (x2): moves two spaces diagonally and then one orthogonally in the same direction, jumping over any intervening pieces; Rhinoceros (x2): moves diagonally one space and then one orthogonally in the same directions, jumping over any intervening pieces, and then may continue along the diagonal in the same direction; Lion (x2); jumps orthogonally three spaces away. Rook (x2): moves any distance orthogonally; Pawns (12): move forward orthogonally one pace or diagonally one space to capture. When they reach the opposite edge of the board, they are promoted to the piece which began in that space. If this is the King's space, it is promoted to Aanca. The opening position is for white: Rook, Lion, Rhinoceros, Giraffe, Crocodile, Aanca, King, Crocodile, Giraffe, Rhinoceros, Lion, Rook. This is mirrored for black so that the kings face each other. The pawns begin on the fourth row. Pieces are captured when a piece lands on a space occupied by the opposing player. The goal is to checkmnate the King. When the King can be captured on the opponent's next turn, it is in check. The player must remove the King from check on their next turn. If the King cannot move out of check, it is checkmated and the opponent wins. The rules of Alfonso X without dice. ###Ludii (game "Grande Acedrex" (players {(player N) (player S)}) (equipment {(board (square 12)) (piece "Pawn" 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 (if (is In (last To) (sites Corners)) (id "Rook" Mover) (if (or (= (column of:(last To)) 1) (= (column of:(last To)) 10)) (id "Lion" Mover) (if (or (= (column of:(last To)) 2) (= (column of:(last To)) 9)) (id "Rhino" Mover) (if (or (= (column of:(last To)) 3) (= (column of:(last To)) 8)) (id "Giraffe" Mover) (if (or (= (column of:(last To)) 4) (= (column of:(last To)) 7)) (id "Crocodile" Mover) (id "Eagle" Mover)))))))))))) (piece "Crocodile" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Eagle" Each (move (from) (to (union {(sites To (if (and (!= (ahead (from) NW) -1) (not (is Friend (who at:(ahead (from) NW))))) (or (fromTo (from) (to (ahead (from) NW))) (slide (from (ahead (from) NW)) (directions {N W}) (to if:(is Enemy (who at:(to)))))))) (sites To (if (and (!= (ahead (from) NE) -1) (not (is Friend (who at:(ahead (from) NE))))) (or (fromTo (from) (to (ahead (from) NE))) (slide (from (ahead (from) NE)) (directions {N E}) (to if:(is Enemy (who at:(to)))))))) (sites To (if (and (!= (ahead (from) SW) -1) (not (is Friend (who at:(ahead (from) SW))))) (or (fromTo (from) (to (ahead (from) SW))) (slide (from (ahead (from) SW)) (directions {S W}) (to if:(is Enemy (who at:(to)))))))) (sites To (if (and (!= (ahead (from) SE) -1) (not (is Friend (who at:(ahead (from) SE))))) (or (fromTo (from) (to (ahead (from) SE))) (slide (from (ahead (from) SE)) (directions {E S}) (to if:(is Enemy (who at:(to))))))))}) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (piece "Rhino" Each (move (from) (to (union {(sites To (if (!= (ahead (from) N) -1) (slide (from (ahead (from) N)) (directions {NE NW}) (to if:(is Enemy (who at:(to))))))) (sites To (if (!= (ahead (from) W) -1) (slide (from (ahead (from) W)) (directions {NW SW}) (to if:(is Enemy (who at:(to))))))) (sites To (if (!= (ahead (from) S) -1) (slide (from (ahead (from) S)) (directions {SW SE}) (to if:(is Enemy (who at:(to))))))) (sites To (if (!= (ahead (from) E) -1) (slide (from (ahead (from) E)) (directions {SE NE}) (to if:(is Enemy (who at:(to)))))))}) (apply if:(is Enemy (who at:(to))) (remove (to)))))) (piece "Giraffe" Each (move Leap {{F F F R F F} {F F F L F F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Lion" Each (move Leap {{F F F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "King" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= (state at:(from)) 1) (move Hop Forwards (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 3)) (place "Rook1" (sites {"A1" "L1"})) (place "Lion1" (sites {"B1" "K1"})) (place "Rhino1" (sites {"C1" "J1"})) (place "Giraffe1" (sites {"D1" "I1"})) (place "Crocodile1" (sites {"E1" "H1"})) (place "Eagle1" coord:"F1") (place "King1" coord:"G1" state:1) (place "Pawn2" (sites Row 8)) (place "Rook2" (sites {"A12" "L12"})) (place "Lion2" (sites {"B12" "K12"})) (place "Rhino2" (sites {"C12" "J12"})) (place "Giraffe2" (sites {"D12" "I12"})) (place "Crocodile2" (sites {"E12" "H12"})) (place "Eagle2" coord:"F12") (place "King2" coord:"G12" state:1)}) (play (do (or {(forEach Piece "Pawn") (forEach Piece "King") (forEach Piece "Rook") (forEach Piece "Lion") (forEach Piece "Giraffe") (forEach Piece "Eagle") (forEach Piece "Crocodile") (forEach Piece "Rhino")}) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
Half Chess is played with the same rules as chess.
(game "Half Chess" (players 2) (equipment {(board (rectangle 4 8)) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter)))))))}) (rules (start {(place "Rook1" {"H1" "H4"}) (place "Knight1" {"G1" "G4"}) (place "Bishop1" {"G2" "G3"}) (place "Queen1" coord:"H3") (place "King1" coord:"H2") (place "Rook2" {"A1" "A4"}) (place "Knight2" {"B1" "B4"}) (place "Bishop2" {"B2" "B3"}) (place "Queen2" coord:"A3") (place "King2" coord:"A2")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
###Description Half Chess is played with the same rules as chess. ###Ludii (game "Half Chess" (players 2) (equipment {(board (rectangle 4 8)) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter)))))))}) (rules (start {(place "Rook1" {"H1" "H4"}) (place "Knight1" {"G1" "G4"}) (place "Bishop1" {"G2" "G3"}) (place "Queen1" coord:"H3") (place "King1" coord:"H2") (place "Rook2" {"A1" "A4"}) (place "Knight2" {"B1" "B4"}) (place "Bishop2" {"B2" "B3"}) (place "Queen2" coord:"A3") (place "King2" coord:"A2")}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
The rules are the same as for Chess with these differences: White wins by capturing all black pieces. Black wins by checkmating the white king. If no black piece can make a valid move, the game is a draw (stalemate). Black pawns can be promoted to a black queen, rook, bishop or knight if they reach the last row. Black pawns cannot move two spaces forward from any position except the second rank.
(game "Horde Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (and (= (who at:(from)) P1) (is In (from) (sites Start (piece (what at:(from)))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (union {(sites Row 5) (sites Row 6) (sites Row 4) (difference (sites Row 7) (sites {"D8" "E8"})) (difference (sites Row 3) (sites {"A4" "B4" "C4" "F4" "G4" "H4"}))})) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (if (is Mover P1) (do (or (forEach Piece) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (forEach Piece)))) (end {(if (and (is Mover P1) (no Pieces P2)) (result P1 Win)) (if (and {(is Mover P2) (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))}) (result P2 Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
###Description The rules are the same as for Chess with these differences: White wins by capturing all black pieces. Black wins by checkmating the white king. If no black piece can make a valid move, the game is a draw (stalemate). Black pawns can be promoted to a black queen, rook, bishop or knight if they reach the last row. Black pawns cannot move two spaces forward from any position except the second rank. ###Ludii (game "Horde Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (and (= (who at:(from)) P1) (is In (from) (sites Start (piece (what at:(from)))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (union {(sites Row 5) (sites Row 6) (sites Row 4) (difference (sites Row 7) (sites {"D8" "E8"})) (difference (sites Row 3) (sites {"A4" "B4" "C4" "F4" "G4" "H4"}))})) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (if (is Mover P1) (do (or (forEach Piece) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (forEach Piece)))) (end {(if (and (is Mover P1) (no Pieces P2)) (result P1 Win)) (if (and {(is Mover P2) (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))}) (result P2 Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
Played on an 8x8 board with pieces with specialized moves: Pawns (8): can move one space forward, or one space diagonally forward to capture; Players agree at the beginning of the game whether pawns may move two spaces on their first turn. Two pawns may be moved by a player in their first turn of the game. Pawns may only be promoted to a piece that has already been captured. If none have been captured, the pawn must remain in place until a piece has been captured. Rooks (2): can move any number of spaces orthogonally; Bishops (2): can move any number of spaces diagonally; Knight (2): moves in any direction, one space orthogonally with one space forward diagonally, jumping over any intervening pieces; Queens (1): can move any number of spaces orthogonally or diagonally; Kings (1): can move one space orthogonally or diagonally. A King cannot castle if it has ever been checked. Players capture pieces by moving onto a space occupied by an opponent's piece. A player must say 'Gardez la reine' (Guard the Queen) when the queen is threatened. When a King can be captured on the next turn by an opponent's piece, it is in check. The King must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. A player who causes a stalemate loses. The pawns can double step from the starting positions.
(game "Korkserschach" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (if (!= (last To) (from)) (or {(if (and (or {(is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (is In (id "Bishop" Mover) (values Remembered "CapturedPieces"))}) (is In (from) (sites Mover "Promotion"))) (or {(if (is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (move Promote (from) (piece {"Queen"}) Mover)) (if (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (move Promote (from) (piece {"Knight"}) Mover)) (if (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (move Promote (from) (piece {"Rook"}) Mover)) (if (is In (id "Bishop" Mover) (values Remembered "CapturedPieces")) (move Promote (from) (piece {"Bishop"}) Mover))} (then (set Pending)))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (and (remember Value "CapturedPieces" (what at:(to))) (remove (to))))))} (then (and (if (and (is In (last To) (sites Mover "Promotion")) (or {(is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (is In (id "Bishop" Mover) (values Remembered "CapturedPieces"))})) (moveAgain)) (if (and (not (is Prev Mover)) (<= (count Turns) 2)) (and (set Pending) (moveAgain)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))))) (piece "Knight" 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))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (and (not (is Pending)) (is Prev Mover)) (or {(if (is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Queen"}) Mover)) (if (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Knight"}) Mover)) (if (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Rook"}) Mover)) (if (is In (id "Bishop" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Bishop"}) Mover))}) (do (if (is Pending) (or (move Pass) (forEach Piece "Pawn" Mover)) (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0))))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (and (if (or (is Threatened (id "Queen" P1)) (is Threatened (id "Queen" P2))) (note "Gardez la reine")) (if (and (= (state at:(where "King" Next)) 1) (is Threatened (id "King" Next))) (set State at:(where "King" Next) 0)))))) (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
###Description Played on an 8x8 board with pieces with specialized moves: Pawns (8): can move one space forward, or one space diagonally forward to capture; Players agree at the beginning of the game whether pawns may move two spaces on their first turn. Two pawns may be moved by a player in their first turn of the game. Pawns may only be promoted to a piece that has already been captured. If none have been captured, the pawn must remain in place until a piece has been captured. Rooks (2): can move any number of spaces orthogonally; Bishops (2): can move any number of spaces diagonally; Knight (2): moves in any direction, one space orthogonally with one space forward diagonally, jumping over any intervening pieces; Queens (1): can move any number of spaces orthogonally or diagonally; Kings (1): can move one space orthogonally or diagonally. A King cannot castle if it has ever been checked. Players capture pieces by moving onto a space occupied by an opponent's piece. A player must say 'Gardez la reine' (Guard the Queen) when the queen is threatened. When a King can be captured on the next turn by an opponent's piece, it is in check. The King must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. A player who causes a stalemate loses. The pawns can double step from the starting positions. ###Ludii (game "Korkserschach" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (if (!= (last To) (from)) (or {(if (and (or {(is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (is In (id "Bishop" Mover) (values Remembered "CapturedPieces"))}) (is In (from) (sites Mover "Promotion"))) (or {(if (is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (move Promote (from) (piece {"Queen"}) Mover)) (if (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (move Promote (from) (piece {"Knight"}) Mover)) (if (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (move Promote (from) (piece {"Rook"}) Mover)) (if (is In (id "Bishop" Mover) (values Remembered "CapturedPieces")) (move Promote (from) (piece {"Bishop"}) Mover))} (then (set Pending)))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (and (remember Value "CapturedPieces" (what at:(to))) (remove (to))))))} (then (and (if (and (is In (last To) (sites Mover "Promotion")) (or {(is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (is In (id "Bishop" Mover) (values Remembered "CapturedPieces"))})) (moveAgain)) (if (and (not (is Prev Mover)) (<= (count Turns) 2)) (and (set Pending) (moveAgain)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))))) (piece "Knight" 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))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remember Value "CapturedPieces" (what at:(to))) (remove (to)))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (and (not (is Pending)) (is Prev Mover)) (or {(if (is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Queen"}) Mover)) (if (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Knight"}) Mover)) (if (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Rook"}) Mover)) (if (is In (id "Bishop" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Bishop"}) Mover))}) (do (if (is Pending) (or (move Pass) (forEach Piece "Pawn" Mover)) (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0))))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (and (if (or (is Threatened (id "Queen" P1)) (is Threatened (id "Queen" P2))) (note "Gardez la reine")) (if (and (= (state at:(where "King" Next)) 1) (is Threatened (id "King" Next))) (set State at:(where "King" Next) 0)))))) (end (if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)))))
All movement of chessman’s are the same, just if you want to go on higher level, you can just go on first reachable chess box of higher level. And on next move, go on that level or to lower levels without restrictions. Knight goes without any restrictions. Once a player is checkmated their king is removed, but all their other pieces remain on the board as neutral obstacles. Neutral pieces cannot help checkmate other players. If a player cannot make a move when there are more than two players remaining, they skip their turn rather than giving a stalemate. Four Players.
(game "Level Chess" (players {(player N) (player S) (player E) (player W)}) (equipment {(board (merge (shift 0 3 (rectangle 8 14)) (shift 3 0 (rectangle 14 8)))) (piece "Pawn" Each (if (is Active (who at:(from))) (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)) (apply if:(>= (+ (if (is In (from) (sites "Level5")) 5 (if (is In (from) (sites "Level4")) 4 (if (is In (from) (sites "Level3")) 3 (if (is In (from) (sites "Level2")) 2 1)))) 1) (if (is In (to) (sites "Level5")) 5 (if (is In (to) (sites "Level4")) 4 (if (is In (to) (sites "Level3")) 3 (if (is In (to) (sites "Level2")) 2 1))))))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter)))))) (piece "Rook" Each (if (is Active (who at:(from))) (move Slide Orthogonal (to if:(or (is Enemy (who at:(to))) (and (< (if (is In (from) (sites "Level5")) 5 (if (is In (from) (sites "Level4")) 4 (if (is In (from) (sites "Level3")) 3 (if (is In (from) (sites "Level2")) 2 1)))) (if (is In (to) (sites "Level5")) 5 (if (is In (to) (sites "Level4")) 4 (if (is In (to) (sites "Level3")) 3 (if (is In (to) (sites "Level2")) 2 1))))) (not (is Friend (who at:(to)))))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "King" Each (if (is Active (who at:(from))) (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "Bishop" Each (if (is Active (who at:(from))) (move Slide Diagonal (to if:(or (is Enemy (who at:(to))) (and (< (if (is In (from) (sites "Level5")) 5 (if (is In (from) (sites "Level4")) 4 (if (is In (from) (sites "Level3")) 3 (if (is In (from) (sites "Level2")) 2 1)))) (if (is In (to) (sites "Level5")) 5 (if (is In (to) (sites "Level4")) 4 (if (is In (to) (sites "Level3")) 3 (if (is In (to) (sites "Level2")) 2 1))))) (not (is Friend (who at:(to)))))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (piece "Knight" Each (if (is Active (who at:(from))) (move (from) (to (difference (forEach (sites Board) if:(and {(not (is Friend (who at:(site)))) (= 3 (count Steps Orthogonal (from) (site)))})) (sites To (slide (between if:True)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (piece "Queen" Each (if (is Active (who at:(from))) (move Slide (to if:(or (is Enemy (who at:(to))) (and (< (if (is In (from) (sites "Level5")) 5 (if (is In (from) (sites "Level4")) 4 (if (is In (from) (sites "Level3")) 3 (if (is In (from) (sites "Level2")) 2 1)))) (if (is In (to) (sites "Level5")) 5 (if (is In (to) (sites "Level4")) 4 (if (is In (to) (sites "Level3")) 3 (if (is In (to) (sites "Level2")) 2 1))))) (not (is Friend (who at:(to)))))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (map "King" {(pair 1 "H1") (pair 2 "H14") (pair 3 "A7") (pair 4 "N7")}) (map "RookLeft" {(pair 1 "D1") (pair 2 "K14") (pair 3 "A11") (pair 4 "N4")}) (map "RookRight" {(pair 1 "K1") (pair 2 "D14") (pair 3 "A4") (pair 4 "N11")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (regions "Promotion" P3 (sites Right)) (regions "Promotion" P4 (sites Left)) (regions "Level2" (difference (sites Board) (union {(expand (sites Top) steps:2) (expand (sites Bottom) steps:2) (expand (sites Left) steps:2) (expand (sites Right) steps:2)}))) (regions "Level2Phase0" (intersection (sites Phase 0) (difference (sites Board) (union {(expand (sites Top) steps:2) (expand (sites Bottom) steps:2) (expand (sites Left) steps:2) (expand (sites Right) steps:2)})))) (regions "Level2Phase1" (intersection (sites Phase 1) (difference (sites Board) (union {(expand (sites Top) steps:2) (expand (sites Bottom) steps:2) (expand (sites Left) steps:2) (expand (sites Right) steps:2)})))) (regions "Level3" (difference (sites Board) (union {(expand (sites Top) steps:4) (expand (sites Bottom) steps:4) (expand (sites Left) steps:4) (expand (sites Right) steps:4)}))) (regions "Level3Phase0" (intersection (sites Phase 0) (difference (sites Board) (union {(expand (sites Top) steps:4) (expand (sites Bottom) steps:4) (expand (sites Left) steps:4) (expand (sites Right) steps:4)})))) (regions "Level3Phase1" (intersection (sites Phase 1) (difference (sites Board) (union {(expand (sites Top) steps:4) (expand (sites Bottom) steps:4) (expand (sites Left) steps:4) (expand (sites Right) steps:4)}))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 12)) (place "Pawn3" (sites Column 1)) (place "Pawn4" (sites Column 12)) (place "Rook1" {"D1" "K1"} state:1) (place "Knight1" {"E1" "J1"}) (place "Bishop1" {"F1" "I1"}) (place "Queen1" coord:"G1") (place "King1" coord:"H1" state:1) (place "Rook2" {"D14" "K14"} state:1) (place "Knight2" {"E14" "J14"}) (place "Bishop2" {"F14" "I14"}) (place "Queen2" coord:"G14") (place "King2" coord:"H14" state:1) (place "Rook3" {"A11" "A4"} state:1) (place "Knight3" {"A10" "A5"}) (place "Bishop3" {"A6" "A9"}) (place "Queen3" coord:"A8") (place "King3" coord:"A7" state:1) (place "Rook4" {"N4" "N11"} state:1) (place "Knight4" {"N5" "N10"}) (place "Bishop4" {"N6" "N9"}) (place "Queen4" coord:"N8") (place "King4" coord:"N7" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or {(if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) S (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) N (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) S (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) N (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) S (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) N (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))}))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (and {(if (and (is Active P1) (not (is Mover P1))) (if (and (is Threatened (id "King" P1)) (not (can Move (do (and (forEach Piece P1) (set NextPlayer (player 1))) ifAfterwards:(not (is Threatened (id "King" P1))))))) (remove (where (id "King" P1))))) (if (and (is Active P2) (not (is Mover P2))) (if (and (is Threatened (id "King" P2)) (not (can Move (do (and (forEach Piece P2) (set NextPlayer (player 2))) ifAfterwards:(not (is Threatened (id "King" P2))))))) (remove (where (id "King" P2))))) (if (and (is Active P3) (not (is Mover P3))) (if (and (is Threatened (id "King" P3)) (not (can Move (do (and (forEach Piece P3) (set NextPlayer (player 3))) ifAfterwards:(not (is Threatened (id "King" P3))))))) (remove (where (id "King" P3))))) (if (and (is Active P4) (not (is Mover P4))) (if (and (is Threatened (id "King" P4)) (not (can Move (do (and (forEach Piece P4) (set NextPlayer (player 4))) ifAfterwards:(not (is Threatened (id "King" P4))))))) (remove (where (id "King" P4)))))})))) (end {(forEach NonMover if:(= (where "King" Player) -1) (result Player Loss)) (if (and (<= (count Active) 2) (or (no Moves Mover) (= (counter) (* 50 (count Active))))) (result Mover Draw))})))
###Description All movement of chessman’s are the same, just if you want to go on higher level, you can just go on first reachable chess box of higher level. And on next move, go on that level or to lower levels without restrictions. Knight goes without any restrictions. Once a player is checkmated their king is removed, but all their other pieces remain on the board as neutral obstacles. Neutral pieces cannot help checkmate other players. If a player cannot make a move when there are more than two players remaining, they skip their turn rather than giving a stalemate. Four Players. ###Ludii (game "Level Chess" (players {(player N) (player S) (player E) (player W)}) (equipment {(board (merge (shift 0 3 (rectangle 8 14)) (shift 3 0 (rectangle 14 8)))) (piece "Pawn" Each (if (is Active (who at:(from))) (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)) (apply if:(>= (+ (if (is In (from) (sites "Level5")) 5 (if (is In (from) (sites "Level4")) 4 (if (is In (from) (sites "Level3")) 3 (if (is In (from) (sites "Level2")) 2 1)))) 1) (if (is In (to) (sites "Level5")) 5 (if (is In (to) (sites "Level4")) 4 (if (is In (to) (sites "Level3")) 3 (if (is In (to) (sites "Level2")) 2 1))))))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter)))))) (piece "Rook" Each (if (is Active (who at:(from))) (move Slide Orthogonal (to if:(or (is Enemy (who at:(to))) (and (< (if (is In (from) (sites "Level5")) 5 (if (is In (from) (sites "Level4")) 4 (if (is In (from) (sites "Level3")) 3 (if (is In (from) (sites "Level2")) 2 1)))) (if (is In (to) (sites "Level5")) 5 (if (is In (to) (sites "Level4")) 4 (if (is In (to) (sites "Level3")) 3 (if (is In (to) (sites "Level2")) 2 1))))) (not (is Friend (who at:(to)))))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "King" Each (if (is Active (who at:(from))) (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (piece "Bishop" Each (if (is Active (who at:(from))) (move Slide Diagonal (to if:(or (is Enemy (who at:(to))) (and (< (if (is In (from) (sites "Level5")) 5 (if (is In (from) (sites "Level4")) 4 (if (is In (from) (sites "Level3")) 3 (if (is In (from) (sites "Level2")) 2 1)))) (if (is In (to) (sites "Level5")) 5 (if (is In (to) (sites "Level4")) 4 (if (is In (to) (sites "Level3")) 3 (if (is In (to) (sites "Level2")) 2 1))))) (not (is Friend (who at:(to)))))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (piece "Knight" Each (if (is Active (who at:(from))) (move (from) (to (difference (forEach (sites Board) if:(and {(not (is Friend (who at:(site)))) (= 3 (count Steps Orthogonal (from) (site)))})) (sites To (slide (between if:True)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (piece "Queen" Each (if (is Active (who at:(from))) (move Slide (to if:(or (is Enemy (who at:(to))) (and (< (if (is In (from) (sites "Level5")) 5 (if (is In (from) (sites "Level4")) 4 (if (is In (from) (sites "Level3")) 3 (if (is In (from) (sites "Level2")) 2 1)))) (if (is In (to) (sites "Level5")) 5 (if (is In (to) (sites "Level4")) 4 (if (is In (to) (sites "Level3")) 3 (if (is In (to) (sites "Level2")) 2 1))))) (not (is Friend (who at:(to)))))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (map "King" {(pair 1 "H1") (pair 2 "H14") (pair 3 "A7") (pair 4 "N7")}) (map "RookLeft" {(pair 1 "D1") (pair 2 "K14") (pair 3 "A11") (pair 4 "N4")}) (map "RookRight" {(pair 1 "K1") (pair 2 "D14") (pair 3 "A4") (pair 4 "N11")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (regions "Promotion" P3 (sites Right)) (regions "Promotion" P4 (sites Left)) (regions "Level2" (difference (sites Board) (union {(expand (sites Top) steps:2) (expand (sites Bottom) steps:2) (expand (sites Left) steps:2) (expand (sites Right) steps:2)}))) (regions "Level2Phase0" (intersection (sites Phase 0) (difference (sites Board) (union {(expand (sites Top) steps:2) (expand (sites Bottom) steps:2) (expand (sites Left) steps:2) (expand (sites Right) steps:2)})))) (regions "Level2Phase1" (intersection (sites Phase 1) (difference (sites Board) (union {(expand (sites Top) steps:2) (expand (sites Bottom) steps:2) (expand (sites Left) steps:2) (expand (sites Right) steps:2)})))) (regions "Level3" (difference (sites Board) (union {(expand (sites Top) steps:4) (expand (sites Bottom) steps:4) (expand (sites Left) steps:4) (expand (sites Right) steps:4)}))) (regions "Level3Phase0" (intersection (sites Phase 0) (difference (sites Board) (union {(expand (sites Top) steps:4) (expand (sites Bottom) steps:4) (expand (sites Left) steps:4) (expand (sites Right) steps:4)})))) (regions "Level3Phase1" (intersection (sites Phase 1) (difference (sites Board) (union {(expand (sites Top) steps:4) (expand (sites Bottom) steps:4) (expand (sites Left) steps:4) (expand (sites Right) steps:4)}))))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 12)) (place "Pawn3" (sites Column 1)) (place "Pawn4" (sites Column 12)) (place "Rook1" {"D1" "K1"} state:1) (place "Knight1" {"E1" "J1"}) (place "Bishop1" {"F1" "I1"}) (place "Queen1" coord:"G1") (place "King1" coord:"H1" state:1) (place "Rook2" {"D14" "K14"} state:1) (place "Knight2" {"E14" "J14"}) (place "Bishop2" {"F14" "I14"}) (place "Queen2" coord:"G14") (place "King2" coord:"H14" state:1) (place "Rook3" {"A11" "A4"} state:1) (place "Knight3" {"A10" "A5"}) (place "Bishop3" {"A6" "A9"}) (place "Queen3" coord:"A8") (place "King3" coord:"A7" state:1) (place "Rook4" {"N4" "N11"} state:1) (place "Knight4" {"N5" "N10"}) (place "Bishop4" {"N6" "N9"}) (place "Queen4" coord:"N8") (place "King4" coord:"N7" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or {(if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) S (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) N (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) S (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) N (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) S (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) N (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))}))) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (and {(if (and (is Active P1) (not (is Mover P1))) (if (and (is Threatened (id "King" P1)) (not (can Move (do (and (forEach Piece P1) (set NextPlayer (player 1))) ifAfterwards:(not (is Threatened (id "King" P1))))))) (remove (where (id "King" P1))))) (if (and (is Active P2) (not (is Mover P2))) (if (and (is Threatened (id "King" P2)) (not (can Move (do (and (forEach Piece P2) (set NextPlayer (player 2))) ifAfterwards:(not (is Threatened (id "King" P2))))))) (remove (where (id "King" P2))))) (if (and (is Active P3) (not (is Mover P3))) (if (and (is Threatened (id "King" P3)) (not (can Move (do (and (forEach Piece P3) (set NextPlayer (player 3))) ifAfterwards:(not (is Threatened (id "King" P3))))))) (remove (where (id "King" P3))))) (if (and (is Active P4) (not (is Mover P4))) (if (and (is Threatened (id "King" P4)) (not (can Move (do (and (forEach Piece P4) (set NextPlayer (player 4))) ifAfterwards:(not (is Threatened (id "King" P4))))))) (remove (where (id "King" P4)))))})))) (end {(forEach NonMover if:(= (where "King" Player) -1) (result Player Loss)) (if (and (<= (count Active) 2) (or (no Moves Mover) (= (counter) (* 50 (count Active))))) (result Mover Draw))})))
8x8 board. The pieces move as follows, with the number per player: 1 x King (king): moves one space orthogonally or diagonally. The King may leap to the second or third square on its first move, or move as a Knight, and does not hop over an opponent's piece. The King also cannot capture with this move. 1 x Queen: One square diagonally. On its first move, the Queen may jump diagonally two squares. The Queen cannot capture when making this move. 2 x Rook: Any number of spaces orthogonally. 2 x Bishop: Two squares diagonally, jumping over the first. Cannot capture another Bishop. 2 x Knight: Moves one space orthogonally and then one space diagonally, jumping over any intervening pieces. 8 x Pawn: Moves one space forward orthogonally; one space forward diagonally to capture. May move two spaces on its first move. En passant is not allowed. Promoted to Queen when reaching the eighth rank, and may make the Queen's leap on its first move after being promoted. If this promotion is made with the opponent's King at the distance of the extended move, it does not give check on that turn. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a King can be captured on the next turn by an opponent's piece, it is in check. The King must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a draw.
(game "Lombard Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (or (move Hop (between (range 1 2) if:(not (is Enemy (who at:(between))))) (to if:(is Empty (to)))) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))) (if (= 1 (state at:(from))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece (id "Queen" Mover))) (set State at:(last To) 1)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1" state:1) (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8" state:1) (place "King2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))) (then (if (and (= 1 (state at:(where "King" Next))) (is Threatened (id "King" Next))) (set State at:(where "King" Next) 0))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw))})))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x King (king): moves one space orthogonally or diagonally. The King may leap to the second or third square on its first move, or move as a Knight, and does not hop over an opponent's piece. The King also cannot capture with this move. 1 x Queen: One square diagonally. On its first move, the Queen may jump diagonally two squares. The Queen cannot capture when making this move. 2 x Rook: Any number of spaces orthogonally. 2 x Bishop: Two squares diagonally, jumping over the first. Cannot capture another Bishop. 2 x Knight: Moves one space orthogonally and then one space diagonally, jumping over any intervening pieces. 8 x Pawn: Moves one space forward orthogonally; one space forward diagonally to capture. May move two spaces on its first move. En passant is not allowed. Promoted to Queen when reaching the eighth rank, and may make the Queen's leap on its first move after being promoted. If this promotion is made with the opponent's King at the distance of the extended move, it does not give check on that turn. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a King can be captured on the next turn by an opponent's piece, it is in check. The King must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a draw. ###Ludii (game "Lombard Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (or (move Hop (between (range 1 2) if:(not (is Enemy (who at:(between))))) (to if:(is Empty (to)))) (move Leap {{F F R F} {F F L F}} (to if:(is Empty (to)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))) (if (= 1 (state at:(from))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece (id "Queen" Mover))) (set State at:(last To) 1)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1" state:1) (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8" state:1) (place "King2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))) (then (if (and (= 1 (state at:(where "King" Next))) (is Threatened (id "King" Next))) (set State at:(where "King" Next) 0))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw))})))
8x8 board. The pieces move as follows, with the number per player: 1 x King (king): moves one space orthogonally or diagonally. The King may leap to the second square on its first move if it has not yet been checked and does not hop over an opponent's piece. 1 x Queen: One square diagonally. On its first move, the Queen may jump diagonally two squares. The Queen cannot capture when making this move. 2 x Rook: Any number of spaces orthogonally. 2 x Fil (elephant): Two squares diagonally, jumping over the first. Cannot capture another Fil. 2 x Knight: Moves as a chess knight. 8 x Pawn: Moves one space forward orthogonally; one space forward diagonally to capture. May move two spaces on its first move. En passant is allowed. Promoted to Queen when reaching the eighth rank, and may make the Queen's leap on its first move after being promoted. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a King can be captured on the next turn by an opponent's piece, it is in check. The King must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a draw. Capturing all of an opponent's pieces except the King also results in a win.
(game "Long Assize" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Hop (between if:(not (is Enemy (who at:(between))))) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))) (if (= 1 (state at:(from))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece (id "Queen" Mover))) (set State at:(last To) 1)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1" state:1) (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8" state:1) (place "King2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))) (then (if (and (= 1 (state at:(where "King" Next))) (is Threatened (id "King" Next))) (set State at:(where "King" Next) 0))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw)) (if (= (count Pieces Next) 1) (result Mover Win))})))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x King (king): moves one space orthogonally or diagonally. The King may leap to the second square on its first move if it has not yet been checked and does not hop over an opponent's piece. 1 x Queen: One square diagonally. On its first move, the Queen may jump diagonally two squares. The Queen cannot capture when making this move. 2 x Rook: Any number of spaces orthogonally. 2 x Fil (elephant): Two squares diagonally, jumping over the first. Cannot capture another Fil. 2 x Knight: Moves as a chess knight. 8 x Pawn: Moves one space forward orthogonally; one space forward diagonally to capture. May move two spaces on its first move. En passant is allowed. Promoted to Queen when reaching the eighth rank, and may make the Queen's leap on its first move after being promoted. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a King can be captured on the next turn by an opponent's piece, it is in check. The King must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a draw. Capturing all of an opponent's pieces except the King also results in a win. ###Ludii (game "Long Assize" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "King" Each (or (move Step (to if:(not (is Friend (who at:(to)))) (apply (remove (to))))) (if (= 1 (state at:(from))) (move Hop (between if:(not (is Enemy (who at:(between))))) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "Bishop" Each (move Hop Diagonal (between if:True) (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Knight" 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 "Queen" Each (or (move Step Diagonal (to if:(not (is Friend (who at:(to)))) (apply (remove (to)))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))) (if (= 1 (state at:(from))) (move Hop Diagonal (between if:True) (to if:(is Empty (to))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (if (is In (last To) (sites Mover "Promotion")) (and (promote (last To) (piece (id "Queen" Mover))) (set State at:(last To) 1)))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1" state:1) (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8" state:1) (place "King2" coord:"E8" state:1)}) (play (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover))) (then (if (and (= 1 (state at:(where "King" Next))) (is Threatened (id "King" Next))) (set State at:(where "King" Next) 0))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Next) (result Mover Draw)) (if (= (count Pieces Next) 1) (result Mover Win))})))
The rules are the same as for Chess, except instead of moving a piece, a player's turn may be taken by replacing a captured piece on the board on any empty space. This piece is controlled by the player who replaced it. Captured pawns cannot be placed in the first or last row.
(game "Loop Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (add (piece (mapEntry "captured" (what at:(ahead (last To) Backward)))) (to (mapEntry "where" (what at:(ahead (last To) Backward)))))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))))) (piece "Knight" 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))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))))) (map "where" {(pair 2 64) (pair 1 70) (pair 4 65) (pair 3 71) (pair 6 66) (pair 5 72) (pair 8 67) (pair 7 73) (pair 10 68) (pair 9 74) (pair 12 69) (pair 11 75)}) (map "captured" {(pair 1 2) (pair 2 1) (pair 3 4) (pair 4 3) (pair 5 6) (pair 6 5) (pair 7 8) (pair 8 7) (pair 9 10) (pair 10 9) (pair 11 12) (pair 12 11)}) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "LastRanks" (union (sites Top) (sites Bottom))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (hand Each size:6)}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or {(move (from (sites Occupied by:Mover container:"Hand" components:{"Rook" "Bishop" "Knight" "Queen"})) (to (sites Empty))) (move (from (sites Occupied by:Mover container:"Hand" component:"Pawn")) (to (difference (sites Empty) (sites "LastRanks")))) (forEach Piece) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True))))))))}) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (or {(forEach Piece Next) (move (from (sites Occupied by:Next container:"Hand" components:{"Rook" "Bishop" "Knight" "Queen"})) (to (sites Empty))) (move (from (sites Occupied by:Next container:"Hand" component:"Pawn")) (to (difference (sites Empty) (sites "LastRanks"))))}) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
###Description The rules are the same as for Chess, except instead of moving a piece, a player's turn may be taken by replacing a captured piece on the board on any empty space. This piece is controlled by the player who replaced it. Captured pawns cannot be placed in the first or last row. ###Ludii (game "Loop Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (add (piece (mapEntry "captured" (what at:(ahead (last To) Backward)))) (to (mapEntry "where" (what at:(ahead (last To) Backward)))))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))))) (piece "Knight" 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))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (add (piece (mapEntry "captured" (what at:(to)))) (to (mapEntry "where" (what at:(to)))) (then (set Counter)))))))) (map "where" {(pair 2 64) (pair 1 70) (pair 4 65) (pair 3 71) (pair 6 66) (pair 5 72) (pair 8 67) (pair 7 73) (pair 10 68) (pair 9 74) (pair 12 69) (pair 11 75)}) (map "captured" {(pair 1 2) (pair 2 1) (pair 3 4) (pair 4 3) (pair 5 6) (pair 6 5) (pair 7 8) (pair 8 7) (pair 9 10) (pair 10 9) (pair 11 12) (pair 12 11)}) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "LastRanks" (union (sites Top) (sites Bottom))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom)) (hand Each size:6)}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or {(move (from (sites Occupied by:Mover container:"Hand" components:{"Rook" "Bishop" "Knight" "Queen"})) (to (sites Empty))) (move (from (sites Occupied by:Mover container:"Hand" component:"Pawn")) (to (difference (sites Empty) (sites "LastRanks")))) (forEach Piece) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True))))))))}) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (or {(forEach Piece Next) (move (from (sites Occupied by:Next container:"Hand" components:{"Rook" "Bishop" "Knight" "Queen"})) (to (sites Empty))) (move (from (sites Occupied by:Next container:"Hand" component:"Pawn")) (to (difference (sites Empty) (sites "LastRanks"))))}) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
The rules are the same as for Chess, except pawns cannot move two spaces on the first move, there is no castling, and no en-passant capture.
(game "Los Alamos Chess" (players {(player N) (player S)}) (equipment {(board (square 6)) (piece "Pawn" 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 (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 4)) (place "Rook1" {"A1" "F1"}) (place "Knight1" {"B1" "E1"}) (place "Queen1" coord:"C1") (place "King1" coord:"D1") (place "Rook2" {"A6" "F6"}) (place "Knight2" {"B6" "E6"}) (place "Queen2" coord:"C6") (place "King2" coord:"D6")}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Rook"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
###Description The rules are the same as for Chess, except pawns cannot move two spaces on the first move, there is no castling, and no en-passant capture. ###Ludii (game "Los Alamos Chess" (players {(player N) (player S)}) (equipment {(board (square 6)) (piece "Pawn" 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 (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 4)) (place "Rook1" {"A1" "F1"}) (place "Knight1" {"B1" "E1"}) (place "Queen1" coord:"C1") (place "King1" coord:"D1") (place "Rook2" {"A6" "F6"}) (place "Knight2" {"B6" "E6"}) (place "Queen2" coord:"C6") (place "King2" coord:"D6")}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Rook"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
The black player has a normal set of chess pieces. The white player has a single piece which can move either as a queen or as a knight. Black's goal is to checkmate the white piece, White's goal is to checkmate the black king. There is no pawn promotion.
(game "Maharajah Chess" (players 2) (equipment {(board (square 8)) (piece "Pawn" P2 S (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (set Counter)))) (piece "Rook" P2 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" P2 (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" P2 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" P2 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" P2 (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Amazon" P1 (or (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))) (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter)))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")})}) (rules (start {(place "Pawn2" (sites Row 6)) (place "Amazon1" coord:"E1") (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (do (or (forEach Piece) (if (and {(is Mover P2) (= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True))))))))) ifAfterwards:(if (is Mover P1) (not (is Threatened (id "Amazon" Mover))) (not (is Threatened (id "King" Mover)))))) (end {(if (if (is Mover P1) (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (and (is Threatened (id "Amazon" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "Amazon" Next)))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
###Description The black player has a normal set of chess pieces. The white player has a single piece which can move either as a queen or as a knight. Black's goal is to checkmate the white piece, White's goal is to checkmate the black king. There is no pawn promotion. ###Ludii (game "Maharajah Chess" (players 2) (equipment {(board (square 8)) (piece "Pawn" P2 S (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (set Counter)))) (piece "Rook" P2 (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" P2 (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" P2 (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" P2 (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" P2 (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Amazon" P1 (or (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))) (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter)))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")})}) (rules (start {(place "Pawn2" (sites Row 6)) (place "Amazon1" coord:"E1") (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (do (or (forEach Piece) (if (and {(is Mover P2) (= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True))))))))) ifAfterwards:(if (is Mover P1) (not (is Threatened (id "Amazon" Mover))) (not (is Threatened (id "King" Mover)))))) (end {(if (if (is Mover P1) (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (and (is Threatened (id "Amazon" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "Amazon" Next)))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
McCooey Chess is played on a hexagonal board with each side having length 6, and each space oriented horizontally. The board has has 91 spaces. Piece Movement: * All pieces other than Pawns move as in Glinski Chess. - Kings step one space in any of the 12 directions. They do not castle. - Queens slide in any of the 12 directions. - Rooks slide in any of the 6 adjacent direction. - Bishops slide in any of the 6 'diagonal' directions. - Knights move two spaces in any adjacent direction, then one space in another direction. * Pawns can advance one space forward without capturing. A Pawn on a Pawn start space but not in the innermost column can advance two spaces forward without capturing. Pawns capture 'diagonally forward' (i.e., to a space ahead connected by an edge, and having the same colour). En Passant capture and Pawn promotion take place as in Glinski Chess. The game ends on a checkmate or stalemate.
(game "McCooey Chess" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 6))) (piece "King" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (if (and (is In (from) (sites Start (piece (what at:(from))))) (not (is In (from) (sites Mover "CentrePawnStartCell")))) (move Hop Forward (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) Backward)) (set Var (last To))})))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (var))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "CentrePawnStartCell" P1 (sites {"D4"})) (regions "CentrePawnStartCell" P2 (sites {"H8"})) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 0)) (regions "Region-Light" (sites Phase 2)) (regions "Region-Medium" (sites Phase 1))}) (rules (start {(place "King1" coord:"B1") (place "Queen1" coord:"A2") (place "Rook1" {"A3" "C1"}) (place "Bishop1" {"A1" "B2" "C3"}) (place "Knight1" {"B3" "C2"}) (place "King2" coord:"K10") (place "Queen2" coord:"J11") (place "Rook2" {"I11" "K9"}) (place "Bishop2" {"K11" "J10" "I9"}) (place "Knight2" {"I10" "J9"}) (place "Pawn1" {"A4" "B4" "C4" "D4" "D3" "D2" "D1"}) (place "Pawn2" {"H11" "H10" "H9" "H8" "I8" "J8" "K8"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
###Description McCooey Chess is played on a hexagonal board with each side having length 6, and each space oriented horizontally. The board has has 91 spaces. Piece Movement: * All pieces other than Pawns move as in Glinski Chess. - Kings step one space in any of the 12 directions. They do not castle. - Queens slide in any of the 12 directions. - Rooks slide in any of the 6 adjacent direction. - Bishops slide in any of the 6 'diagonal' directions. - Knights move two spaces in any adjacent direction, then one space in another direction. * Pawns can advance one space forward without capturing. A Pawn on a Pawn start space but not in the innermost column can advance two spaces forward without capturing. Pawns capture 'diagonally forward' (i.e., to a space ahead connected by an edge, and having the same colour). En Passant capture and Pawn promotion take place as in Glinski Chess. The game ends on a checkmate or stalemate. ###Ludii (game "McCooey Chess" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 6))) (piece "King" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (if (and (is In (from) (sites Start (piece (what at:(from))))) (not (is In (from) (sites Mover "CentrePawnStartCell")))) (move Hop Forward (between if:(is In (between) (sites Empty))) (to if:(is In (to) (sites Empty))) (then (and {(set Pending (ahead (last To) Backward)) (set Var (last To))})))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (var))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "CentrePawnStartCell" P1 (sites {"D4"})) (regions "CentrePawnStartCell" P2 (sites {"H8"})) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 0)) (regions "Region-Light" (sites Phase 2)) (regions "Region-Medium" (sites Phase 1))}) (rules (start {(place "King1" coord:"B1") (place "Queen1" coord:"A2") (place "Rook1" {"A3" "C1"}) (place "Bishop1" {"A1" "B2" "C3"}) (place "Knight1" {"B3" "C2"}) (place "King2" coord:"K10") (place "Queen2" coord:"J11") (place "Rook2" {"I11" "K9"}) (place "Bishop2" {"K11" "J10" "I9"}) (place "Knight2" {"I10" "J9"}) (place "Pawn1" {"A4" "B4" "C4" "D4" "D3" "D2" "D1"}) (place "Pawn2" {"H11" "H10" "H9" "H8" "I8" "J8" "K8"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
8x8 board. The pieces move as follows, with the number per player: 1 x King (king): moves one space orthogonally or diagonally. 1 x Queen (counselor): One square diagonally. 2 x Rook (rook): Any number of spaces orthogonally. 2 x Fil (elephant): Two squares diagonally, jumping over the first. Cannot capture another Fil. 2 x Knight: Moves as a chess knight. 8 x Pawn: Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the eighth rank. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a Shah can be captured on the next turn by an opponent's piece, it is in check. The Shah must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a win for that player causing it.
(game "Medieval Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "Ferz_noCross") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
###Description 8x8 board. The pieces move as follows, with the number per player: 1 x King (king): moves one space orthogonally or diagonally. 1 x Queen (counselor): One square diagonally. 2 x Rook (rook): Any number of spaces orthogonally. 2 x Fil (elephant): Two squares diagonally, jumping over the first. Cannot capture another Fil. 2 x Knight: Moves as a chess knight. 8 x Pawn: Moves one space forward orthogonally; one space forward diagonally to capture. No en passant. Promoted to Fers when reaching the eighth rank. No castling. An opponent's piece is captured by moving a player's own piece onto a space occupied by the opponent's piece. When a Shah can be captured on the next turn by an opponent's piece, it is in check. The Shah must not be in check at the end of the player's turn. If this is not possible, it is checkmate and the opponent wins. Stalemate results in a win for that player causing it. ###Ludii (game "Medieval Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))))) (piece "King_noCross" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop_noCross" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) (is Enemy (who at:(to)))) (apply (remove (to)))))) (piece "Knight" 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 "Ferz_noCross" 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 "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"}) (place "Knight1" {"B1" "G1"}) (place "Bishop_noCross1" {"C1" "F1"}) (place "Ferz_noCross1" coord:"D1") (place "King_noCross1" coord:"E1") (place "Rook2" {"A8" "H8"}) (place "Knight2" {"B8" "G8"}) (place "Bishop_noCross2" {"C8" "F8"}) (place "Ferz_noCross2" coord:"D8") (place "King_noCross2" coord:"E8")}) (play (if (is Prev Mover) (move Promote (last To) (piece "Ferz_noCross") Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King_noCross" Mover)))))) (end {(if (and (is Threatened (id "King_noCross" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King_noCross" Next))))))) (result Mover Win)) (if (= (count Pieces Next) 1) (result Mover Win)) (if (no Moves Next) (result Mover Win))})))
Mini Hexchess is played on a hexagonal board with each side having length 5, and each space oriented horizontally. The board has 37 spaces. Piece Movement: * Kings, Rooks, Bishops, and Knights move as in Glinski Chess. - Kings step one space in any of the 12 directions. They do not castle. - Rooks slide in any of the 6 adjacent directions. - Bishops slide in any of the 6 'diagonal' directions. - Knights move two spaces in any adjacent direction, then one space in another direction. * There are no Queens in Mini Hexchess. * Pawns can advance one space forward without capturing. Pawns can never advance more than one space. Pawns capture 'diagonally forward' (i.e., to a space ahead connected by an edge, and having the same colour). There is no en passant capture. On reaching the farthest rank in a given file, Pawns are promoted to a Rook, Bishop, or Knight. Note that a Pawn cannot be promoted to a Queen, since there are no Queens in Mini Hexchess. The game ends on a checkmate or stalemate.
(game "Mini Hexchess" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 4))) (piece "King" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 2)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 0))}) (rules (start {(place "King1" coord:"B2") (place "Rook1" coord:"B1") (place "Bishop1" coord:"A1") (place "Knight1" coord:"A2") (place "King2" coord:"F6") (place "Rook2" coord:"F7") (place "Bishop2" coord:"G7") (place "Knight2" coord:"G6") (place "Pawn1" {"A3" "B3" "C3" "C2" "C1"}) (place "Pawn2" {"E7" "E6" "E5" "F5" "G5"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
###Description Mini Hexchess is played on a hexagonal board with each side having length 5, and each space oriented horizontally. The board has 37 spaces. Piece Movement: * Kings, Rooks, Bishops, and Knights move as in Glinski Chess. - Kings step one space in any of the 12 directions. They do not castle. - Rooks slide in any of the 6 adjacent directions. - Bishops slide in any of the 6 'diagonal' directions. - Knights move two spaces in any adjacent direction, then one space in another direction. * There are no Queens in Mini Hexchess. * Pawns can advance one space forward without capturing. Pawns can never advance more than one space. Pawns capture 'diagonally forward' (i.e., to a space ahead connected by an edge, and having the same colour). There is no en passant capture. On reaching the farthest rank in a given file, Pawns are promoted to a Rook, Bishop, or Knight. Note that a Pawn cannot be promoted to a Queen, since there are no Queens in Mini Hexchess. The game ends on a checkmate or stalemate. ###Ludii (game "Mini Hexchess" (players {(player N) (player S)}) (equipment {(board (rotate 90 (hex 4))) (piece "King" Each (move Step All (to if:(or (is In (to) (sites Empty)) (is Enemy (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (if (is Mover P1) (directions {NNW NNE}) (directions {SSW SSE})) (to if:(is Enemy (who at:(to))) (apply (remove (to)))))} (then (and (if (is In (last To) (sites Mover "PromotionZone")) (moveAgain)) (set Counter))))) (regions "PromotionZone" P1 (union (sites Side NW) (sites Side NE))) (regions "PromotionZone" P2 (union (sites Side SW) (sites Side SE))) (regions "Region-Dark" (sites Phase 2)) (regions "Region-Light" (sites Phase 1)) (regions "Region-Medium" (sites Phase 0))}) (rules (start {(place "King1" coord:"B2") (place "Rook1" coord:"B1") (place "Bishop1" coord:"A1") (place "Knight1" coord:"A2") (place "King2" coord:"F6") (place "Rook2" coord:"F7") (place "Bishop2" coord:"G7") (place "Knight2" coord:"G6") (place "Pawn1" {"A3" "B3" "C3" "C2" "C1"}) (place "Pawn2" {"E7" "E6" "E5" "F5" "G5"})}) phases:{(phase "Movement" (play (if (is Prev Mover) (move Promote (last To) (piece {"Rook" "Bishop" "Knight"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))}))}))
Played on an 8x6 board with pieces with specialized moves. White moves first: Pawns (6): can move one space forwards (orthogonally or diagonally across dark squares) and can capture an enemy located diagonally across either of the adjacent dark squares (diagonal forwards and diagonal backwards). Upon reaching the last rank, Pawns promote to any major piece except a king. -- There are no initial double moves, nor enpassant. Bishops (2): Can move like chess queens - any orthogonal direction or allowed diagonal direction (but not across light squares). Knights (2) move one space orthogonally and one space diagonally, in either order to reach a non-adjacent destination. The intermediate position may be occupied. Knights capture at their destination, but if the destination is empty, they capture an enemy along their path. Queen (1): can move any number of spaces diagonally only, but once per turn, may change direction while crossing a dark square. They capture an enemy at the destination. Kings (1): can move one space orthogonally or diagonally. The King can move twice per turn, but not in the same direction nor back to the same place. A King may capture on both parts of its turn, but only if the piece(s) captured is not defended. Checks: A check is a threat to take a king, or a threat on a site that the king passes through. -- The King may not move across- nor to- a position that remains in check at the completion of its full turn. Nor may a king be put into check by the movement of another friendly piece, including by the opening of a space that allows a knight to jump across the king, or opening a space between opposing kings. Note: While a king may not move across an open site under check, it may still threaten check across it, thus preventing the opposing king from occupying those sites -- because if the opposing king were captured at those sites, the game would be over and all checks would be null, including those on the intervening site. A king does not threaten check across an occupied site. In no case may a King put the other king directly into check, because in all such cases both the kings would be put into check, and movement into check is forbidden. A King must move when in check. The game is won when the ememy king must move, but cannot. Not implemented yet and still under consideration: 13 continuous ckeck moves is also a win. the last player to move a pawn or capture a piece loses after 20 moves per player: Note that bare kings will normally end in a stalemate win before this limit is reached. Resolution of Check is excluded from the move limit count.
(game "Nodal Chess" (players {(player N) (player S)}) (equipment {(board (add (remove (rectangle 8 6) cells:{1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33}) edges:{{1 2} {3 4} {6 12} {11 17} {18 24} {23 29} {30 36} {35 41} {43 44} {45 46}}) use:Vertex) (piece "Pawn" Each (or {(move Step (if (= 1 (mover)) (union N (union NE NW)) (union S (union SW SE))) (to if:(is Empty (to))) (then (and (set Score Mover 0) (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (move Step Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (and (set Score Mover 0) (if (is In (last To) (sites Mover "Promotion")) (moveAgain)))))})) (piece "King" Each (if (not (is Prev Mover)) (or {(move (from (from)) (to (difference (sites (from) {{F R F F} {F L F F} {F R F}}) (sites Around (from) All)) if:(and {(is Enemy (who at:(to))) (< 0 (count Sites in:(intersection (sites Around (from) All if:(is Empty (to))) (sites Around (to) All))))}) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0))))))) (move (from (from)) (to (difference (sites (from) {{F R F F} {F L F F} {F R F}}) (sites Around (from) All)) if:(and {(is Empty (to)) (< 0 (count Sites in:(intersection (sites Around (from) All if:(is Empty (to))) (sites Around (to) All))))}) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0))))))) (or (move Step All (to if:(and {(!= (from) (to)) (is Enemy (who at:(to))) (not (is In (to) (sites (from) {{F F} {F F R F F}})))}) (apply if:(is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0)))))) (move Step All (to if:(and {(!= (from) (to)) (is Empty (to)) (not (is In (to) (sites (from) {{F F} {F F R F F}})))}) (apply if:(is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0)))))) (then (moveAgain)))} (then (set Var "LF" (last From)))) (or {(move Pass) (move Step All (to if:(and {(!= (var "LF") (to)) (is Enemy (who at:(to))) (not (is In (to) (sites (var "LF") {{F F} {F F R F F}})))}) (apply if:(is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0)))))) (move Step All (to if:(and {(!= (var "LF") (to)) (is Empty (to)) (not (is In (to) (sites (var "LF") {{F F} {F F R F F}})))}) (apply if:(is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0))))))}))) (piece "Bishop" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0)))))))) (piece "Knight" Each (move Leap {{F R F F} {F L F F}} (to if:(not (is Mover (who at:(to)))) (apply (if (is Next (who at:(to))) (remove (to) (then (set Score Mover 0))) (if (< 0 (count Pieces Next in:(intersection (sites Around (to) All) (sites Around (from) All)))) (remove (intersection (sites Around (to) All) (sites Around (from) All)) (then (set Score Mover 0))))))))) (piece "Queen" Each (move (from (from)) (to (union {(sites To (slide (from (from)) Diagonal (to if:(is Enemy (who at:(to)))))) (sites (results from:(union (sites To (slide (from (from)) Diagonal)) (sites {(from)})) to:(sites (results from:(sites Incident Cell of:Vertex at:(from)) to:(forEach (sites Incident Vertex of:Cell at:(from)) if:(not (is Mover (who at:(site))))) (to))) (to))) (forEach of:(sites (results from:(union (sites To (slide (from (from)) Diagonal)) (sites {(from)})) to:(sites (results from:(sites Incident Cell of:Vertex at:(from)) to:(forEach (sites Incident Vertex of:Cell at:(from)) if:(is Empty (site))) (to))) (to))) (sites To (slide (from (site)) Diagonal (to if:(is Enemy (who at:(to)))))))}) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0))) (set NextPlayer (player (next)))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Knight1" {"B1" "E1"}) (place "Bishop1" {"A1" "F1"}) (place "Queen1" coord:"C1") (place "King1" coord:"D1" state:1) (place "Knight2" {"B8" "E8"}) (place "Bishop2" {"A8" "F8"}) (place "Queen2" coord:"C8") (place "King2" coord:"D8" state:1)}) (play (if (not (is Prev Mover)) (if (and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))}) (or (do (forEach Piece {"Queen" "Knight" "Bishop" "Pawn"}) ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))})) (do (forEach Piece "King") ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))))))) (can Move (do (move Step (from (last To)) All (to if:(is In (to) (sites Around (var "LF") All includeSelf:True)))) ifAfterwards:(or (not (is Threatened (id "King" Mover) (forEach Piece {"Queen" "Knight" "Bishop" "Pawn"}))) (= (var "LF") (last To)))))})) (then (addScore Mover 1))) (do (or (do (forEach Piece {"Queen" "Knight" "Bishop" "Pawn"}) ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))})) (do (forEach Piece "King") ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))))))) (can Move (do (move Step (from (last To)) All (to if:(is In (to) (sites Around (var "LF") All includeSelf:True)))) ifAfterwards:(or (not (is Threatened (id "King" Mover) (forEach Piece {"Queen" "Knight" "Bishop" "Pawn"}))) (= (var "LF") (last To)))))})) (then (addScore Mover 1))) next:(addScore Mover -1))) (if (= (id "King" Mover) (what at:(last To))) (do (forEach Piece "King" Mover) ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))})) (move Promote (last To) (piece {"Queen" "Knight" "Bishop"}) Mover)) (then (if (and {(not (is Threatened (id "King" Prev))) (not (is Threatened (id "King" Prev) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))}) (addScore Mover 0))))) (end {(if (no Moves Next) (result Mover Win)) (if (< 13 (score Mover)) (result Mover Loss))})))
###Description Played on an 8x6 board with pieces with specialized moves. White moves first: Pawns (6): can move one space forwards (orthogonally or diagonally across dark squares) and can capture an enemy located diagonally across either of the adjacent dark squares (diagonal forwards and diagonal backwards). Upon reaching the last rank, Pawns promote to any major piece except a king. -- There are no initial double moves, nor enpassant. Bishops (2): Can move like chess queens - any orthogonal direction or allowed diagonal direction (but not across light squares). Knights (2) move one space orthogonally and one space diagonally, in either order to reach a non-adjacent destination. The intermediate position may be occupied. Knights capture at their destination, but if the destination is empty, they capture an enemy along their path. Queen (1): can move any number of spaces diagonally only, but once per turn, may change direction while crossing a dark square. They capture an enemy at the destination. Kings (1): can move one space orthogonally or diagonally. The King can move twice per turn, but not in the same direction nor back to the same place. A King may capture on both parts of its turn, but only if the piece(s) captured is not defended. Checks: A check is a threat to take a king, or a threat on a site that the king passes through. -- The King may not move across- nor to- a position that remains in check at the completion of its full turn. Nor may a king be put into check by the movement of another friendly piece, including by the opening of a space that allows a knight to jump across the king, or opening a space between opposing kings. Note: While a king may not move across an open site under check, it may still threaten check across it, thus preventing the opposing king from occupying those sites -- because if the opposing king were captured at those sites, the game would be over and all checks would be null, including those on the intervening site. A king does not threaten check across an occupied site. In no case may a King put the other king directly into check, because in all such cases both the kings would be put into check, and movement into check is forbidden. A King must move when in check. The game is won when the ememy king must move, but cannot. Not implemented yet and still under consideration: 13 continuous ckeck moves is also a win. the last player to move a pawn or capture a piece loses after 20 moves per player: Note that bare kings will normally end in a stalemate win before this limit is reached. Resolution of Check is excluded from the move limit count. ###Ludii (game "Nodal Chess" (players {(player N) (player S)}) (equipment {(board (add (remove (rectangle 8 6) cells:{1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33}) edges:{{1 2} {3 4} {6 12} {11 17} {18 24} {23 29} {30 36} {35 41} {43 44} {45 46}}) use:Vertex) (piece "Pawn" Each (or {(move Step (if (= 1 (mover)) (union N (union NE NW)) (union S (union SW SE))) (to if:(is Empty (to))) (then (and (set Score Mover 0) (if (is In (last To) (sites Mover "Promotion")) (moveAgain))))) (move Step Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to)))) (then (and (set Score Mover 0) (if (is In (last To) (sites Mover "Promotion")) (moveAgain)))))})) (piece "King" Each (if (not (is Prev Mover)) (or {(move (from (from)) (to (difference (sites (from) {{F R F F} {F L F F} {F R F}}) (sites Around (from) All)) if:(and {(is Enemy (who at:(to))) (< 0 (count Sites in:(intersection (sites Around (from) All if:(is Empty (to))) (sites Around (to) All))))}) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0))))))) (move (from (from)) (to (difference (sites (from) {{F R F F} {F L F F} {F R F}}) (sites Around (from) All)) if:(and {(is Empty (to)) (< 0 (count Sites in:(intersection (sites Around (from) All if:(is Empty (to))) (sites Around (to) All))))}) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0))))))) (or (move Step All (to if:(and {(!= (from) (to)) (is Enemy (who at:(to))) (not (is In (to) (sites (from) {{F F} {F F R F F}})))}) (apply if:(is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0)))))) (move Step All (to if:(and {(!= (from) (to)) (is Empty (to)) (not (is In (to) (sites (from) {{F F} {F F R F F}})))}) (apply if:(is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0)))))) (then (moveAgain)))} (then (set Var "LF" (last From)))) (or {(move Pass) (move Step All (to if:(and {(!= (var "LF") (to)) (is Enemy (who at:(to))) (not (is In (to) (sites (var "LF") {{F F} {F F R F F}})))}) (apply if:(is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0)))))) (move Step All (to if:(and {(!= (var "LF") (to)) (is Empty (to)) (not (is In (to) (sites (var "LF") {{F F} {F F R F F}})))}) (apply if:(is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0))))))}))) (piece "Bishop" Each (move Slide All (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0)))))))) (piece "Knight" Each (move Leap {{F R F F} {F L F F}} (to if:(not (is Mover (who at:(to)))) (apply (if (is Next (who at:(to))) (remove (to) (then (set Score Mover 0))) (if (< 0 (count Pieces Next in:(intersection (sites Around (to) All) (sites Around (from) All)))) (remove (intersection (sites Around (to) All) (sites Around (from) All)) (then (set Score Mover 0))))))))) (piece "Queen" Each (move (from (from)) (to (union {(sites To (slide (from (from)) Diagonal (to if:(is Enemy (who at:(to)))))) (sites (results from:(union (sites To (slide (from (from)) Diagonal)) (sites {(from)})) to:(sites (results from:(sites Incident Cell of:Vertex at:(from)) to:(forEach (sites Incident Vertex of:Cell at:(from)) if:(not (is Mover (who at:(site))))) (to))) (to))) (forEach of:(sites (results from:(union (sites To (slide (from (from)) Diagonal)) (sites {(from)})) to:(sites (results from:(sites Incident Cell of:Vertex at:(from)) to:(forEach (sites Incident Vertex of:Cell at:(from)) if:(is Empty (site))) (to))) (to))) (sites To (slide (from (site)) Diagonal (to if:(is Enemy (who at:(to)))))))}) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Score Mover 0))) (set NextPlayer (player (next)))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Knight1" {"B1" "E1"}) (place "Bishop1" {"A1" "F1"}) (place "Queen1" coord:"C1") (place "King1" coord:"D1" state:1) (place "Knight2" {"B8" "E8"}) (place "Bishop2" {"A8" "F8"}) (place "Queen2" coord:"C8") (place "King2" coord:"D8" state:1)}) (play (if (not (is Prev Mover)) (if (and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))}) (or (do (forEach Piece {"Queen" "Knight" "Bishop" "Pawn"}) ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))})) (do (forEach Piece "King") ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))))))) (can Move (do (move Step (from (last To)) All (to if:(is In (to) (sites Around (var "LF") All includeSelf:True)))) ifAfterwards:(or (not (is Threatened (id "King" Mover) (forEach Piece {"Queen" "Knight" "Bishop" "Pawn"}))) (= (var "LF") (last To)))))})) (then (addScore Mover 1))) (do (or (do (forEach Piece {"Queen" "Knight" "Bishop" "Pawn"}) ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))})) (do (forEach Piece "King") ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))))))) (can Move (do (move Step (from (last To)) All (to if:(is In (to) (sites Around (var "LF") All includeSelf:True)))) ifAfterwards:(or (not (is Threatened (id "King" Mover) (forEach Piece {"Queen" "Knight" "Bishop" "Pawn"}))) (= (var "LF") (last To)))))})) (then (addScore Mover 1))) next:(addScore Mover -1))) (if (= (id "King" Mover) (what at:(last To))) (do (forEach Piece "King" Mover) ifAfterwards:(and {(not (is Threatened (id "King" Mover))) (not (is Threatened (id "King" Mover) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))})) (move Promote (last To) (piece {"Queen" "Knight" "Bishop"}) Mover)) (then (if (and {(not (is Threatened (id "King" Prev))) (not (is Threatened (id "King" Prev) (forEach Piece "Knight" (or (move Step Diagonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Orthogonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to))))) (move Step Orthogonal (to if:(and (is Enemy (who at:(to))) (< 0 (count Sites in:(difference (sites Around (to) Diagonal if:(is Empty (to))) (sites Around (from) Orthogonal))))) (apply (remove (to)))))))))}) (addScore Mover 0))))) (end {(if (no Moves Next) (result Mover Win)) (if (< 13 (score Mover)) (result Mover Loss))})))
Same rules as Chess, just a different setup.
(game "Official Football Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "D1") (pair 2 "D8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites {"B2" "C2" "E2" "F2"})) (place "Pawn2" (sites {"B7" "C7" "E7" "F7"})) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"D2"}) (place "Bishop1" {"A2" "H2"}) (place "Queen1" coord:"E1") (place "King1" coord:"D1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"D7"}) (place "Bishop2" {"A7" "H7"}) (place "Queen2" coord:"E8") (place "King2" coord:"D8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
###Description Same rules as Chess, just a different setup. ###Ludii (game "Official Football Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "D1") (pair 2 "D8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites {"B2" "C2" "E2" "F2"})) (place "Pawn2" (sites {"B7" "C7" "E7" "F7"})) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"D2"}) (place "Bishop1" {"A2" "H2"}) (place "Queen1" coord:"E1") (place "King1" coord:"D1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"D7"}) (place "Bishop2" {"A7" "H7"}) (place "Queen2" coord:"E8") (place "King2" coord:"D8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (or (forEach Piece) (if (and (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True) (to if:True (apply (set State at:(from) 0))))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to))) (to if:True (apply (set State at:(from) 0)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (to if:True (apply (set State at:(from) 0))) (then (slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True) (to if:True (apply (set State at:(from) 0)))))))))) ifAfterwards:(not (is Threatened (id "King" Mover)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 99)) (result Mover Draw))})))
Phase Chess is a variant of Chess played on standard Chess board and Chess set, with same rules as Chess except the next player must move from a cell of the same colour just moved to if they can. It they can not, they can move any piece.
(game "Phase Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (priority {(if (!= 0 (count Moves)) (do (or {(forEach Piece "Queen" (if (= (phase of:(from)) (phase of:(last To))) (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (forEach Piece "Knight" (if (= (phase of:(from)) (phase of:(last To))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (forEach Piece "Bishop" (if (= (phase of:(from)) (phase of:(last To))) (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (forEach Piece "King" (if (= (phase of:(from)) (phase of:(last To))) (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (forEach Piece "Rook" (if (= (phase of:(from)) (phase of:(last To))) (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (forEach Piece "Pawn" (if (= (phase of:(from)) (phase of:(last To))) (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter)))))) (if (= 0 (phase of:(last To))) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True)))))))))}) ifAfterwards:(not (is Threatened (id "King" Mover) (forEach Piece))))) (do (or (forEach Piece) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True))))))))) ifAfterwards:(not (is Threatened (id "King" Mover))))}))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next) (forEach Piece))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
###Description Phase Chess is a variant of Chess played on standard Chess board and Chess set, with same rules as Chess except the next player must move from a cell of the same colour just moved to if they can. It they can not, they can move any piece. ###Ludii (game "Phase Chess" (players {(player N) (player S)}) (equipment {(board (square 8)) (piece "Pawn" 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))))) (or (if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward)))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (piece "Knight" Each (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (remove (to) (then (set Counter))))))) (map "King" {(pair 1 "E1") (pair 2 "E8")}) (map "RookLeft" {(pair 1 "A1") (pair 2 "A8")}) (map "RookRight" {(pair 1 "H1") (pair 2 "H8")}) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 6)) (place "Rook1" {"A1" "H1"} state:1) (place "Knight1" {"B1" "G1"}) (place "Bishop1" {"C1" "F1"}) (place "Queen1" coord:"D1") (place "King1" coord:"E1" state:1) (place "Rook2" {"A8" "H8"} state:1) (place "Knight2" {"B8" "G8"}) (place "Bishop2" {"C8" "F8"}) (place "Queen2" coord:"D8") (place "King2" coord:"E8" state:1)}) (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (priority {(if (!= 0 (count Moves)) (do (or {(forEach Piece "Queen" (if (= (phase of:(from)) (phase of:(last To))) (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (forEach Piece "Knight" (if (= (phase of:(from)) (phase of:(last To))) (move Leap {{F F R F} {F F L F}} (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (forEach Piece "Bishop" (if (= (phase of:(from)) (phase of:(last To))) (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter))))))))) (forEach Piece "King" (if (= (phase of:(from)) (phase of:(last To))) (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (forEach Piece "Rook" (if (= (phase of:(from)) (phase of:(last To))) (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (remove (to) (then (set Counter)))))) (then (if (= (state at:(last To)) 1) (set State at:(last To) 0)))))) (forEach Piece "Pawn" (if (= (phase of:(from)) (phase of:(last To))) (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))) (then (set Pending (ahead (last To) Backward))))) (move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (remove (to))))) (move Step (directions {FR FL}) (to if:(and (is Pending) (= (to) (value Pending)))) (then (remove (ahead (last To) Backward))))} (then (and (if (is In (last To) (sites Mover "Promotion")) (moveAgain)) (set Counter)))))) (if (= 0 (phase of:(last To))) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True)))))))))}) ifAfterwards:(not (is Threatened (id "King" Mover) (forEach Piece))))) (do (or (forEach Piece) (if (and {(= (what at:(mapEntry "King" (mover))) (id "King" Mover)) (= (state at:(mapEntry "King" (mover))) 1) (not (is Threatened (id "King" Mover)))}) (or (if (and (= (state at:(mapEntry "RookLeft" (mover))) 1) (can Move (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) W (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookLeft" (mover))) E (between (exact 3) if:True)))))) (if (and (= (state at:(mapEntry "RookRight" (mover))) 1) (can Move (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:(is Empty (to)))))) (move Slide (from (mapEntry "King" (mover))) E (between (exact 2) if:(and (is Empty (to)) (not (is Threatened (id "King" Mover) at:(to))))) (then (and (set State at:(last To) 0) (move Slide (from (mapEntry "RookRight" (mover))) W (between (exact 2) if:True))))))))) ifAfterwards:(not (is Threatened (id "King" Mover))))}))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next) (forEach Piece))))))) (result Mover Win)) (if (or (no Moves Mover) (= (counter) 100)) (result Mover Draw))})))
The following rules are additionally used to the chess rules: - Pawns can only advance one space on their first move. There is no en passant capturing. - A pawn can only promote to a captured piece. - There is no castling. - If 20 moves are played without a capture or promotion, the player with the most `points' on the board wins. (Pawn=1 pt., Bishop/Knight=3, Rook=5, Queen = 9.) The game starts like in the encyclopedia of Chess Variants.
(game "Quick Chess" (players {(player N) (player S)}) (equipment {(board (rectangle 6 5)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (and (remove (to)) (remember Value "CapturedPieces" (what at:(to)))))))} (then (and (if (and (is In (last To) (sites Mover "Promotion")) (can Move (or {(if (is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Queen"}) Mover)) (if (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Knight"}) Mover)) (if (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Rook"}) Mover)) (if (is In (id "Bishop" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Bishop"}) Mover))}))) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (piece "Knight" 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))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 4)) (place "Rook1" {"E1"}) (place "Knight1" {"A1"}) (place "Bishop1" {"D1"}) (place "Queen1" coord:"C1") (place "King1" coord:"B1") (place "Rook2" {"E6"}) (place "Knight2" {"A6"}) (place "Bishop2" {"D6"}) (place "Queen2" coord:"C6") (place "King2" coord:"B6")}) (play (if (is Prev Mover) (or {(if (is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Queen"}) Mover)) (if (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Knight"}) Mover)) (if (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Rook"}) Mover)) (if (is In (id "Bishop" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Bishop"}) Mover))}) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (if (= 19 (counter)) (and (forEach Player (forEach Site (sites Occupied by:Player) (if (= (what at:(site)) (id "Pawn" Player)) (addScore Player 1) (if (= (what at:(site)) (id "Rook" Player)) (addScore Player 5) (if (= (what at:(site)) (id "Queen" Player)) (addScore Player 9) (if (!= (what at:(site)) (id "King" Player)) (addScore Player 3))))))) (set Var "NoEnoughCapture" 1)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Draw)) (if (= (var "NoEnoughCapture") 1) (byScore))})))
###Description The following rules are additionally used to the chess rules: - Pawns can only advance one space on their first move. There is no en passant capturing. - A pawn can only promote to a captured piece. - There is no castling. - If 20 moves are played without a capture or promotion, the player with the most `points' on the board wins. (Pawn=1 pt., Bishop/Knight=3, Rook=5, Queen = 9.) The game starts like in the encyclopedia of Chess Variants. ###Ludii (game "Quick Chess" (players {(player N) (player S)}) (equipment {(board (rectangle 6 5)) (piece "Pawn" Each (or {(move Step Forward (to if:(is Empty (to)))) (move Step (directions {FR FL}) (to if:(is Enemy (who at:(to))) (apply (and (remove (to)) (remember Value "CapturedPieces" (what at:(to)))))))} (then (and (if (and (is In (last To) (sites Mover "Promotion")) (can Move (or {(if (is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Queen"}) Mover)) (if (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Knight"}) Mover)) (if (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Rook"}) Mover)) (if (is In (id "Bishop" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Bishop"}) Mover))}))) (moveAgain)) (set Counter))))) (piece "Rook" Each (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (piece "King" Each (move Step (to if:(not (is Friend (who at:(to)))) (apply (if (is Enemy (who at:(to))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (piece "Bishop" Each (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (piece "Knight" 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))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (piece "Queen" Each (move Slide (to if:(is Enemy (who at:(to))) (apply (if (is Enemy (who at:(to))) (and (remove (to) (then (set Counter))) (remember Value "CapturedPieces" (what at:(to))))))))) (regions "Promotion" P1 (sites Top)) (regions "Promotion" P2 (sites Bottom))}) (rules (start {(place "Pawn1" (sites Row 1)) (place "Pawn2" (sites Row 4)) (place "Rook1" {"E1"}) (place "Knight1" {"A1"}) (place "Bishop1" {"D1"}) (place "Queen1" coord:"C1") (place "King1" coord:"B1") (place "Rook2" {"E6"}) (place "Knight2" {"A6"}) (place "Bishop2" {"D6"}) (place "Queen2" coord:"C6") (place "King2" coord:"B6")}) (play (if (is Prev Mover) (or {(if (is In (id "Queen" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Queen"}) Mover)) (if (is In (id "Knight" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Knight"}) Mover)) (if (is In (id "Rook" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Rook"}) Mover)) (if (is In (id "Bishop" Mover) (values Remembered "CapturedPieces")) (move Promote (last To) (piece {"Bishop"}) Mover))}) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (if (= 19 (counter)) (and (forEach Player (forEach Site (sites Occupied by:Player) (if (= (what at:(site)) (id "Pawn" Player)) (addScore Player 1) (if (= (what at:(site)) (id "Rook" Player)) (addScore Player 5) (if (= (what at:(site)) (id "Queen" Player)) (addScore Player 9) (if (!= (what at:(site)) (id "King" Player)) (addScore Player 3))))))) (set Var "NoEnoughCapture" 1)))))) (end {(if (and (is Threatened (id "King" Next)) (not (can Move (do (forEach Piece Next) ifAfterwards:(not (is Threatened (id "King" Next))))))) (result Mover Win)) (if (no Moves Mover) (result Mover Draw)) (if (= (var "NoEnoughCapture") 1) (byScore))})))
12x12 board, with yellow and green squares, with four 4x4 extensions overlapping the 2x2 squares in each corner of the board. There are two walls next to each fortress, one on the outer side of the bottom two squares of the left hand side of each fortress and one on the top edge of the two top left squares. Pieces cannot move across the wall or diagonally across the end of the wall. Four players, white and red play as a team, and black and blue as a team. Players are are arranged as follows, clockwise from the top: red, blue, white, black. Each team has the usual complement of Chess pieces, with an extra Knight, Rook, and Bishop, The pieces are as in chess, with the Kings on the players' right, on the central eight squares of each side of the board. The three extra pieces begin in the 4x4 extension at the player's right, placed anywhere they please. Kings move one square orthogonally or diagonally; Queens move any distance orthogonally or diagonally; Bishops move any distance diagonally; Knights move orthogonally one square and then diagonally another square or diagonally one square and then orthogonally one square (this is important for calculating moves near walls), jumping over any intervening pieces; Rooks move orthogonally any distance; Pawns move forward one space orthogonally, or diagonally one space forward to capture. Pawns may move two spaces on their first turn. When a pawn reaches the back row of one of the other players' sides, it is promoted to any piece. When a player moves a piece onto a space occupied by an opponent's piece, the opponent's piece is captured. When a King can be captured on the next turn, it is in check. The King must not be in check at the end of the player's next turn. If this is impossible, it is checkmate and that player's pieces are removed from the game. The team who checkmates both of their opponents wins.
(game "Russian Fortress Chess" (players {(player S) (player W) (player N) (player E)}) (equipment {(board (merge {(square 4) (shift 2 2 (square 12)) (shift 12 0 (square 4)) (shift 0 12 (square 4)) (shift 12 12 (square 4))})) (piece "Disc" Shared) (piece "King" Each (if (is Active (who at:(from))) (or (move Step Orthogonal (to if:(and (not (is Friend (who at:(to)))) (all Sites (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))) if:(is Empty Edge (site)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Step Diagonal (to if:(and (not (is Friend (who at:(to)))) (all Sites (intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(to))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))) (apply (if (is Enemy (who at:(to))) (remove (to))))))))) (piece "Queen" Each (if (is Active (who at:(from))) (or (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(all Sites (sites Between (directions Cell from:(from) to:(to)) from:(from) fromIncluded:True to:(to)) if:(not (not (all Sites (intersection (sites Incident Edge of:Cell at:(site)) (sites Incident Edge of:Cell at:(ahead (site) (directions Cell from:(from) to:(to))))) if:(is Empty Edge (site)))))) (if (is Enemy (who at:(to))) (remove (to)))))) (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply if:(all Sites (sites Between (directions Cell from:(from) to:(to)) from:(from) fromIncluded:True to:(to)) if:(not (not (all Sites (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(ahead (site) (directions Cell from:(from) to:(to))))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))))) (if (is Enemy (who at:(to))) (remove (to))))))))) (piece "Knight" Each (if (is Active (who at:(from))) (move (from (from)) (to (union (intersection (sites Around (forEach (sites Around (from) Diagonal) if:(all Sites (intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(site))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))) Orthogonal if:(and (all Sites (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))) if:(is Empty Edge (site))) (not (is Friend (who at:(to)))))) (sites Distance Orthogonal from:(from) (exact 3))) (intersection (sites Around (forEach (sites Around (from) Orthogonal) if:(all Sites (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(site))) if:(is Empty Edge (site)))) Diagonal if:(and (all Sites (intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(to))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site)))) (not (is Friend (who at:(to)))))) (sites Distance Orthogonal from:(from) (exact 3)))) (apply if:(is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop" Each (if (is Active (who at:(from))) (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply if:(all Sites (sites Between (directions Cell from:(from) to:(to)) from:(from) fromIncluded:True to:(to)) if:(not (not (all Sites (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(ahead (site) (directions Cell from:(from) to:(to))))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))))) (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Rook" Each (if (is Active (who at:(from))) (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(all Sites (sites Between (directions Cell from:(from) to:(to)) from:(from) fromIncluded:True to:(to)) if:(not (not (all Sites (intersection (sites Incident Edge of:Cell at:(site)) (sites Incident Edge of:Cell at:(ahead (site) (directions Cell from:(from) to:(to))))) if:(is Empty Edge (site)))))) (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Pawn" Each (if (is Active (who at:(from))) (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(and (is Empty (to)) (all Sites (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))) if:(is Empty Edge (site)))))) (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (all Sites (intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(to))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain)))))) (hand Each size:3) (regions "ExtraSquare" P1 (expand origin:181 steps:3)) (regions "ExtraSquare" P2 (expand origin:191 steps:3)) (regions "ExtraSquare" P3 (expand origin:174 steps:3)) (regions "ExtraSquare" P4 (expand origin:0 steps:3)) (regions "Promotion" P1 (union (sites {"E3" "F3" "G3" "H3" "I3" "J3" "K3" "L3"}) (sites Bottom))) (regions "Promotion" P2 (union (sites {"C5" "C6" "C7" "C8" "C9" "C10" "C11" "C12"}) (sites Left))) (regions "Promotion" P3 (union (sites {"E14" "F14" "G14" "H14" "I14" "J14" "K14" "L14"}) (sites Top))) (regions "Promotion" P4 (union (sites {"N5" "N6" "N7" "N8" "N9" "N10" "N11" "N12"}) (sites Right)))}) (rules (start {(place "Disc" Edge (sites {26 35 278 279 300 325 88 89 36 37 391 382 353 344 396 397})) (set Team 1 {P1 P3}) (set Team 2 {P2 P4}) (place "King1" coord:"H14") (place "King2" coord:"N9") (place "King3" coord:"I3") (place "King4" coord:"C8") (place "Queen1" coord:"I14") (place "Queen2" coord:"N8") (place "Queen3" coord:"H3") (place "Queen4" coord:"C9") (place "Bishop1" (sites {"G14" "J14"})) (place "Bishop2" (sites {"N7" "N10"})) (place "Bishop3" (sites {"G3" "J3"})) (place "Bishop4" (sites {"C10" "C7"})) (place "Knight1" (sites {"F14" "K14"})) (place "Knight2" (sites {"N6" "N11"})) (place "Knight3" (sites {"F3" "K3"})) (place "Knight4" (sites {"C11" "C6"})) (place "Rook1" (sites {"E14" "L14"})) (place "Rook2" (sites {"N5" "N12"})) (place "Rook3" (sites {"E3" "L3"})) (place "Rook4" (sites {"C12" "C5"})) (place "Pawn1" (sites {"E13" "F13" "G13" "H13" "I13" "J13" "K13" "L13"})) (place "Pawn2" (sites {"M5" "M6" "M7" "M8" "M9" "M10" "M11" "M12"})) (place "Pawn3" (sites {"E4" "F4" "G4" "H4" "I4" "J4" "K4" "L4"})) (place "Pawn4" (sites {"D5" "D6" "D7" "D8" "D9" "D10" "D11" "D12"})) (place "Bishop1" (handSite P1)) (place "Bishop2" (handSite P2)) (place "Bishop3" (handSite P3)) (place "Bishop4" (handSite P4)) (place "Knight1" (handSite P1 1)) (place "Knight2" (handSite P2 1)) (place "Knight3" (handSite P3 1)) (place "Knight4" (handSite P4 1)) (place "Rook1" (handSite P1 2)) (place "Rook2" (handSite P2 2)) (place "Rook3" (handSite P3 2)) (place "Rook4" (handSite P4 2))}) phases:{(phase "Placing" (play (forEach Site (sites Hand Mover) (if (is Occupied (site)) (move (from (site)) (to (intersection (sites Empty) (sites Mover "ExtraSquare"))))))) (nextPhase Mover (no Pieces Mover in:(sites Hand Mover)) "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (and {(if (and (is Active P1) (not (is Mover P1))) (if (and (is Threatened (id "King" P1)) (not (can Move (do (and (forEach Piece P1) (set NextPlayer (player 1))) ifAfterwards:(not (is Threatened (id "King" P1))))))) (remove (where (id "King" P1))))) (if (and (is Active P2) (not (is Mover P2))) (if (and (is Threatened (id "King" P2)) (not (can Move (do (and (forEach Piece P2) (set NextPlayer (player 2))) ifAfterwards:(not (is Threatened (id "King" P2))))))) (remove (where (id "King" P2))))) (if (and (is Active P3) (not (is Mover P3))) (if (and (is Threatened (id "King" P3)) (not (can Move (do (and (forEach Piece P3) (set NextPlayer (player 3))) ifAfterwards:(not (is Threatened (id "King" P3))))))) (remove (where (id "King" P3))))) (if (and (is Active P4) (not (is Mover P4))) (if (and (is Threatened (id "King" P4)) (not (can Move (do (and (forEach Piece P4) (set NextPlayer (player 4))) ifAfterwards:(not (is Threatened (id "King" P4))))))) (remove (where (id "King" P4)))))})))))} (end {(forEach NonMover if:(= (where "King" Player) -1) (result Player Loss)) (if (and {(not (is Active P1)) (not (is Active P3)) (is Active P2)}) (result P2 Win)) (if (and {(not (is Active P1)) (not (is Active P3)) (is Active P4)}) (result P4 Win)) (if (and {(not (is Active P2)) (not (is Active P4)) (is Active P1)}) (result P1 Win)) (if (and {(not (is Active P2)) (not (is Active P4)) (is Active P3)}) (result P3 Win))})))
###Description 12x12 board, with yellow and green squares, with four 4x4 extensions overlapping the 2x2 squares in each corner of the board. There are two walls next to each fortress, one on the outer side of the bottom two squares of the left hand side of each fortress and one on the top edge of the two top left squares. Pieces cannot move across the wall or diagonally across the end of the wall. Four players, white and red play as a team, and black and blue as a team. Players are are arranged as follows, clockwise from the top: red, blue, white, black. Each team has the usual complement of Chess pieces, with an extra Knight, Rook, and Bishop, The pieces are as in chess, with the Kings on the players' right, on the central eight squares of each side of the board. The three extra pieces begin in the 4x4 extension at the player's right, placed anywhere they please. Kings move one square orthogonally or diagonally; Queens move any distance orthogonally or diagonally; Bishops move any distance diagonally; Knights move orthogonally one square and then diagonally another square or diagonally one square and then orthogonally one square (this is important for calculating moves near walls), jumping over any intervening pieces; Rooks move orthogonally any distance; Pawns move forward one space orthogonally, or diagonally one space forward to capture. Pawns may move two spaces on their first turn. When a pawn reaches the back row of one of the other players' sides, it is promoted to any piece. When a player moves a piece onto a space occupied by an opponent's piece, the opponent's piece is captured. When a King can be captured on the next turn, it is in check. The King must not be in check at the end of the player's next turn. If this is impossible, it is checkmate and that player's pieces are removed from the game. The team who checkmates both of their opponents wins. ###Ludii (game "Russian Fortress Chess" (players {(player S) (player W) (player N) (player E)}) (equipment {(board (merge {(square 4) (shift 2 2 (square 12)) (shift 12 0 (square 4)) (shift 0 12 (square 4)) (shift 12 12 (square 4))})) (piece "Disc" Shared) (piece "King" Each (if (is Active (who at:(from))) (or (move Step Orthogonal (to if:(and (not (is Friend (who at:(to)))) (all Sites (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))) if:(is Empty Edge (site)))) (apply (if (is Enemy (who at:(to))) (remove (to)))))) (move Step Diagonal (to if:(and (not (is Friend (who at:(to)))) (all Sites (intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(to))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))) (apply (if (is Enemy (who at:(to))) (remove (to))))))))) (piece "Queen" Each (if (is Active (who at:(from))) (or (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(all Sites (sites Between (directions Cell from:(from) to:(to)) from:(from) fromIncluded:True to:(to)) if:(not (not (all Sites (intersection (sites Incident Edge of:Cell at:(site)) (sites Incident Edge of:Cell at:(ahead (site) (directions Cell from:(from) to:(to))))) if:(is Empty Edge (site)))))) (if (is Enemy (who at:(to))) (remove (to)))))) (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply if:(all Sites (sites Between (directions Cell from:(from) to:(to)) from:(from) fromIncluded:True to:(to)) if:(not (not (all Sites (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(ahead (site) (directions Cell from:(from) to:(to))))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))))) (if (is Enemy (who at:(to))) (remove (to))))))))) (piece "Knight" Each (if (is Active (who at:(from))) (move (from (from)) (to (union (intersection (sites Around (forEach (sites Around (from) Diagonal) if:(all Sites (intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(site))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))) Orthogonal if:(and (all Sites (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))) if:(is Empty Edge (site))) (not (is Friend (who at:(to)))))) (sites Distance Orthogonal from:(from) (exact 3))) (intersection (sites Around (forEach (sites Around (from) Orthogonal) if:(all Sites (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(site))) if:(is Empty Edge (site)))) Diagonal if:(and (all Sites (intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(to))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site)))) (not (is Friend (who at:(to)))))) (sites Distance Orthogonal from:(from) (exact 3)))) (apply if:(is Enemy (who at:(to))) (remove (to))))))) (piece "Bishop" Each (if (is Active (who at:(from))) (move Slide Diagonal (to if:(is Enemy (who at:(to))) (apply if:(all Sites (sites Between (directions Cell from:(from) to:(to)) from:(from) fromIncluded:True to:(to)) if:(not (not (all Sites (intersection (sites Incident Vertex of:Cell at:(site)) (sites Incident Vertex of:Cell at:(ahead (site) (directions Cell from:(from) to:(to))))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))))) (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Rook" Each (if (is Active (who at:(from))) (move Slide Orthogonal (to if:(is Enemy (who at:(to))) (apply if:(all Sites (sites Between (directions Cell from:(from) to:(to)) from:(from) fromIncluded:True to:(to)) if:(not (not (all Sites (intersection (sites Incident Edge of:Cell at:(site)) (sites Incident Edge of:Cell at:(ahead (site) (directions Cell from:(from) to:(to))))) if:(is Empty Edge (site)))))) (if (is Enemy (who at:(to))) (remove (to)))))))) (piece "Pawn" Each (if (is Active (who at:(from))) (or {(if (is In (from) (sites Start (piece (what at:(from))))) (move Slide Forward (between (exact 2) if:(is Empty (between))) (to if:(is Empty (to))))) (move Step Forward (to if:(and (is Empty (to)) (all Sites (intersection (sites Incident Edge of:Cell at:(from)) (sites Incident Edge of:Cell at:(to))) if:(is Empty Edge (site)))))) (move Step (directions {FR FL}) (to if:(and (is Enemy (who at:(to))) (all Sites (intersection (sites Incident Vertex of:Cell at:(from)) (sites Incident Vertex of:Cell at:(to))) if:(all Sites (sites Incident Edge of:Vertex at:(site)) if:(is Empty Edge (site))))) (apply (remove (to)))))} (then (if (is In (last To) (sites Mover "Promotion")) (moveAgain)))))) (hand Each size:3) (regions "ExtraSquare" P1 (expand origin:181 steps:3)) (regions "ExtraSquare" P2 (expand origin:191 steps:3)) (regions "ExtraSquare" P3 (expand origin:174 steps:3)) (regions "ExtraSquare" P4 (expand origin:0 steps:3)) (regions "Promotion" P1 (union (sites {"E3" "F3" "G3" "H3" "I3" "J3" "K3" "L3"}) (sites Bottom))) (regions "Promotion" P2 (union (sites {"C5" "C6" "C7" "C8" "C9" "C10" "C11" "C12"}) (sites Left))) (regions "Promotion" P3 (union (sites {"E14" "F14" "G14" "H14" "I14" "J14" "K14" "L14"}) (sites Top))) (regions "Promotion" P4 (union (sites {"N5" "N6" "N7" "N8" "N9" "N10" "N11" "N12"}) (sites Right)))}) (rules (start {(place "Disc" Edge (sites {26 35 278 279 300 325 88 89 36 37 391 382 353 344 396 397})) (set Team 1 {P1 P3}) (set Team 2 {P2 P4}) (place "King1" coord:"H14") (place "King2" coord:"N9") (place "King3" coord:"I3") (place "King4" coord:"C8") (place "Queen1" coord:"I14") (place "Queen2" coord:"N8") (place "Queen3" coord:"H3") (place "Queen4" coord:"C9") (place "Bishop1" (sites {"G14" "J14"})) (place "Bishop2" (sites {"N7" "N10"})) (place "Bishop3" (sites {"G3" "J3"})) (place "Bishop4" (sites {"C10" "C7"})) (place "Knight1" (sites {"F14" "K14"})) (place "Knight2" (sites {"N6" "N11"})) (place "Knight3" (sites {"F3" "K3"})) (place "Knight4" (sites {"C11" "C6"})) (place "Rook1" (sites {"E14" "L14"})) (place "Rook2" (sites {"N5" "N12"})) (place "Rook3" (sites {"E3" "L3"})) (place "Rook4" (sites {"C12" "C5"})) (place "Pawn1" (sites {"E13" "F13" "G13" "H13" "I13" "J13" "K13" "L13"})) (place "Pawn2" (sites {"M5" "M6" "M7" "M8" "M9" "M10" "M11" "M12"})) (place "Pawn3" (sites {"E4" "F4" "G4" "H4" "I4" "J4" "K4" "L4"})) (place "Pawn4" (sites {"D5" "D6" "D7" "D8" "D9" "D10" "D11" "D12"})) (place "Bishop1" (handSite P1)) (place "Bishop2" (handSite P2)) (place "Bishop3" (handSite P3)) (place "Bishop4" (handSite P4)) (place "Knight1" (handSite P1 1)) (place "Knight2" (handSite P2 1)) (place "Knight3" (handSite P3 1)) (place "Knight4" (handSite P4 1)) (place "Rook1" (handSite P1 2)) (place "Rook2" (handSite P2 2)) (place "Rook3" (handSite P3 2)) (place "Rook4" (handSite P4 2))}) phases:{(phase "Placing" (play (forEach Site (sites Hand Mover) (if (is Occupied (site)) (move (from (site)) (to (intersection (sites Empty) (sites Mover "ExtraSquare"))))))) (nextPhase Mover (no Pieces Mover in:(sites Hand Mover)) "Playing")) (phase "Playing" (play (if (is Prev Mover) (move Promote (last To) (piece {"Queen" "Knight" "Bishop" "Rook"}) Mover) (do (forEach Piece) ifAfterwards:(not (is Threatened (id "King" Mover)))) (then (and {(if (and (is Active P1) (not (is Mover P1))) (if (and (is Threatened (id "King" P1)) (not (can Move (do (and (forEach Piece P1) (set NextPlayer (player 1))) ifAfterwards:(not (is Threatened (id "King" P1))))))) (remove (where (id "King" P1))))) (if (and (is Active P2) (not (is Mover P2))) (if (and (is Threatened (id "King" P2)) (not (can Move (do (and (forEach Piece P2) (set NextPlayer (player 2))) ifAfterwards:(not (is Threatened (id "King" P2))))))) (remove (where (id "King" P2))))) (if (and (is Active P3) (not (is Mover P3))) (if (and (is Threatened (id "King" P3)) (not (can Move (do (and (forEach Piece P3) (set NextPlayer (player 3))) ifAfterwards:(not (is Threatened (id "King" P3))))))) (remove (where (id "King" P3))))) (if (and (is Active P4) (not (is Mover P4))) (if (and (is Threatened (id "King" P4)) (not (can Move (do (and (forEach Piece P4) (set NextPlayer (player 4))) ifAfterwards:(not (is Threatened (id "King" P4))))))) (remove (where (id "King" P4)))))})))))} (end {(forEach NonMover if:(= (where "King" Player) -1) (result Player Loss)) (if (and {(not (is Active P1)) (not (is Active P3)) (is Active P2)}) (result P2 Win)) (if (and {(not (is Active P1)) (not (is Active P3)) (is Active P4)}) (result P4 Win)) (if (and {(not (is Active P2)) (not (is Active P4)) (is Active P1)}) (result P1 Win)) (if (and {(not (is Active P2)) (not (is Active P4)) (is Active P3)}) (result P3 Win))})))