This came up in the testing for #29 with the original version of strategy.
If the point is on 9 and a player has these bets on the table:
[Place8(bet_amount=6.0), Come(bet_amount=5.0, point=5), Come(bet_amount=5.0, point=6)]
and place68_2come is run, no bets get placed.
This is because the current_numbers is set by
current_numbers = []
for bet in player.bets_on_table:
current_numbers += bet.winning_numbers
current_numbers = list(set(current_numbers))
making the current_numbers [8, 5, 6]. Correctly (in my opinion) no additional Place bet is placed, as both 6 and 8 are in current_numbers:
if table.point == "On" and len(player.bets_on_table) < 4:
# always place 6 and 8 when they aren't come bets or place bets already
if 6 not in current_numbers:
player.bet(Place6(6 / 5 * unit))
if 8 not in current_numbers:
player.bet(Place8(6 / 5 * unit))
No additional Come bet gets placed in this block, as there are already 2 come bets:
if player.num_bet("Come", "PassLine") < 2 and len(player.bets_on_table) < 4:
if table.point == "On":
player.bet(Come(unit))
if table.point == "Off" and (
player.has_bet("Place6") or player.has_bet("Place8")
):
player.bet(PassLine(unit))
This block I believe incorrectly sets the pass_come_winning_numbers to [5] since player.get_bet("Come", "Any").winning_numbers only returns a single bet, in this case the Come(bet_amount=5, point=5). I would think it was expected to return [5, 6] but since only one come bet is retrieved from get_bet it only gets the [5].
# if come bet or passline goes to 6 or 8, move place bets to 5 or 9
pass_come_winning_numbers = []
if player.has_bet("PassLine"):
pass_come_winning_numbers += player.get_bet("PassLine").winning_numbers
if player.has_bet("Come"):
pass_come_winning_numbers += player.get_bet("Come", "Any").winning_numbers
This mean that the block below never gets hit and a Place5 or Place9 never gets placed as a replacement for the Place6.
if 6 in pass_come_winning_numbers:
if player.has_bet("Place6"):
player.remove(player.get_bet("Place6"))
if 5 not in current_numbers:
player.bet(Place5(unit))
elif 9 not in current_numbers:
player.bet(Place9(unit))
elif 8 in pass_come_winning_numbers:
if player.has_bet("Place8"):
player.remove(player.get_bet("Place8"))
if 5 not in current_numbers:
player.bet(Place5(unit))
elif 9 not in current_numbers:
player.bet(Place9(unit))
I believe that the correct outcome of this should be that the pass_come_winning_numbers is [5, 6] and that the final bets on the table would correctly be:
[Place8(bet_amount=6.0), Come(bet_amount=5.0, point=5), Come(bet_amount=5.0, point=6), Place9(bet_amount=6.0)]
This came up in the testing for #29 with the original version of strategy.
If the point is on 9 and a player has these bets on the table:
and place68_2come is run, no bets get placed.
This is because the current_numbers is set by
making the current_numbers [8, 5, 6]. Correctly (in my opinion) no additional Place bet is placed, as both 6 and 8 are in current_numbers:
No additional Come bet gets placed in this block, as there are already 2 come bets:
This block I believe incorrectly sets the pass_come_winning_numbers to [5] since player.get_bet("Come", "Any").winning_numbers only returns a single bet, in this case the Come(bet_amount=5, point=5). I would think it was expected to return [5, 6] but since only one come bet is retrieved from get_bet it only gets the [5].
This mean that the block below never gets hit and a Place5 or Place9 never gets placed as a replacement for the Place6.
I believe that the correct outcome of this should be that the pass_come_winning_numbers is [5, 6] and that the final bets on the table would correctly be: