Giter Club home page Giter Club logo

dicegame's Introduction

Dice Game

Overview

Dice Game is a classic dice game where players compete to be the first to reach a target score, typically 100 points. Players take turns rolling a single die, accumulating points with each roll. However, players must be cautious, as rolling a one will result in losing all points accumulated during that turn. You can play the game Here

How to Play

  1. Setup: Decide who will go first. Each player starts with a score of 0.
  2. Taking Turns:
    • On your turn, roll a standard six-sided die.
    • If you roll a:
      • 1: Your turn ends immediately, and all points accumulated during that turn are lost. The dice is passed to the other player.
      • 2-6: Add the number rolled to your current turn total. You can choose to roll again or end your turn.
  3. Scoring:
    • If you end your turn voluntarily, your turn total is added to your overall score.
    • The first player to reach or exceed the target score (typically 100 points) wins the game!
    • If a player overshoots the target score, their score for that turn doesn't count, and they must try again on their next turn.

Rules

  • Players can choose to end their turn at any time to secure their points. However, ending a turn does not guarantee safety from rolling a one on the next turn.
  • If both players roll a one consecutively, the score remains unchanged, and the player who rolled the second one starts the next round.
  • The game can be played with two or more players, taking turns in a clockwise or counterclockwise direction.

Example Gameplay

  • Player 1: Rolls a 4, decides to roll again, rolls a 2, decides to roll again, rolls a 1. Turn ends, no points scored.
  • Player 2: Rolls a 3, decides to roll again, rolls a 6, decides to roll again, rolls a 5. Ends turn and scores 14 points.
  • Player 1: Rolls a 5, decides to roll again, rolls a 1. Turn ends, no points scored.
  • Player 2: Rolls doubles (5, 5), scores 10 points, and decides to roll again, rolls a 3, decides to end turn and scores 13 points.

dicegame's People

Contributors

imljs avatar

Watchers

 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.