def generate_rolls(num_rolls):
 cur_state = 'F'
 roll_seq = MutableSeq('', DiceRollAlphabet())
 state_seq = MutableSeq('', DiceTypeAlphabet())
 for roll in range(num_rolls):
  state_seq.append(cur_state)
  chance_num = random.random()
  new_roll = _loaded_dice_roll(chance_num, cur_state)
  roll_seq.append(new_roll)
  chance_num = random.random()
  if (cur_state == 'F'):
   if (chance_num <= 0.05):
    cur_state = 'L'
  elif (cur_state == 'L'):
   if (chance_num <= 0.1):
    cur_state = 'F'
 return (roll_seq.toseq(), state_seq.toseq())

def generate_rolls ( num_rolls ) : cur_state = 'F' roll_seq = MutableSeq ( '' , DiceRollAlphabet ( ) ) state_seq = MutableSeq ( '' , DiceTypeAlphabet ( ) ) for roll in range ( num_rolls ) : state_seq . append ( cur_state ) chance_num = random . random ( ) new_roll = _loaded_dice_roll ( chance_num , cur_state ) roll_seq . append ( new_roll ) chance_num = random . random ( ) if ( cur_state == 'F' ) : if ( chance_num <= 0.05 ) : cur_state = 'L' elif ( cur_state == 'L' ) : if ( chance_num <= 0.1 ) : cur_state = 'F' return ( roll_seq . toseq ( ) , state_seq . toseq ( ) )
generate a bunch of rolls corresponding to the casino probabilities .