Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulinetw/famous-pig-game
A simple dice game with two players. Each player repeatedly rolls a dice until either a 1 is rolled or the player decides to "hold". The player who first scores 100 or more points wins.
https://github.com/paulinetw/famous-pig-game
css dom-manipulation game http javascript
Last synced: 4 days ago
JSON representation
A simple dice game with two players. Each player repeatedly rolls a dice until either a 1 is rolled or the player decides to "hold". The player who first scores 100 or more points wins.
- Host: GitHub
- URL: https://github.com/paulinetw/famous-pig-game
- Owner: PaulineTW
- Created: 2022-05-04T03:04:30.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-09T04:22:24.000Z (over 2 years ago)
- Last Synced: 2024-11-10T09:35:28.555Z (2 months ago)
- Topics: css, dom-manipulation, game, http, javascript
- Language: JavaScript
- Homepage: https://famous-pig-game.netlify.app/
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Famous Pig Dice Game
#### A simple dice game with two players. Each player repeatedly rolls a die until either a 1 is rolled or the player decides to "hold". The player who first scores 100 or more points wins.## Description
This is a simple dice game where two players have the chance to roll the dice to try and achieve a score of 100. Each player repeatedly rolls a die until either a 1 is rolled or the player decides to "hold".The rules of the game are:
* When a player rolls a 1, their total score reverts to 0 and it becomes the next player's turn.
* When the player rolls a 2 - 6, the score is added to their turn total and they can continue to play
* When the player chooses to "hold", their turn total is added to their total score, and it becomes the next player's turn.
* The player who first scores 100 or more points wins.![image](https://user-images.githubusercontent.com/87069685/167340188-a2795506-8d04-4e27-ba8f-d1d4e436f3bc.png)