def test_comparison_of_cards3(): card1 = lapi.Card('b', 10) card2 = lapi.Card('o', 6) card3 = lapi.Card('b', 1) card4 = lapi.Card('e', 12) showcard = lapi.Card('b', 2) assert lapi.compare_cards([card1, card2, card3, card4], showcard) == card3
def test_comparison_of_cards7(): showcard = lapi.Card('c', 3) card1 = lapi.Card('c', 4) card2 = lapi.Card('c', 5) card3 = lapi.Card('c', 6) card4 = lapi.Card('c', 9) assert lapi.compare_cards([card1, card2, card3, card4], showcard) == card4
def test_comparison_of_cards6(): showcard = lapi.Card('c', 3) card1 = lapi.Card('c', 2) card2 = lapi.Card('c', 12) card3 = lapi.Card('c', 7) card4 = lapi.Card('c', 6) assert lapi.compare_cards([card1, card2, card3, card4], showcard) == card3
def test_comparison_of_cards5(): showcard = lapi.Card('o', 1) card1 = lapi.Card('e', 3) card2 = lapi.Card('e', 1) card3 = lapi.Card('o', 3) card4 = lapi.Card('o', 7) # Here, card4 should win, because it is playing as the ('o', 1). assert lapi.compare_cards([card1, card2, card3, card4], showcard) == card4
def test_is_card_playable8(): showcard = lapi.Card('o', 2) rh_card = lapi.Card('b', 6) past_cards = [rh_card] hand = [lapi.Card('e', 5), lapi.Card('o', 1), lapi.Card('b', 4)] assert not lapi.is_card_playable(lapi.Card('o', 1), hand, showcard, past_cards)
def test_comparison_of_cards1(): card1 = lapi.Card('o', 3) card2 = lapi.Card('o', 6) showcard = lapi.Card('o', 1) assert lapi.compare_cards([card1, card2], showcard) == card1
def test_compare_cards_for_equality2(): card1 = lapi.Card('e', 3) card2 = lapi.Card('e', 3) assert card1 == card2
def test_is_card_playable7(): showcard = lapi.Card('e', 5) rh_card = lapi.Card('o', 10) past_cards = [rh_card, lapi.Card('e', 1)] hand = [lapi.Card('c', 4), lapi.Card('e', 8), lapi.Card('c', 3)] assert lapi.is_card_playable(lapi.Card('e', 8), hand, showcard, past_cards)
def test_is_card_playable5(): showcard = lapi.Card('e', 5) rh_card = lapi.Card('o', 10) hand = [lapi.Card('o', 4), lapi.Card('e', 8), lapi.Card('o', 5)] assert lapi.is_card_playable(lapi.Card('o', 4), hand, showcard, [rh_card])
def test_is_card_playable4(): showcard = lapi.Card('c', 3) rh_card = lapi.Card('o', 5) hand = [lapi.Card('o', 4), lapi.Card('b', 7), lapi.Card('o', 1)] assert lapi.is_card_playable(lapi.Card('o', 1), hand, showcard, [rh_card])