How to play :
- Go to Remix which is an online IDE designed for Solidity.
- Copy the source code from RockPaperScissors.sol, locate it under the browser folder.
- Compile the code by clicking "Start to compile" button under "Compile" tab on the right pane.
- Navigate to "Run" tab, choose JavaScript VM environment.
- Press the deploy button in order to deploy the contract.
- You will now see a contract under "Deployed Contracts" section.
- Then choose any account from "Account" drop-down list. This account will be the player 1 for the game.
- After choosing a player, join the game by pressing the "join" button. Make sure you pay the stake of 1 ether. This can be done by typing '1' next to "Value" and choose "ether" in the drop-down menu.
- Change account and join the game, this will be player 2.
- Now press "makeChoice" button to make a choice. A valid choice will be one of "R", "P", "S".
- Repeat again with the player 2 account.
- When you want to finish the game you have to click on the disclose button to get the game result (and only can be done by a player).
- Once the outcome of the game is disclosed, you will gain/lose 1 ether unless you draw.