/Twenty-One

Variation of the PIG dice game algorithm

Primary LanguageJavaScript

Twenty-One

Variation of the PIG dice game algorithm. Working on efficient DOM manipulation and practicing ES5 JavaScript language.

Gameplay

Each turn, a player repeatedly rolls a die until either a 1 is rolled or the player decides to "hold":

  • 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 21 or more points wins.

gameplay

Future

  • Implementing playing cards and work on "Blackjack" gameplay