Rock Paper Scissors DApp game.
Smart contracts are written in Solidity.
Smart contracts are compiled and deployed to a private Ganache blockchain using Truffle framework (solc, web3).
Mocha framework is used for testing contracts.
App frontend is implemented using the Drizzle library included in Truffle.
App relies on React/Redux Store, synchronized with smart contract via web3 provider.
The game is designed for two participants.
Each participant opens the game in their own browser.
Players agree on who is Player A and who is B, and begin to take turns playing.
The first player's bet is stored in the blockchain, and after the second player makes a bet, game result is displayed.
This game implementation can be improved by encrypting the first player's bet.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install lts/dubnium
npm install -g yarn
yarn global add truffle
yarn global add ganache-cli
ganache-cli --host 0.0.0.0
truffle compile
truffle test
truffle migrate
cd app
yarn
yarn start