Welcome to the Pig Game! This simple web-based game allows two players to take turns rolling dice and competing for victory. It's a fun and interactive way to challenge your luck and strategy as you aim to reach the target score.
To get started with the Pig Game, follow these simple steps:
- Clone the repository or download the source code to your local machine.
- Ensure you have a modern web browser installed (e.g., Chrome, Firefox, Edge).
- Open the
index.html
file in your web browser.
Now you and a friend are ready to start playing the Pig Game!
The rules of the Pig Game are easy to understand:
- Two players take turns rolling a standard six-sided die.
- On a player's turn, they can roll the die as many times as they like and accumulate points with each roll.
- If a player rolls a 1, they lose all the points accumulated during that turn, and their turn ends.
- The player can choose to "Hold" and add their turn's points to their total score to secure them.
- The first player to reach the target score (default is 100 points) wins the game.
- If a