/Dice-Game

An entertaining dice game.

Primary LanguageJavaScript

Dice-Game

Introduction

This is a fun-to-play dice game created using HTML, CSS, and JavaScript. The game's objective is to be the first player to reach 10 points to win.

Rules

  • Two players play the game.
  • Each player takes turns rolling a six-sided dice.
  • The number rolled on the dice represents the number of points earned for that turn.
  • If a player rolls a 1, they lose all their accumulated points for that turn and it becomes the next player's turn.
  • Players can choose to "Hold" their current points at any time during their turn. When a player holds, their accumulated points are added to their total score.
  • The first player to reach or exceed 10 points wins the game.
  • Once a player wins, the game will freeze, and by clicking on the New Game button the game will be reset and both players' scores will be set back to 0.

How to Play

1: Open the game in a web browser.
2: Player 1 starts by clicking the "Roll Dice" button to roll the dice.
3: The number rolled will be displayed as the current score for Player 1.
4: Player 1 can choose to either continue rolling for more points or hold their current score.
5: If Player 1 chooses to hold, their current score will be added to their total score.
6: It becomes Player 2's turn to repeat steps 2-5.
7: The game continues until a player reaches or exceeds 10 points.
8: The winning player's name will be displayed and the game resets for a new round.

Have fun playing the Dice Game!

image