Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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'.

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