def test_is_slap_sandwich_slap(self): game = Egrt(0.5) game.prev_card = Card(Rank.SEVEN, Suit.CLUB) game.top_card = Card(Rank.SIX, Suit.DIAMOND) self.assertTrue(game.is_slap(Card(Rank.SIX, Suit.HEART)))
def test_is_slap_yes_is_slap(self): game = Egrt(0.5) game.prev_card = Card(Rank.ACE, Suit.CLUB) game.top_card = Card(Rank.QUEEN, Suit.DIAMOND) self.assertTrue(game.is_slap(Card(Rank.ACE, Suit.HEART)))
def test_is_slap_not_a_slap(self): game = Egrt(0.5) game.prev_card = Card(Rank.SEVEN, Suit.CLUB) game.top_card = Card(Rank.SIX, Suit.DIAMOND) self.assertFalse(game.is_slap(Card(Rank.FIVE, Suit.HEART)))
def test_is_slap_single_card_in_pile(self): game = Egrt(0.5) game.top_card = Card(Rank.JACK, Suit.DIAMOND) self.assertTrue(game.is_slap(Card(Rank.JACK, Suit.HEART)))
def test_is_slap_empty_pile(self): game = Egrt(0.5) self.assertFalse(game.is_slap(Card(Rank.FIVE, Suit.CLUB)))
def test_is_slap_king_queen_sandwich(self): game = Egrt(0.5) game.prev_card = Card(Rank.QUEEN, Suit.DIAMOND) game.top_card = Card(Rank.SIX, Suit.DIAMOND) self.assertFalse(game.is_slap(Card(Rank.KING, Suit.SPADE)))