top/fix-split (#205)

Fixes the split issue, accidentally allowed split on suit instead of rank. Thought this was originally implemented [rank, value] not [rank, suit]. Well luckily this was built with a function for this

Co-authored-by: Chuck <dude@bussy.com>
Reviewed-on: #205
Co-authored-by: top <top@noreply.fsdfsd.net>
Co-committed-by: top <top@noreply.fsdfsd.net>
pull/209/head
top 2023-09-26 10:00:20 +00:00 committed by Aevann
parent 64f8be2213
commit d0ef9768ed
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ def can_double_down(state):
def can_split(state):
player = state['player']
player_never_hit = len(player) == 2
hand_can_split = player[0][1] == player[1][1]
hand_can_split = get_value_of_card(player[0]) == get_value_of_card(player[1])
player_has_split = state['has_player_split']
return hand_can_split and player_never_hit and not player_has_split