(define "NextSiteFrom" ("NextSiteOnTrack" #2 from:#1))
(define "EnterPieces"
(if (is Occupied (mapEntry "Bar" Mover))
(forEach Die
if:("DieNotUsed")
(move
(from (mapEntry "Bar" Mover))
(to
("NextSiteFrom" (mapEntry "Bar" Mover) (pips))
if:(< (size Stack at:(to)) 2)
("HittingCapture" (mapEntry "Bar" Next))
)
)
(then ("ReplayNotAllDiceUsed"))
)
)
)
(define "AllPiecesInFinalQuadrant" ("AllOwnedPiecesIn" (sites Mover "FinalQuadrant")))
//------------------------------------------------------------------------------
(game "Nard"
(players 2)
(equipment {
("BackgammonBoard" ("BackgammonTracksWithBar" End))
(dice d:6 num:2)
(map "Bar" {(pair P1 6) (pair P2 19)})
(regions "FinalQuadrant" P1 (sites {20..25}))
(regions "FinalQuadrant" P2 (sites {7..12}))
(piece "Disc" Each
(forEach Die
if:("DieNotUsed")
(if ("IsEndTrack" ("NextSiteFrom" (from) (pips)))
(if ("AllPiecesInFinalQuadrant")
(move Remove (from))
)
(move
(from (from))
(to
("NextSiteFrom" (from) (pips))
if:("NoEnemyOrOnlyOne" (to))
("HittingCapture" (mapEntry "Bar" Next))
)
)
)
(then ("ReplayNotAllDiceUsed"))
)
)
})
(rules
(start {
(place Stack "Disc1" 7 count:5) (place Stack "Disc1" 4 count:3)
(place Stack "Disc1" 13 count:5) (place Stack "Disc1" 25 count:2)
(place Stack "Disc2" 20 count:5) (place Stack "Disc2" 17 count:3)
(place Stack "Disc2" 0 count:5) (place Stack "Disc2" 12 count:2)
})
(play
("RollEachNewTurnMove"
(priority {
("EnterPieces")
(if (is Empty (mapEntry "Bar" Mover)) (max Distance (forEach Piece top:True)))
})
(then
(if (no Pieces Mover)
(if (no Pieces Enemy in:(sites Mover "FinalQuadrant")) (addScore Mover 1) (addScore Mover 2))
)
)
)
)
(end ("EscapeWin"))
)
)
//------------------------------------------------------------------------------
(metadata
(info
{
(description "Nard is a race game from Persia, documented since at least 600 CE. It is thought to be an ancestor to Backgammon and other games, like Japanese Ban-Sugoroku.")
(rules "The game is played on a board with twelve points on either side. The points form a continuous track in a horseshoe shape; each player progresses in opposite directions (one from their bottom right to the top right, the other from their bottom left to their top left). Each player has 15 pieces. The starting position is as such, numbering the points from the origin of each player's track: Point six: five pieces. Point 8: three pieces. Point 13: five pieces. Point 24: two pieces. Players move according to the number on each die by moving one piece the number on one die and another the number on the other die, or by moving one piece twice (once for each die). Players cannot end their move on a point with multiple opposing pieces. If a player ends the turn on a point with one opposing piece, that piece is placed in the middle of the board (not on a point) and must reenter the board according to the next die roll, counting the origin point as a move of one. They cannot reenter on a point with two or more pieces. No other pieces can move until all of the pieces belonging to that player are removed from the center. When all of a player's pieces are on their final 6 points, they may start removing pieces from the board. They can do so by rolling a 6 to move from the 6th point, and so on down to 1. Players must use all available moves presented by the dice. The first player to remove all of their pieces wins. The winner gains one point, or two points if the opponent has pieces in their starting quadrant.
")
(source "Himly 1879: 679-681.")
(id "149")
(version "1.3.12")
(classification "board/race/escape")
(credit "Eric Piette")
(origin "This game was played in Persia, around 1879.")
}
)
(graphics {
(board Style backgammon)
(stackType Backgammon)
})
)