This is a simple dice game where players take turns rolling a dice to accumulate points. The objective of the game is to be the first player to reach a target score.
- The game is played by two players, who take turns rolling a six-sided dice.
- On each turn, a player rolls the dice and accumulates points based on the number rolled.
- If the player rolls a 1, their turn ends, and they lose all the points accumulated in that turn.
- If the player rolls any other number (2-6), the rolled number is added to their turn score.
- The player can choose to roll the dice again to accumulate more points or end their turn.
- If the player ends their turn, their turn score is added to their total score.
- The first player to reach the target score (e.g., 100 points) wins the game.
To play the Pig Game, go here
- To roll the dice, click on the "Roll Dice" button or press the spacebar.
- To end your turn, click on the "Hold" button or press the Enter key.
- HTML
- CSS
- JavaScript
This game is inspired by the Pig Dice Game from the JavaScript Course by Jonas Schmedtmann on Udemy.