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.
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.
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.
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.
The technologies used to develope the Dice-Game are:
- HTML5.
- Css3.
- Javascript.
- Open the link of the github repository.
- Click on the code button provided ate the top of the list of files in the right side.
- A pop-up appears by clicking the code button on the screen, there you will find a download button.
- Download the folder.
- Within the folder "Dice-Game" open "index.html" in your web browser.
- Enjoy.
- 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.
- Niladri Goswami(https://www.linkedin.com/in/niladri-goswami-0972a2118/).