Giter Site home page Giter Site logo

kenvilar / dice-game Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 364 KB

A simple dice game using pure JavaScript. See https://kv-dice-game.herokuapp.com/

JavaScript 54.87% CSS 30.04% PHP 15.09%
dom dom-manipulation event-handling javascript eventlistener

dice-game's Introduction

dice-game

A dice game using pure JavaScript

Rules

  • Two players are needed
  • A player rolls a dice in each turn as many times as he/she whishes. Each result gets added to his/her current rolled score
  • If the player rolls a 1, all his/her current rolled scores will get lost and no results will be added to the main score. After that, it's the next player's turn
  • The player can select to 'Hold', which means that his/her current rolled score gets added to his/her main score. After that, it's the next player's turn
  • Any player who will reach 100 points and above on his/her main score wins the game!

Another rules

  • If the player rolls the two dices and one of them is equal to 1, all his/her current rolled scores will get lost and no results will be added to the main score. After that, it's the next player's turn
  • The player looses his/her rolled scores if one of your two dices (or both of them) rolled two 6 in a row. Then it's the next player's turn
  • The players can input a final score (optional) in a text field if they want a score of their own and not the default score, 100

GOOD LUCK! :)

dice-game's People

Contributors

kenvilar avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tcbuddy neihana-g

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.