Skip to content

kartiks98/The-PIG-Game-for-two-dice-using-JavaScript-HTML5-CSS3

Repository files navigation

The PIG Game - Using HTML, CSS & JavaScript

This web game is created using the concepts of Functions & DOM manipulating methods in JavaScript.

Rules of the game :

  • There are two players needed to participate in this game & each one has to roll two dice at his turn.

  • The numbers displayed in the two dice are added & then contributed towards the score of that player if he clicks on HOLD button or could continue to roll to obtain more score.

  • If a player encounters 1 on either of the two dices, the score that had to be added to player's score would now not be added & the turn toggle to other player.

  • If a player clicks the HOLD button, then the sum of the numbers that he got on rolling the two dice in his particular turn, will get added to the score & turn will toggle to other player.

  • The person to reach the Final Score (Default is 100) first will be considered as Winner of the game.

About

A Simple PIG game made with JavaScript, HTML5 & CSS3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published