Skip to content

Aditya-Bhate/Pig-Game-Js

Repository files navigation

Pig-Game-Js 🎲

Go To Game 🤗

About :

📌 Pig game is a ✌ player-game made using HTML, CSS and Javascript to manoeuvre DOM Manipulation .

📌 Have a look at the Official Docs!

Game Rules:

On a turn, a player rolls the die repeatedly. The goal is to accumulate as many points as possible, adding up the numbers rolled on the die. However, if a player rolls a 1, the player's turn is over and any points they have accumulated during this turn are forfeited. Rolling a 1 doesn't wipe out your entire score from previous turns, just the total earned during that particular roll.

A player can also choose to hold (stop rolling the die) if they do not want to take a chance of rolling a 1 and losing all of their points from this turn. If the player chooses to hold, all of the points rolled during that turn are added to his or her score.

When a player reaches a total of 100 or more points, the game ends and that player is the winner.

HTML DOM :

The HTML DOM (Document Object Model) When a web page is loaded, the browser creates a Document Object Model of the page.

The HTML DOM model is constructed as a tree of Objects :

Screenshot (2607)

Flow-Chart of the game :

Languages used:

🎮 Have fun playing this game with your friends !🤗

❎ In case you find issues in any of my Repositories, you can Hit Me Up here! 👈