Rock Paper Scissors
ETH Community Blockstars 2.0's Project 3 - Rock Paper Scissors
A smart contract named RockPaperScissors whereby:
- Alice and Bob play the classic rock paper scissors game.
- to enrol, each player needs to deposit the right Ether amount, possibly zero.
- to play, each player submits their unique move.
- the contract decides and rewards the winner with all Ether wagered.
- make it a utility whereby any 2 people can decide to play against each other.
- reduce gas costs as much as you can.
- let players bet their previous winnings.
- how can you entice players to play, knowing that they may have their funding stuck in the contract if they faced an uncooperative player?
How to Run the Project
- First clone this repo
git clone https://github.com/remedcu/RockPaperScissors.git
- For this and some other step, you need to have Truffle & other modules installed in your system. Enter the Remittance folder and please run:
npm install OR
- Now start the server using:
npm run-script build && npm start
- Now, in your browser, open http://127.0.0.1:8080 or the address shown to you in your console.
NOTE: If you are using
ganache-cli for blockchain, please disable MetaMask for checking this project in browser.
How to Test the Contract
Please follow the step 1 - 2 of How to Run the Project.
Now start the test using:
- This is a prototype, please don't use it unless you know what you are doing.
- A lot can be improved in this. Feedbacks are welcome.
- Don't forget to unlock ether wallet accounts when required.