Pig Game is a simple and fun dice game developed using HTML, CSS, and JavaScript. Players take turns rolling a dice to accumulate points, and the first player to reach 100 points wins the game.
You can view a live demo of the game here: Pig Game Demo
- The game is for 2 players.
- Players take turns rolling the dice by clicking the "🎲 Roll dice" button.
- Each roll adds the dice value to the current score of the player.
- If a player rolls a 1, their current score is lost, and it's the next player's turn.
- Players can choose to "📥 Hold" their current score, which adds the current score to their total score and passes the turn to the other player.
- The game ends when a player reaches 100 points.
index.html
: The HTML file that contains the structure of the game.style.css
: The CSS file that contains the styling of the game.script.js
: The JavaScript file that contains the game logic.