Welcome to Pig Game! This project is a simple dice game where two players compete to reach 100 points first. Players take turns rolling a single die as many times as they wish, accumulating points for each roll. However, if a player rolls a 1, they lose all points accumulated during their turn, and the turn passes to the other player. The first player to reach 100 points wins the game.
- Start the Game: Player 1 begins the game.
- Roll the Die: On your turn, roll the die by clicking the "Roll Dice" button.
- Accumulate Points: Each roll adds points to your current turn's score unless you roll a 1.
- Hold or Continue:
- Hold: Click the "Hold" button to add your turn's points to your total score and pass the turn to the other player.
- Continue Rolling: Keep rolling to accumulate more points, but risk rolling a 1 and losing all points for that turn.
- Winning the Game: The first player to reach 100 points wins the game.
- Single or Two-Player Mode
- Roll dice and hold functionality
- Turn-based gameplay
- Score tracking
- Simple and intuitive user interface
- HTML5
- CSS3
- JavaScript
To run the game locally, follow these steps:
- Clone this repository to your local machine.
- Open the
index.html
file in your web browser.
This project is licensed under the MIT License - see the LICENSE file for details.
This game is created for educational and entertainment purposes only. The code provided is open-source, and you are free to use, modify, and distribute it as per the license agreement.
Enjoy playing the game! 👩🏻💻