Coder Social home page Coder Social logo

angganurfaizal / rockfingerscissors Goto Github PK

View Code? Open in Web Editor NEW

This project forked from steezydev/rockfingerscissors

0.0 0.0 0.0 3.75 MB

RockFingerScissors is a decentralized application (dApp) built on the Binance Smart Chain Testnet that allows users to play a game of rock-paper-scissors against the smart contract. The smart contract for the game is written in Solidity and the front-end dApp is created with Next.js

Home Page: https://rock-finger-scissors-dapp.vercel.app

Shell 2.07% JavaScript 10.42% TypeScript 75.65% CSS 2.73% Solidity 9.13%

rockfingerscissors's Introduction

Solidity Next JS TypeScript TailwindCSS

RockFingerScissors

⚠️ Mobile version is not supported yet ⚠️

Todo

  • Working smart-contract
  • DApp design and functionality
  • Game history
  • Responsiveness

Overview

RockFingerScissors is a decentralized application (dApp) built on the Binance Smart Chain Testnet that allows users to play a game of rock-paper-scissors against the smart contract. The smart contract for the game is written in Solidity and the front-end dApp is created with Next.js.

Game is deployed to following networks:

  • BSC Testnet
  • Mantle Testnet
  • ConsenSys zkEVM Testnet

Game Concept

The concept of the game is no different from a simple rock-paper-scissors game (paper is replaces by finger). The user selects between rock, finger or scissors, and then calls the play(_choice) method in the smart contract, sending 0.001 TBNB as a default bet. The smart contract then randomly generates a number between 1 and 3, with 1 representing rock, 2 - finger and 3 - scissors. If the user's choice beats the randomly generated number, the user wins and receives double of the bet in return.

Rules

Rules are simple:

  • Rock > Scissors
  • Scissors > Finger
  • Finger > Rock

Getting Started

To play the game, the user needs to have a wallet that supports the Binance Smart Chain and has some TBNB (the native token of the Binance Smart Chain Testnet) in it. The user can then connect their wallet to the dApp and play the game.

Project Structure

The project is structured as a yarn monorepo

  • dapp - RockFingerScissors Next.js front-end dApp
  • contract - RockFingerScissors smart-contract built with Solidity

rockfingerscissors's People

Contributors

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