# Path: mau_mau/rules.py
# class MauMau:
#     SPECIAL_RULES = {
#         DECK.SEVEN: MakePlayerDrawTwoCards,
#         DECK.EIGHT: SkipNextPlayer,
#         DECK.JACK: DemandWantedSuit,
#     }
# 
#     def __init__(self, cardsPerPlayer=5):
#         self.cardsPerPlayer = cardsPerPlayer
# 
#     def __repr__(self):
#         name = self.__class__.__name__
#         return f"{name}({self.cardsPerPlayer})"
# 
#     @classmethod
#     def get_rule(cls, card):
#         RuleClass = cls.SPECIAL_RULES.get(card.value, BasicRule)
#         return RuleClass(card, cls)
# 
#     @staticmethod
#     def find_playable_cards(upcard, cards):
#         """Determines when a card is playable on the upcard"""
#         return [
#             c
#             for c in cards
#             if upcard.value == c.value
#             or upcard.suit == c.suit
#             or c.value == DECK.JACK
#         ]
# 
#     @staticmethod
#     def no_play_action(player, table):
#         """Determines what a player has to do, if they don't play a card.
# 
#         :player Player: player that can't play
#         :table Table: The game table
#         """
#         player.draw(table)
# 
#     @staticmethod
#     def wins(cards):
#         return cards is not None and len(cards) == 0


from mau_mau.rules import MauMau


def test_no_hand_is_not_a_winner_hand():
    assert not MauMau.wins(None)


def test_non_empty_hand_is_not_a_winner_hand():
    assert not MauMau.wins([1])

# Path: mau_mau/rules.py
# class MauMau:
#     SPECIAL_RULES = {
#         DECK.SEVEN: MakePlayerDrawTwoCards,
#         DECK.EIGHT: SkipNextPlayer,
#         DECK.JACK: DemandWantedSuit,
#     }
# 
#     def __init__(self, cardsPerPlayer=5):
#         self.cardsPerPlayer = cardsPerPlayer
# 
#     def __repr__(self):
#         name = self.__class__.__name__
#         return f"{name}({self.cardsPerPlayer})"
# 
#     @classmethod
#     def get_rule(cls, card):
#         RuleClass = cls.SPECIAL_RULES.get(card.value, BasicRule)
#         return RuleClass(card, cls)
# 
#     @staticmethod
#     def find_playable_cards(upcard, cards):
#         """Determines when a card is playable on the upcard"""
#         return [
#             c
#             for c in cards
#             if upcard.value == c.value
#             or upcard.suit == c.suit
#             or c.value == DECK.JACK
#         ]
# 
#     @staticmethod
#     def no_play_action(player, table):
#         """Determines what a player has to do, if they don't play a card.
# 
#         :player Player: player that can't play
#         :table Table: The game table
#         """
#         player.draw(table)
# 
#     @staticmethod
#     def wins(cards):
#         return cards is not None and len(cards) == 0


# Path: tests/test_rules.py
from mau_mau.rules import MauMau



def test_no_hand_is_not_a_winner_hand():
    assert not MauMau.wins(None)


def test_non_empty_hand_is_not_a_winner_hand():
    assert not MauMau.wins([1])

    assert not MauMau.wins([1, 2])