GithubHelp home page GithubHelp logo

nitin-pandita / dice-game Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 216 KB

A simple dice game build using React js

Home Page: https://dice-game-pi-six.vercel.app/

JavaScript 92.53% HTML 4.61% CSS 2.85%
beginner-project dice-game friendly reactjs vitejs good-first-issue beginner-friendly

dice-game's Introduction

Dice-Game

Table of Contents

How to Install

  • First step is to open a fresh CMD
  • Next, navigate to a location in the CMD to save the code to
  • After finding the location, go to the GitHub home page
  • Search for the green “Code” button and click on it
  • Copy the URL from the HTTPS section
  • Return back to the CMD
  • Type “git clone ” where the URL is the previously copied one
  • Now, cd into that newly cloned directory
  • In the directory, type “npm i” to install the dependencies
  • This will create a “nodes_module” folder in the overarching directory
  • Wait for that to finish installing
  • Type “npm run dev” to start it in dev mode
  • When that finishes loading, control + left click on the local url that is displayed to open the localhost
  • This will open up the game on its own page

How to Play

  • First step is to press the “Play Now” button on the start screen
  • Now, you can choose a number 1-6 at the top to place your pick
  • In order to actually roll the dice, you must click on the dice image in the middle of the screen
  • If you are correct in your guess, the number you chose will be added to your total score
  • If you are incorrect in your guess, you will lose 2 points from your total score
  • Example:
    • If you select 5 and it lands on 5, you will gain 5 to your total score
    • If you select 5 again and it lands on 2, you will lose 2 from your total score (making the total score equal to 3)
  • For a further explanation of the rules, you can click the “Show Rules” button when the game loads
  • To reset the game and put your score at 0, you can click the “Reset” button

How to Contribute

  • Identify an issue or update that you would like to fix/add
  • Create a new branch in the repo (choose a name that is fitting for your contribution)
  • Add your code to this new branch with an explanation of the changes that were made
  • Submit a PR and have someone test your changes to ensure it works in order to have it pushed to “Main”

Start Screen

image

Gameplay

image

About

This is a simple dice game built using ReactJS.

dice-game's People

Contributors

brianhersh avatar nitin-pandita avatar roy404dev avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

dice-game's Issues

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.