def main(): # create NonRandom instance with seed nr = NonRandom() nr.set_seed(1) # create game and player wheel = Wheel(nr) table = Table() game = Game(wheel, table) player = Martingale(table) # assign default values to prevent future changes on them player.BASE_AMOUNT = 1 player.BASE_BET = "Black" # create simulator instance simulator = Simulator(game, player) simulator.SAMPLES = 3 # execute simulator simulator.gather() # print results print "\n" print "Maxima", simulator.maxima, "\n" print "Final", simulator.final, "\n" print "Durations", simulator.durations, "\n"
def setUp(self): # create NonRandom instance with seed nr = NonRandom() nr.set_seed(1) # create game and player wheel = Wheel(nr) table = Table() game = Game(wheel, table) player = Martingale(table) # assign default values to prevent future changes on them player.BASE_AMOUNT = 1 player.BASE_BET = "Black" # create simulator instance self.simulator = Simulator(game, player) self.simulator.SAMPLES = 3