Esempio n. 1
0
def test_get_outcome():
    wheel = Wheel()
    bb = BinBuilder()
    bb.generate_even_money_bets(wheel)
    bb.generate_column_bets(wheel)

    assert Outcome('High', 1) == wheel.get_outcome('High')
    assert Outcome('Low', 1) == wheel.get_outcome('Low')
    assert Outcome('Red', 1) == wheel.get_outcome('Red')
    assert Outcome('Black', 1) == wheel.get_outcome('Black')

    assert Outcome('Column 1', 1) == wheel.get_outcome('Column 1')
    assert Outcome('Column 2', 1) == wheel.get_outcome('Column 2')
    assert Outcome('Column 3', 1) == wheel.get_outcome('Column 3')
Esempio n. 2
0
def test_column_bets():
    wheel = Wheel()
    bb = BinBuilder()
    bb.generate_column_bets(wheel)

    col_one = Outcome(f'Column 1', 2)
    col_two = Outcome(f'Column 2', 2)
    col_thr = Outcome(f'Column 3', 2)
    outcomes = {1: col_one, 2: col_two, 0: col_thr}

    for i, bin in enumerate(wheel.bins):
        if i == 0 or i == 37:
            assert 0 == len(bin)
        else:
            out = outcomes[i % 3]
            assert out in bin