Horse racing game implemented as a decentralized application.
The front end is built using React and Redux. The back-end is built on NodeJS. Communication between the front-end and the back-end is carried out using Socket.io. The game itself is implemented as a smart contract written in Solidity.
local environment setup
Make sure you have NodeJS installed.
In the repository folder run the following command:
npm run start
Open http://localhost:3000. Enter the provider credentials and click on "Connect".
- Players must place bets by selecting a race horse and an amount.
- No more than one bet per player is allowed in each race.
- Once the bet is placed, players get to choose when they are ready to race.
- Players may choose to race immediately or wait for others to join.
- When all players are ready, the race takes place and the winning race horse is announced.
- If one or more players had bet for the winning race horse, the jackpot will be distributed equally among them.
- If there are no winners, the jackpot is carried over to the next race.