diff --git a/game.py b/game.py index cb79fed..b765a52 100644 --- a/game.py +++ b/game.py @@ -96,8 +96,10 @@ class Series(): class Round(): def __init__(self, round_number: int, first_player: int, cards: []=cards, shuffler = shuffle): # vyrob kopku pre toto kolo a priprav prazdne objekty - if not 0 <= round_number < 8: - raise BridzikException('Round number has to be between 0 and 7.') + if round_number not in [i for i in range(8)]: + raise BridzikException('Neplatne cislo kola.') + if first_player not in [0, 1, 2, 3]: + raise BridzikException('Cislo hraca musi byt 0, 1, 2 alebo 3.') self.round_number = round_number self.first_player = first_player self.deal_starting_cards(cards, shuffler)