From 32ab6a3127d15de2cfc3a594aa4e0d6f9aa9c784 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Sat, 24 Jan 2015 21:51:33 +0000 Subject: [PATCH] blackjack: fix splitting on different 10 valued card It was using the first card twice, which wasn't quite correct, tough only cosmetic --- tipbot/modules/blackjack.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tipbot/modules/blackjack.py b/tipbot/modules/blackjack.py index df9a6d9..b2c0d2b 100644 --- a/tipbot/modules/blackjack.py +++ b/tipbot/modules/blackjack.py @@ -834,10 +834,11 @@ def Split(link,cmd): players[identity]['amount'] = players[identity]['amount'] + players[identity]['base_amount'] RecordMove(link,"split") log_log('splitting hand %d' % idx) - split_card = hand[0] + split_card_0 = hand[0] + split_card_1 = hand[1] players[identity]['player_hands'].insert(idx+1,players[identity]['player_hands'][idx].copy()) - players[identity]['player_hands'][idx]['hand'] = [ split_card, DrawCard(players[identity]['deck']) ] - players[identity]['player_hands'][idx+1]['hand'] = [ split_card, DrawCard(players[identity]['deck']) ] + players[identity]['player_hands'][idx]['hand'] = [ split_card_0, DrawCard(players[identity]['deck']) ] + players[identity]['player_hands'][idx+1]['hand'] = [ split_card_1, DrawCard(players[identity]['deck']) ] sidebets = players[identity]['sidebets'] if sidebets['splits']: