A interactive two-player dice game built with JavaScript, HTML, and CSS. This project demonstrates DOM manipulation, event handling, and game logic implementation.
The game involves two players fighting to reach the winning score first (default is 50, though custom variations may apply).
- Roll the Dice: In each turn, a player rolls a dice as many times as they wish. Each result gets added to their current score.
- Lose Turn: If the player rolls a 1, they lose their entire current score, and it becomes the next player's turn.
- Hold: The player can choose to 'Hold', which adds their current score to their total score. After holding, it becomes the next player's turn.
- Win: The first player to reach the winning score on their total score wins the game!
- HTML5: Structural markup.
- CSS3: Styling and layout.
- JavaScript: Game logic and DOM manipulation.
index.html: The main game interface.style.css: Custom styles for the game board and components.script.js: Contains the game logic/mechanics.dice-*.png: Assets for the dice faces.
- Clone this repository or download the source code.
- Open the
index.htmlfile in any modern web browser. - Enjoy the game!
