Giter Site home page Giter Site logo

soufighters / hot-potato Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mxgutierrez/hot-potato

0.0 0.0 0.0 3.33 MB

The classic game of Hot Potato, but this time the hot potato is an Ethereum non-fungible token (NFT).

JavaScript 82.57% CSS 1.46% HTML 2.52% Dockerfile 0.53% Solidity 12.91%

hot-potato's Introduction

Hot potato

The classic game of Hot Potato, but this time the hot potato is an Ethereum non-fungible token (NFT).

Contracts

Potato ERC20 (POT)

Currency used for game buy-ins. You can claim a 100 POT daily gift.

HotPotato ERC721 (HPT)

The undesired NFTs which, for some reason, nobody wants ๐Ÿคทโ€โ™‚๏ธ. Each HPT belongs to a single game, both having the same identifier (token ID == game ID).

HotPotatoGame

Stores game logic (create, join, start game, claim win, etc.).

The game

Each game can have up to 8 players, one of whom will get burned by the hot potato and get the loser award.

All game transactions are done through Metamask.

Game creation

The game starts when a leader player kicks off a game. Each game creation or join costs an entry worth 20 POT, so if you want to create a game, make sure you can afford it.

create

Joining game

Log in to your account, make sure you have 20 POT, and paste in the game ID previously sent to you by the leader player. Click join, approve transactions, and you are in.

join

Starting game

Once players have joined, the leader player will go ahead and click start game. This will start the game for all players. A randomly chosen player will be honored with starting off with the hot potato in hands.

start

Transfering hot potato

Most of the time, NFTs come as a benefit, but this is not the case. The one who has it gets the humiliation, so free yourself from it ASAP. Just click on the unfortunate player and send him a warm gift ๐Ÿ”ฅ after approving the transaction.

transfer

Game ending

The hot potato can burn someone at any time; once it does, the game ends and winners can claim the bounty of the loser's ticket worth of POT, split among the winners.

end-and-claim

hot-potato's People

Contributors

dependabot[bot] avatar mxgutierrez 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.