Skip to content

Added background music, sound effects, tortoise progress, and individual player buttons

Notifications You must be signed in to change notification settings

KabriAcid/pig-game

Repository files navigation

Pig Game

Inspiration

Inspired by Jonas Schmedtmann.

Description

This is a version of the classic Pig game, where players roll a dice and accumulate points based on the rolls, but risk losing all accumulated points if they roll a 1. The game continues until one player reaches a specified score limit.

New Features Added

  • Background Music: Added looping background music to enhance the gameplay experience.
  • Sound Effects: Dice roll and hold actions are accompanied by sound effects for better immersion.
  • Tortoise Tracking Progress: Visual progress tracking using tortoise images that move based on each player's score.
  • Player Names & Score Limit: Players can input custom names and set a score limit for the game.
  • Individual Roll & Hold Buttons: Each player has their own dedicated buttons for rolling the dice and holding points to avoid conflicts.
  • Celebration Sound Effect: A celebration sound plays when a player wins.

How to Play

  1. Roll the dice by clicking the Roll Dice button or pressing Shift.
  2. Accumulate points based on the dice roll, but if you roll a 1, you lose all points for that turn.
  3. Hold your points by clicking the Hold button or pressing Space.
  4. The first player to reach the score limit wins the game.
  5. A tortoise track shows the progress of each player.

History of the Pig Game

The Pig Game (also known as Pig Dice) has its roots in a simple dice game that evolved over time into various forms. One of its most popular versions, known as Pass the Pigs, was created in 1977 by David Moffat. The game involved rolling small plastic pigs to determine the outcome based on how they landed. The game, initially called Pig Mania, was later rebranded and released by Milton Bradley as Pass the Pigs.

The game combines luck and strategy, as players need to decide whether to take another roll and risk losing their points or hold onto their accumulated score. It's a fun game suitable for all ages, improving both basic math skills and decision-making.

Installation

To play the game locally, simply clone the repository and open the index.html file in a browser.

git clone https://github.com/KabriAcid/pig-game.git
cd pig-game
open index.html

About

Added background music, sound effects, tortoise progress, and individual player buttons

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published