Skip to content

Pig Game is a fun, interactive JavaScript project where players compete to reach a target score by rolling dice. The twist? Rolling a 1 resets the turn’s points!

Notifications You must be signed in to change notification settings

OrasanuAna/Pig_Game

Repository files navigation

Pig Game 🎲

A fun and interactive dice game built with JavaScript, HTML, and CSS! Test your luck and enjoy a friendly competition.

Description

Pig Game is a two-player dice game where players take turns rolling a die to accumulate points. The first player to reach a set score wins the game. However, beware: rolling a 1 will reset your turn score to zero, and it’ll be the other player’s turn!

How to Play

  1. Each player takes turns rolling the dice.
  2. During a turn, the player can roll to add to their current score or hold to add their current score to their total.
  3. If a player rolls a 1, their current turn ends, and they lose any points accumulated during that turn.
  4. The first player to reach the target score (e.g., 100 points) wins the game.

Features

  • Dynamic score tracking
  • Reset option to start a new game
  • Interactive visuals to enhance the gaming experience

Game Interface

Initial Game Screen

Game Interface

Winning Screen

Winning Screen

Installation

To play the game locally:

  1. Clone the repository:
    git clone https://github.com/OrasanuAna/Pig-Game.git
  2. Open index.html in your browser to start playing.

Technologies Used

  • HTML for structuring the content
  • CSS for styling the game interface
  • JavaScript for game logic and interactivity

About

Pig Game is a fun, interactive JavaScript project where players compete to reach a target score by rolling dice. The twist? Rolling a 1 resets the turn’s points!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published