Skip to content

The Dice Game is a simple game designed for two players. It is also known by the name "Pig-Game". Based on the rules of the game, the winner will be decided. And if players are unaware of the game rules, then they can easily understand the rules which have been provided in the User Interface by clicking the "Rules" which has been placed in the t…

Notifications You must be signed in to change notification settings

NiladriGoswami/Dice-Game

Repository files navigation

Dice-Game

Description

The Dice Game is basically a simple game designed for two player's.It is also know by the name "Pig-Game". Based on the rules of the game, the winner will be decided. And if player's are unaware of the game rules, then they can easily understand the rules which have been provided in the UI by clicking the "Rules" which has been placed in the top left corner of the UI. By clicking the "Rules", a dialog box will pop up on the screen which is implemented by using Sweetalert library, inorder to avoid the traditional default design of dialog boxes and alert boxes, to make it more interactive for the user's/player's. In the dialog box the game rules are mentioned clearly for player's understanding.
Rules Initially the player whose turn will be, "ROLL DICE" as many times as the player wish. Each time the player roles the dice, the scores will be sum up to his/her current score.If the player wants to "HOLD" the score, then by clicking the "HOLD" button the player can hold the current score in his/her global score, but also by clicking the "HOLD" button, the next player's turn will be considered.If the player roll the dice and in the dice "1" comes, then the current scores of the player will be set back to zero to '0' and the turn of the next player will be considered.
Gameplaying The 1st one to score 100 point's or above will be decided as the "WINNER" by the game. After the "WINNER" is decided, immediately the dice will disapear form the UI and no other button's except "NEW GAME" button will function, which say's that the game is over.
winner If we click on the "NEW GAME", scores of the game in the UI will be reset to '0' saying that the new game has started and player's can enjoy by playing another round.
Newgame

Technologies used

The technologies used to develope the Dice-Game are:

  1. HTML5.
  2. Css3.
  3. Javascript.

Installation

  1. Open the link of the github repository.
  2. Click on the code button provided ate the top of the list of files in the right side.
  3. A pop-up appears by clicking the code button on the screen, there you will find a download button.
  4. Download the folder.
  5. Within the folder "Dice-Game" open "index.html" in your web browser.
  6. Enjoy.

Dice-Game : Rules

  • The game has 2 players, playing in rounds.
  • In each turn, a player rolls a dice as many times as he/she whishes. Each result get added to his/her ROUND score.
  • BUT, if the player rolls a '1', all his/her ROUND score gets lost. After that, it's the next player's turn.
  • The player can choose to 'Hold', which means that his/her ROUND score gets added to his/her GLOBAL score. After that, it's the next player's turn.
  • The first player to reach 100 points on GLOBAL score wins the game.

Credits

Author:

Link:

https://jolly-lovelace-2f64bd.netlify.app

About

The Dice Game is a simple game designed for two players. It is also known by the name "Pig-Game". Based on the rules of the game, the winner will be decided. And if players are unaware of the game rules, then they can easily understand the rules which have been provided in the User Interface by clicking the "Rules" which has been placed in the t…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published