def test_flip_reserve(): (hand, reserve) = ([], [(2,), (5,), (11,)]) (n_hand, n_reserve) = cards.flip_reserve(hand, reserve) assert len(n_hand) == 3 assert n_reserve == [] assert hand != n_hand assert reserve != n_reserve
def test_flip_reserve(): (hand, reserve) = ([], [(2, ), (5, ), (11, )]) (n_hand, n_reserve) = cards.flip_reserve(hand, reserve) assert len(n_hand) == 3 assert n_reserve == [] assert hand != n_hand assert reserve != n_reserve
def flip_if_needed(player, n=1): (hand, reserve) = player if len(hand) < n: (hand, reserve) = cards.flip_reserve(hand, reserve) return (hand, reserve)