Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.7 KB

README.md

File metadata and controls

46 lines (30 loc) · 1.7 KB

Pig Game

Description

Welcome to Pig Game! This project is a simple dice game where two players compete to reach 100 points first. Players take turns rolling a single die as many times as they wish, accumulating points for each roll. However, if a player rolls a 1, they lose all points accumulated during their turn, and the turn passes to the other player. The first player to reach 100 points wins the game.

How to Play

  1. Start the Game: Player 1 begins the game.
  2. Roll the Die: On your turn, roll the die by clicking the "Roll Dice" button.
  3. Accumulate Points: Each roll adds points to your current turn's score unless you roll a 1.
  4. Hold or Continue:
    • Hold: Click the "Hold" button to add your turn's points to your total score and pass the turn to the other player.
    • Continue Rolling: Keep rolling to accumulate more points, but risk rolling a 1 and losing all points for that turn.
  5. Winning the Game: The first player to reach 100 points wins the game.

Features

  • Single or Two-Player Mode
  • Roll dice and hold functionality
  • Turn-based gameplay
  • Score tracking
  • Simple and intuitive user interface

Technologies Used

  • HTML5
  • CSS3
  • JavaScript

Getting Started

To run the game locally, follow these steps:

  1. Clone this repository to your local machine.
  2. Open the index.html file in your web browser.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This game is created for educational and entertainment purposes only. The code provided is open-source, and you are free to use, modify, and distribute it as per the license agreement.

Enjoy playing the game! 👩🏻‍💻