Rock paper scissors is a hand game usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. Based on the options chosed by participants, a winner is decided who gets a monetary or ad-hoc reward. The game is often used as a fair choosing method between two people similar to coin flipping (but not as random) In this work, we discuss the design and working of a decentralized version of the game using ethereum blockchain and smart contracts. Just like other popular dapps, it’s power lies in the transparency and incentivised model of smart contracts
Gameplay
- A user visits the game URL on Web 3.0 and registers to play the game. In order to register as a player in the game, he must confirm a payment of 5 ether to the contract.
- The user then selects a choice (Rock/Paper/Scissors) and enters a private keyphrase, to lock their choice.
- When two users are registered and have locked their choices, they claim their choices by entering the same choice and keyphrase they used while locking.
- When both users have claimed their choices, the winner gets a financial reward of 9.98 ethers. In case of a draw, both players receive 4.99 ethers each.
Demo Video : https://www.youtube.com/watch?v=t9GqZMbGugk
Detailed Report : https://www.doc.ic.ac.uk/~mks17/RPS_Report.pdf