Git Product home page Git Product logo

threes's Introduction

web threes

A smart-contract based web3 dice game

Built with:

Check out the game at webthrees.herokuapp.com

Deployed Contract Address

Sepolia Testnet 0x7838074626470180F23FA88221D1C4e8E0588bf5

Rules

  • This is a turn based game
  • Lowest score at the end of the game wins
  • Each player will start their turn with 5 dice
  • Player will roll the dice up to 5 times
  • After each roll, the player must pick up at least 1 die but may pick up more if they choose
  • Player will continue to roll and pick up dice until all dice have been taken
  • When chosen, each die adds its face value to the current players score, except 3, 3 adds 0 to the score

Features

  • Connect Ethereum wallet
  • Smart-contract interactions
  • Real time multiplayer dice game
  • Real time chat
  • Chat & game audio
  • Create new rooms
  • Join previously created rooms
  • Choose between public or private(password protected) rooms

Learnings

  • Building a web app with React using modern hooks and functional components

  • Connecting the client and server through a web socket and use this connection to communicate between clients. The use of namespaces as they relate to sockets, and how to create, join, and communicate with rooms within each namespace.

  • Improve working knowledge of hooks and the context API from React. All state management was done with hooks and the context API.

  • Smart-contract creation, deployment, & interaction with Solidity and Ethers.js

threes's People

Contributors

hone1er avatar

Stargazers

Kartik Mishra avatar Mikey avatar

Watchers

James Cloos avatar  avatar Mikey avatar

Forkers

ralphschuler

threes's Issues

Display the dice that the user selected in results

After finishing a round when playing solo, it feels like random dice are returned to the score screen.
Instead, the user should see the dice that they selected before starting a new round

Ex: if the user selects 3, 3, 4, 1, 1, then after the game those exact numbers on dice should be returned to the screen before selecting reset

In a multiplayer game, you could display the winner's combination of dice.

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.