def setUp(self) -> None: self.w = Wheel() bb = BinBuilder(self.w) bb.buildBins() self.t = Table() self.p = Passenger57(self.t, self.w) self.g = Game(self.t, self.w) self.sim = Simulator(self.p, self.g)
def setUp(self) -> None: self.t = Table([]) self.w = Wheel() binBuilder = BinBuilder(self.w) binBuilder.buildBins() self.blackOutcome = self.w.getOutcomeByName('black') self.redOutcome = self.w.getOutcomeByName('red') self.blackOutcomeBin = Bin([self.blackOutcome]) self.redOutcomeBin = Bin([self.redOutcome]) self.m = Martingale(self.t, self.w) self.m.isPlaying = MagicMock(return_value=True) self.g = Game(self.t, self.w)
class TestOutcome(unittest.TestCase): def setUp(self): self.wheel = Wheel() self.bb = BinBuilder() def test_generateStraightBets(self): self.bb.generateStraightBets(self.wheel) def test_builder(self): self.bb.buildBins(self.wheel)
def run(self): w = Wheel() binBuilder = BinBuilder(w) binBuilder.buildBins() t = Table([]) g = Game(t, w) p1 = Passenger57(t, w) g.cycle(p1) g.cycle(p1) g.cycle(p1) g.cycle(p1) g.cycle(p1) g.cycle(p1) g.cycle(p1) g.cycle(p1) g.cycle(p1)
def __init__(self): """ This constructor creates a wheel with 38 bins, and calls uses the methods of the BinBuilder class to create Outcomes and assign them to the Bins. """ # Creates the wheel with 38 bins # Right now, it is a list with 38 entries self.bins = list( Bin() for i in range(38) ) # Collection of all outcomes # Used in getOutcome to return a desired outcome self.allOutcomes = dict() # Populates the allOutcomes dictionary self.populateOutcomeDict() """ We then call the buildBins() function in the BinBuilder class. """ BinBuilder.buildBins(self, self)
def setUp(self) -> None: self.w = Wheel() bb = BinBuilder(self.w) bb.buildBins() self.t = Table() self.p = Player(self.t, self.w)
def setUp(self) -> None: self.w = Wheel() binBuilder = BinBuilder(self.w) binBuilder.buildBins() self.t = Table([]) self.g = Game(self.t, self.w)