Skip to content

Imissh3r/pig-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฒ Pig Game ๐ŸŽฏ

A fun two-player dice game built with HTML, CSS, and JavaScript.


๐Ÿ”น Description
Race to 100 points in this classic two-player dice game!
Players roll the dice to accumulate points, but rolling a 1 ends your turn and resets your current round score.
The first player to reach 100 points is crowned the winner ๐Ÿ†.


Features

  • ๐ŸŽฒ Random dice rolls with dice image updates (./assets/dice-N.png)
  • ๐Ÿงฎ Player score tracking (current & total)
  • ๐Ÿ”„ Reset functionality with New Game button
  • ๐Ÿ‘ฅ Active player highlighting with transitions
  • ๐Ÿ† Winner state with styled announcement
  • Clean, modular JavaScript code (init, switchPlayer, updateScores, checkWinner)
  • Glassmorphism-inspired UI with frosted blur effect

๐Ÿ“ธ Screenshots & Flowchart
Pig Game Screenshot
Pig Game Flowchart


๐Ÿ”น Live Preview
๐Ÿ”— Play Pig Game


๐Ÿ”น Built With

  • HTML
  • CSS (glassmorphism, transitions, layout)
  • JavaScript (event handling, game logic, DOM updates)

๐Ÿ”น Author
GitHub: @Imissh3r
Project Repo: pig-game


๐Ÿ”น Acknowledgements
This project was created while following
The Complete JavaScript Course 2025: From Zero to Expert!
by Jonas Schmedtmann.

About

Race to 100 points in this classic two-player dice game!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published