Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/surjoyday/pig-game
Two-player dice game: strategise, roll, and win! Play until 100 or get a '1'.
https://github.com/surjoyday/pig-game
css dom dom-manipulation html javascript
Last synced: about 1 month ago
JSON representation
Two-player dice game: strategise, roll, and win! Play until 100 or get a '1'.
- Host: GitHub
- URL: https://github.com/surjoyday/pig-game
- Owner: Surjoyday
- Created: 2023-11-19T20:59:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-19T21:04:17.000Z (about 1 year ago)
- Last Synced: 2024-11-08T19:16:07.419Z (3 months ago)
- Topics: css, dom, dom-manipulation, html, javascript
- Language: JavaScript
- Homepage: https://piggy-game-dice-roll.netlify.app/
- Size: 251 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pig Game
Welcome to the Pig Game! Challenge a friend and test your luck in this two-player dice game.
[Play the Game](https://piggy-game-dice-roll.netlify.app/)
## Game Rules
- **Players:** Two players take turns to play.
- **Starting Player:** Player 1 starts the game.
- **Rolling the Dice:** Click the ROLL button to generate a dice number.
- **Gameplay:** Each roll adds the dice number to the current player's score.
- **Winning Condition:** The first player to reach a total score of 100 or more wins.
- **Roll Outcome:**
- If the dice rolls a 1, the current player loses their current score, and the turn goes to the next player.
- If the roll is not a 1, the player can either continue rolling or choose to hold the current score and pass the turn to the next player.
- **Hold Option:** Click the HOLD button to switch to the next player and secure the current score.## How to Play
1. Start the game by clicking the NEW GAME button.
2. Player 1 begins by rolling the dice.
3. Keep rolling or choose to hold your score to pass the turn.
4. Avoid rolling a 1 to prevent losing your current score.
5. The first player to reach a score of 100 or more wins!## Technologies Used
- HTML, CSS, JavaScript