JavaScript Craps (Tarak Mehta)Rules and Overview: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. |
Instructions:
Click the "Roll Dice" button to see each roll.
You can choose to play as the shooter X, or Y. You can also choose the amount of
money you want to bet on any game, as long as it is greater than 0.
Note: You can not change the player status or the money you want to bet, once you have rolled the dice the first time for any given round. After that round is done, you can make adjustments
The Status column will tell you the status each game is in. The overall result tracks your progress.
The Total Money row will record how much you have gained or lost in any given session.
Click on Reset to start fresh
Reference used:
http://alliance.seas.upenn.edu/~cis700/wiki/index.php?n=Ajax.Ajax (JavaScript Reference)
http://www.cs.laurentian.ca/rsgrewal/c2206/javascript/ (JavaScript and craps reference)
http://homepage.ntlworld.com/kayseycarvey/variables4.html (JavaScript reference)
http://www.quirksmode.org/js/events_mouse.html (JavaScript Events reference)