MELISSA MALALA WEEK 4 MORINGA SCHOOL INDEPENDENT PROJECT Pig Dice.

-This is my fourth project at Moringa School Prep, and the aim is to create a Pig Dice game that will allow 2 players to roll dice. The rules of the game are as follows. On each turn, a player repeatedly rolls a die until either a 1 is rolled or the player decides to "hold" their score and pass over the next turn to the other plater.

You can find the web app here: https://melisamalala.github.io/pigdice/

CONTENTS:

If the player rolls a 1, they score nothing and it becomes the next player's turn. If the player rolls any other number, it is added to their turn total and the player's turn continues. If a player chooses to "hold", their turn total is added to their score, and it becomes the next player's turn. The first player to score 100 or more points wins.

SPECIFICATIONS OF THE PROJECT. USER AND BUSINESS LOGIC EXPLAINED:

-According to the instructions provided, the function should run as follows:

  • If the rolled dice is 1, the player scores nothing and the next turn is passed on to the other player.
    If the rolled dice is a random number between 1 and 6 but other than 1, then the player scores that number and can either continue to play and accumulate more points, or they can hold their score and pass on the opportunity to another player.

  • Finally, an alert should pop up when the game is over alerting the players who the winner is (the one with the highest score closest to 100).

CSS -This project was styled using Bootstrap for a polished finish. Walter Turncoat font was used (Google Fonts) for a more elegant finish.

LICENSE:

2018 MELISSA MALALA