Skip to content

Dylananhminh0810/Pig-Game

Repository files navigation

Pig-Game

Continuing to my javascript learning road that I learn from Jonas Schmedtmann on Udemy. This is a small project that I build a game.

It's a game that you can roll the dice and compare the points for 2 players. This is the flowchart. Flowchart

If a player rolls the dice and gets the value of 1 then it will switch to another player to roll and reset the current point without adding to total point. Also change the active player background. If you choose hold, it will do the same but adding the point to the player total point.

The screen at first when you access the website. image

Click new game and the infomation is reset. image

The screen when a player win. image

!Note: You need to click "new game" first to play. Once a player win, you cannot continue to roll the dice or hold points. I did that with flag variable. I did not command for each line so it's better to read the flowchart to understand what I wrote.

That's all! Have fun.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published