Skip to content

chriswalsh08/pig_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

PIG! A Simple Dice Game

This game was created during the Complete JavaScript Course on Udemy, taught by Jonas Schedtmann.

Rules

  • The game has two players playing in rounds.
  • In each round, a player rolls two dice as often as they want. The result is added to their ROUND score.
  • At any time in their turn, the player can HOLD and roll their ROUND score into their GLOBAL score.
  • If the player rolls a 1 on either dice, their round ends, they lose their ROUND score, and the turn is passed to the next player.
  • If the player rolls a 6 on both dice, their round ends, they lose their GLOBAL score, and the turn is passed to the next player.
  • First to reach the target amount wins!

Importance of Files

  • css folder: holds stylesheet containing CSS for the Pig game UI
  • img folder: holds .png files for dice faces and background image
  • app.js: contains the JavaScript used for manipulating DOM objects, initializing the game, and updating UI
  • index.html: HTML elements for structuring the web page

Have fun!

To-do:

  • Scoreboard: In the future, I would like to add authentication that tracks wins and updates a scoreboard.

About

Pig dice game, inspired by the modern JavaScript course taught by Jonas Schmedtmann on Udemy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published