Giter VIP home page Giter VIP logo

ethereum-rock-paper-scissors's Introduction

Ethereum-Rock-Paper-Scissors

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

  1. 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.
  2. The user then selects a choice (Rock/Paper/Scissors) and enters a private keyphrase, to lock their choice.
  3. 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.
  4. 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

ethereum-rock-paper-scissors's People

Contributors

skmanish avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.