Skip to content
This repository was archived by the owner on Aug 9, 2026. It is now read-only.
DaEpickid540Public archive

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Pig Game

A two-player browser dice game. Roll to accumulate a current score, or hold to bank it — but roll a 1 and you lose everything you haven't banked yet. First player to reach the target score wins.

Built as a JavaScript practice project following Jonas Schmedtmann's Udemy course.

How to Play

  1. Open index.html in a browser
  2. Set the winning score from the dropdown (20 / 50 / 100 / 200)
  3. Players take turns:
    • Roll Dice — adds the roll to your current (unbanked) score, unless you roll a 1 (turn ends, current score lost)
    • Hold — banks your current score; first to hit the target wins
    • New Game — resets everything

Files

  • index.html — Game layout with dice, scores, and controls
  • script.js — All game logic (dice roll, player switching, win detection)
  • style.css — Styling
  • dice-1.png through dice-6.png — Dice face images

Credits

Jonas Schmedtmann — JavaScript course

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages