Pig Game is a simple two-player dice game developed using HTML, CSS, and JavaScript. Players take turns rolling a dice to accumulate points, but rolling a '1' will switch the turn to the other player. The first player to reach 100 points wins.
- The game starts with Player 1.
- Click the "Roll Dice" button to roll a dice.
- The dice will generate a random number between 1 and 6:
- If the dice shows 1, the current score resets to 0, and the turn switches to the other player.
- If the dice shows 2-6, the value is added to the player's current score.
- Players can choose to click the "Hold" button to save their current score to their total score and pass the turn to the other player.
- The first player to reach 100 points wins the game.
- When a player wins, the background changes to black to indicate the winner.
- HTML
- CSS
- JavaScript
- Two-player gameplay
- Randomized dice rolling
- Score tracking
- Turn-based switching
- Winner indication with a black background
- Download the project files.
- Open
index.htmlin a browser to start playing.
- Add animations for rolling the dice.
- Include sound effects for game interactions.
- Improve UI design for a better user experience.
Enjoy the game!