Pig Game is a fun, interactive 2-player game built using pure JavaScript. The objective of the game is to reach 100 points before your opponent does. Players take turns rolling a dice, accumulating points during their turn. However, there's a catch! If the player rolls a 1, their turn ends and all points collected during that turn are lost.
- The game consists of 2 players.
- On each turn, a player rolls a dice:
- If they roll any number other than 1, that number is added to their current turn's score.
- The player can then choose to either:
- Continue rolling to accumulate more points.
- Hold to add their current turn's score to their total score and pass the dice to the next player.
- If the player rolls a 1, their current turn's score is reset, and it's the next player's turn.
- The first player to reach 100 points wins!
- Simple Gameplay: Roll the dice, hold, or risk it all!
- Pure JavaScript: No external libraries or frameworks needed.
- Great for Friends: Enjoy playing the Pig Game with friends at gatherings or during downtime.
- Roll the dice to accumulate points.
- Hold to add the current points to your total score and pass the turn to the next player.
- Rolling a 1 ends your turn and resets your turn's score.
- First player to reach 100 points wins!
You can play this game now on : https://js-godmode.github.io/Pig-game/
To play the Pig Game, simply clone the repository and open the index.html
file in your browser.
git clone https://github.com/yourusername/pig-game.git
Then, open index.html
in your preferred browser to start playing.
- Anonav0 (Swarnavo Khanra) - Developer of Pig Game.
Feel free to reach out on LinkedIn or GitHub for any questions or feedback.