A simple, fun, and interactive dice game built using HTML, CSS, and JavaScript. Two players compete to reach a score of 100 points first.
- 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.
- Each player rolls the dice during their turn.
- The dice number adds to the player's "Current Score."
- Special Rule:
- If a player rolls a
1
, their "Current Score" resets to0
, and the turn switches to the other player.
- If a player rolls a
- Players can choose to Hold their score:
- The "Current Score" gets added to their "Total Score."
- The turn switches to the other player.
- The first player to reach 100 points wins the game.
- Click on the "Roll Dice" button to roll the dice.
- Watch the dice result and the score update.
- 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.
- Roll again: Add to your current score, but risk losing it all if you roll a
- Reach 100 points to win!
- HTML: Game structure and layout.
- CSS: Styling and responsive design.
- JavaScript: Game logic and interactivity.
This game adapts to different screen sizes using media queries, ensuring a smooth experience on desktops, tablets, and mobile devices.