Craps is a single player dice game, that proceeds as follows:
1. the player rolls 2 six-sided dice once
if the total is 7 or 11, the player wins
if the total is 2, 3 or 12, the player loses
otherwise, the game continues, ... see 2 ...
2. the player the continues to roll the dice repeatedly, until ...
the total is the same as the original total (from 1), in which case the player wins
the total is 7, in which case the player loses
Write a function craps that simulates a single game of craps (may be many rolls) and returns 1
if the player wins and 0 otherwise.