(define "NextCanNotMove" (not (can Move (do (forEach Piece Next) ifAfterwards:(not ("IsInCheck" "King_noCross" Next))))) ) //------------------------------------------------------------------------------ (game "Shodra" ("TwoPlayersNorthSouth") (equipment { (board (square 8)) (hand Each size:5) ("ChessKing" "King_noCross") ("ChessRook" "Rook") (piece "Camel" Each (move Hop Diagonal (between if:True) (to if:(or (is Empty (to)) ("IsEnemyAt" (to)) ) (apply (remove (to))) ) ) ) ("ChessKnight" "Knight") ("ChessPawn" "Pawn" (if (is In (from) (sites Start (piece (what at:(from))))) ("DoubleStepForwardToEmpty") ) (then ("PromoteIfReach" (sites Mover "Promotion") "Dog")) ) (piece "Dog" Each ("StepToNotFriend" Diagonal)) (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 ("IsInCheck" "King_noCross" Mover)) ) ) (end (if (and ("IsInCheck" "King_noCross" Next) ("NextCanNotMove") ) { (if (no Pieces Next "Pawn") (result Mover Win)) (if (!= (count Pieces Next "Pawn") 0) (result Mover Draw)) } ) ) ) ) //------------------------------------------------------------------------------ (metadata (info { (description "Shodra is a game related to others which are derived from Indian Chaturanga played by the Soyot people of eastern Russia. It involves the stipulation that to win, a player must capture all of the opponent's pawns.") (aliases {"Chodra" "Koul-Shodra"}) (rules "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.") (source "Murray 1913: 372.") (id "318") (version "1.3.12") (classification "board/war/replacement/checkmate/chaturanga") (credit "Eric Piette") (origin "This game was played in Russia, around 1913.") } ) (graphics { (piece Scale "Pawn" 0.825) (show Check "King_noCross") (board Style Chess) }) (ai "Shodra_ai" ) )