Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
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)
Пример #4
0
 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)
Пример #5
0
 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)
Пример #6
0
 def setUp(self) -> None:
     self.w = Wheel()
     bb = BinBuilder(self.w)
     bb.buildBins()
     self.t = Table()
     self.p = Player(self.t, self.w)
Пример #7
0
    def setUp(self):

        self.wheel = Wheel()
        self.bb = BinBuilder()
Пример #8
0
 def setUp(self) -> None:
     self.w = Wheel()
     binBuilder = BinBuilder(self.w)
     binBuilder.buildBins()
     self.t = Table([])
     self.g = Game(self.t, self.w)
Пример #9
0
 def testInit(self):
     w = Wheel()
     binBuilder = BinBuilder(w)
     self.assertEqual(type(binBuilder), type(BinBuilder(w)))
     self.assertEqual(type(binBuilder.wheel.getBinByIndex(0)), type(Bin()))
Пример #10
0
 def __init(self):
     w = Wheel()
     a = BinBuilder(w)
     return a, w