Website | https://starkludo.com |
Documentation | https://book.starkludo.com |
StarkLudo is a classic board game enjoyed by people of all ages. It’s a game of chance and strategy, where players race their game pieces around the board to be the first to reach the finish spot.
At the start of the game, all players are assigned 4 pieces each. The goal is to move all four pieces to the finish spot through a specific route on the board. Each piece is moved one at a time. Each player takes turn rolling a die, and the output of rolling the die determines how many steps forward a piece can move. The first player that moves all their 4 pieces to the finish spot is declared the winner.
The game can be played by either 2, 3 or four people. In each game, there can only be one loser. For example, if the game is played by 4 people, the first 3 players to reach the finish spot are the winners. The player that reaches first gets the first position, the player that reaches second gets the second position, and the third gets the third position.
Steps to build and run StarkLudo locally
Ensure you have the prerequisites installed before proceeding. Check here for guide on how to install the prerequisites.
npm install -g pnpm
# Install dojoup
curl -L https://install.dojoengine.org | bash
dojoup --version v1.0.0-alpha.13
### Build and run StarkLudo
#### Client
```bash
# Navigate to the client directory
cd client
# Install dependencies
pnpm i
# Run
pnpm dev
Requires 2 terminals to run
In both terminals, ensure you are in the
onchain
directory. You can navigate into theonchain
directory by running this command from the root directory:cd onchain
Terminal 1
# Start Katana
katana --disable-fee --allowed-origins "*"
Terminal 2
# Build contracts
sozo build
sozo migrate apply
torii --world
> To locate the world address, scan through the output generated from running `sozo migrate apply`, locate the line similar to: <img width="662" alt="image" src="https://github.com/user-attachments/assets/3b84a16e-10f2-4531-83c1-252838f18226">
### Run contract tests
Use the following command to run the tests for StarkLudo contracts
```bash
# Navigate to the contracts directory
cd onchain
# Run tests
sozo test
If you want to run a specific test by the test name, use this command:
sozo test -f test_contract_deployment
test_contract_deployment
above is the name of the specific function being testedFor more information about testing, check Dojo book
This project is licensed under the MIT License. See License for more information
For more info and guidance on contributing, join the contributors Telegram group: https://t.me/+hnjQooODZOA2M2Rk