mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
test and fix splitting
This commit is contained in:
@@ -54,7 +54,7 @@ class Hand
|
||||
def split
|
||||
throw "can't split" unless can_split?
|
||||
[
|
||||
Hand.new(@bet, @cards[0..1], is_split_hand: true),
|
||||
Hand.new(@bet, @cards[0...1], is_split_hand: true),
|
||||
Hand.new(@bet, @cards[1..1], is_split_hand: true)
|
||||
]
|
||||
end
|
||||
|
||||
@@ -13,6 +13,7 @@ class Pack
|
||||
end
|
||||
|
||||
def draw
|
||||
reshuffle_if_necessary
|
||||
@cards.pop
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user