- Rust (latest stable version) wasm-pack, install with:
cargo install wasm-pack- Build the WebAssembly module:
wasm-pack build --target web- Load files with a local web server:
python -m http.server 8000- Open browser:
http://localhost:8000- Board: 4 quadrants, each divided into 6 lines.
- Dice: 2 dice with values 1-6.
- Pieces: 30 checkers total - 15 white and 15 black.
- Top: Lines 13 with 2 black, line 24 with 3 black. Lines 15 and 19 with 2 white each, and lines 18 and 20 with 3 white each.
- Bottom: Lines 1 with 2 black, line 12 with 3 white. Lines 3 and 7 with 2 black each, and lines 6 and 8 with 3 black each.
Dice Rolling:
- To determine which player goes first, each player throws 1 dice and whoever scores higher goes first.
- The value on each dice is the number of lines each checker can move.
- White pieces move from board top right (13-18) to top left (19-24) to bottom left (12-7) to bottom right (6-1).
- Black pieces move from board bottom right (1-6) to bottom left (7-12) to top left (24-19) to top right (18-13).
Moves:
- When a player rolled x on 1st dice and y on 2nd dice, they may move one checker x spaces, and another checker y spaces.
- Or move one checker x spaces onto an open line, and then move that same checker another y spaces onto an open line.
- If only one move is possible and the other is not then the player must make that one move.
- If neither moves are possible, then the player skips their turn.
Occupancy:
- 6 checkers of a player can be present on a single line.
- If a line is occupied by 2 or more checkers of a player, the opponent is not allowed to land on it.
- If a single checker is present on a line, then it can be hit by an opponent's checker and removed off the board onto the center bar.
- Checkers can be hit onto the bar even inside home quadrant.
- Player with checkers on the bar must move them back into the game first.
- Checker on the bar lands onto the line equal to the number of one of the dice rolls, as long as that line is unoccupied or has exactly 1 opponent checker (which can be hit).
- The player may not move any other pieces, until all of the checkers on the bar have been reentered back into the game.
- 1st player with 15 checkers arrived in home quadrant.
- "Nard" or "Nardshir": The name derives from Persian "nard" (wooden block/checker) and "shir" (lion), possibly referring to the board's design or pieces.
- Literary: Appears in Persian poetry and literature.
- Religious: Zoroastrian texts mention the game, sometimes with symbolic interpretations.
- Crusades: European contact with the Middle East introduced the game to Europe.
- "Tables" Games: Became popular as "tables" or "tabula" in medieval Europe. Gradually evolved into modern backgammon with rule modifications.
- Continuity: Nard remains popular in Iran, Afghanistan, and Central Asia. Maintains game rules distinct from Western backgammon.
The board design reflects Zoroastrian cosmological & theological symbolism:
-
4 Quadrants: The board is divided into 4 quadrants, because there are 4 elements from which everything was created.
-
6 Lines per Quadrant: Each quadrant is divided into 6 lines, because first Ahura Mazda created 6 spirits (manifestations), or goddesses.
-
2 Dice: 2 separate dice are used, one to represent revolution of the firmament and one to represent the revolution of the constellations.
-
Opposite Movement: The checkers move in opposite direction from each other, since the white ones represent Ahura Mazda, the good god, who is opposed by Ahriman, the evil god, in all of his doings, represented by the black checkers.
Zoroastrian religion was born in the Avestan-speaking regions of the Iranian plateau, the Avestans being one of the many Iranian ethnicities. Basic prayer:
-
"Righteousness is best (of all that is) good. As desired, what is being desired is truth for him who (represents) best truth."
-
“Asha is virtuously maginificent, And joy upon joy is what Asha provides For thus is Asha Vahishta."
-
"Truth is best (of all that is) good. As desired, as desired, truth is for him who (represents) best truth."
-
"Holiness (Asha) is the best of all good: it is also happiness. Happy the man who is holy with perfect holiness!"
-
"Righteousness is the best good and it is happiness. Happiness is to her/him who is righteous for the sake of the best righteousness."
.
├── Cargo.toml # Rust project configuration
├── Cargo.lock # Dependency lock file
├── src/
│ └── lib.rs # Main game logic (Rust/WASM)
├── pkg/ # Generated WebAssembly package (created by wasm-pack)
│ ├── nard.js # JavaScript bindings
│ ├── nard_bg.wasm # WebAssembly binary
│ └── *.d.ts # TypeScript definitions
├── index.html # Web interface
├── style.css # Styling
├── index.js # JavaScript bindings and UI logic
└── README.md # This file