Exemple #1
0
def test_correctly_sized_hand_is_complete(hand_with_simple_runs):
    md = MeldDetector(*hand_with_simple_runs.cards) # 10 cards
    assert(md.is_complete_hand == True)
    md.add(Card(rank=Rank.SIX, suit=Suit.CLUB)) # 11 is ok, too
    assert(md.is_complete_hand == True)
Exemple #2
0
def test_add_clears_detect_flag(hand_with_simple_runs):
    md = MeldDetector(*hand_with_simple_runs.cards)
    md._detect_all_melds()
    md.add(Card(rank=Rank.SIX, suit=Suit.CLUB))
    assert(md._detected == False)