Giter Club home page Giter Club logo

solgame's Introduction

How to play :

  1. Go to Remix which is an online IDE designed for Solidity.
  2. Copy the source code from RockPaperScissors.sol, locate it under the browser folder.
  3. Compile the code by clicking "Start to compile" button under "Compile" tab on the right pane.
  4. Navigate to "Run" tab, choose JavaScript VM environment.
  5. Press the deploy button in order to deploy the contract.
  6. You will now see a contract under "Deployed Contracts" section.
  7. Then choose any account from "Account" drop-down list. This account will be the player 1 for the game.
  8. 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.
  9. Change account and join the game, this will be player 2.
  10. Now press "makeChoice" button to make a choice. A valid choice will be one of "R", "P", "S".
  11. Repeat again with the player 2 account.
  12. 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).
  13. Once the outcome of the game is disclosed, you will gain/lose 1 ether unless you draw.

solgame's People

Contributors

twinjax avatar

Watchers

 avatar  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.