Skip to content

Always thinking about how to practice a programming language and have fun at the same time, I prepared this small project, based on the new viral series called Squid Game. But don't worry that no one will die in this little javascript game. The real name of the game is called Pig Game, where two players will have to roll the dice, until the sum …

Notifications You must be signed in to change notification settings

fernandogiroto/SquidGamePigGame

Repository files navigation

Squid Game - Pig Game

Always thinking about how to practice a programming language and have fun at the same time, I prepared this small project, based on the new viral series called Squid Game. But don't worry that no one will die in this little javascript game. The real name of the game is called Pig Game, where two players will have to roll the dice, until the sum of the drawn numbers reaches 100.

alt text

Game Rules

Players in their turns can roll the number of times they want the dice, and every time they roll, the numbers drawn are added up. However, if the number drawn is 1 (one), the values ​​are immediately reset to zero and the player loses his turn.

But before the number drawn is 1 (one), the player in turn can choose to keep the sum of the numbers drawn so far and add them to the total value he has, thus losing his turn. For example: Player A currently has 0 Total points and on his turn, he rolled 3, 5 and 2 on the dice and before he could be unlucky to roll 1, he decided to stop. So adding (3+5+2) to the total. Then starting to have 10 points. Upon returning to his turn, player A, rolled 5 and decided to stop again, thus adding: Total Points = 10 + 5.

The player who reaches 100 or more first is the winner 🏆.

HTML | CSS | JAVASCRIPT

#javascript #squidGame #netflix #coding #js

Create by

Fernando Portugal

About

Always thinking about how to practice a programming language and have fun at the same time, I prepared this small project, based on the new viral series called Squid Game. But don't worry that no one will die in this little javascript game. The real name of the game is called Pig Game, where two players will have to roll the dice, until the sum …

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published