Assignment# 1: Craps in JavaScript!

Vivek Jain (vivekj2@seas.upenn.edu)


The game of craps is a dice game played by two players, X and Y. First X tosses the pair of dice. If the sum of the dice is 7 or 11, X wins the game. If the sum is 2, 3, or 12, Y wins. Otherwise, the sum is designated as the "point," to be matched by another toss. So if neither player has won on the first toss, then the dice are tossed repeatedly until either the point or a 7 comes up. If a 7 comes up first, Y wins. Otherwise, X wins when the point comes up.

Shooter

Start a new game

Roll the Dice

Status


Game Statistics

Amount won by the player (If amount is negative then the player has lost that much money)
Number of games won by the Player
Number of games won by the Computer
Dice rolls

Score Card


How to play the game :-

1. To start the game press "Play" button.
2. Select "Shooter" check if you want as player 'Y'. (Role of each player is explained in the introduction of the game)
3. Click "Dice" to roll the dice. Enter your bet in dollar in the message box.
4. Keep rolling the dice until the game is over.
5. Click "Play" to start a new game.