/Who-Pays-The-Bill

My first project using HTML, CSS and JavaScript. I try to implement everything I have learned about those languages so far.

Primary LanguageJavaScript

Who Pays The Bill Game

My first project using HTML, CSS and JavaScript. I try to implement everything I have learned about those languages so far.

This is a funny game to determine who will pay the bill when you go out to eat at a restaurant with a friend.

GAME RULES:

  • First you have to type the total bill amount in the textbox that says "The bill, please"
  • The game has 2 players, playing in rounds
  • In each turn, a player rolls the dices as many times as he whishes. Each result gets added to his ROUND score
  • BUT, if the player rolls a 1 in any dice, all his ROUND score gets lost. After that, it's the next player's turn
  • The player can choose to 'Hold', which means that his ROUND score gets added to his GLOBAL score. After that, it's the next player's turn
  • A player looses his ENTIRE GLOBAL score when he rolls two 6's in a round. After that, it's the next player's turn.
  • The first player to reach the bill amount set in the textbox at the beginning of the game (Which is indicated in the GLOBAL score) wins the game, and the looser must pay the bill.

New feature added October 26th 2019: Now the game has two dices. The player looses his ROUND score when one of them is a 1 and his GLOBAL score when the two dices are 6.

I share the project link below so that you can watch its current state at any given moment:

https://juantobiasdl7.github.io/Who-Pays-The-Bill/