Skip to content

A fun two-player dice game where players compete to score 100 points first. Roll the dice to accumulate points, but rolling a 1 resets your roll score! Use "Hold" to save your score and pass the turn. Fully responsive and easy to play.

Notifications You must be signed in to change notification settings

Hamzabaloch08/roll-a-dice-game-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roll-a-dice-game-application

A simple, fun, and interactive dice game built using HTML, CSS, and JavaScript. Two players compete to reach a score of 100 points first.


Features

  • Player Turn Indicator: Highlights the active player during their turn.
  • Score Reset: Resets the game for a fresh start.
  • Dynamic Dice Rolls: Displays random dice rolls visually.
  • Winning Condition: Declares a winner when a player reaches 100 points.
  • Responsive Design: Works well on different screen sizes.

Game Rules

  1. Each player rolls the dice during their turn.
  2. The dice number adds to the player's "Current Score."
  3. Special Rule:
    • If a player rolls a 1, their "Current Score" resets to 0, and the turn switches to the other player.
  4. Players can choose to Hold their score:
    • The "Current Score" gets added to their "Total Score."
    • The turn switches to the other player.
  5. The first player to reach 100 points wins the game.

How to Play

  1. Click on the "Roll Dice" button to roll the dice.
  2. Watch the dice result and the score update.
  3. Decide to:
    • Roll again: Add to your current score, but risk losing it all if you roll a 1.
    • Hold: Save your current score to your total and pass the turn to the other player.
  4. Reach 100 points to win!

Technology Stack

  • HTML: Game structure and layout.
  • CSS: Styling and responsive design.
  • JavaScript: Game logic and interactivity.

Responsive Design

This game adapts to different screen sizes using media queries, ensuring a smooth experience on desktops, tablets, and mobile devices.

About

A fun two-player dice game where players compete to score 100 points first. Roll the dice to accumulate points, but rolling a 1 resets your roll score! Use "Hold" to save your score and pass the turn. Fully responsive and easy to play.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published