Your problem occurs on this step:
hit_or_stay(hand_two)
When you hit on hand_two, your code does this:
deal_one_card(person)
value_of_current_cards(person)
number_value_of_hand()
The problem is right there, because number_value_of_hand()
brings you back to the beginning of that function, and goes through the hand_one options again.
You will probably have to rewrite your number_value_of_hand()
function to include an argument that tells it where to begin (hand_one, hand_two, etc.)
I would probably make a list
of hands, and iterate through the list. Then, you could call number_of_hands(hands[i])
to being at the i
th hand.