Skip to content

Commit

Permalink
fix default card range
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorapower committed Feb 22, 2024
1 parent 9af57a7 commit 22d6dfb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/uno/engine/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@


class Rule:
"""
The rule is responsible for the game logic.
It should contain no information related the game state and only have methods to manipulate it.
But rules can have variants which can be passed as parameters to the constructor.
"""
def init_game(self, ctx: Context):
raise NotImplementedError

Expand All @@ -16,9 +21,11 @@ def is_over(self, ctx: Context):


class ExampleRule(Rule):
"""Similar to UNO but simplified to have no action cards etc."""
"""
Similar to UNO but simplified to have no action cards etc.
"""
COLORS: ClassVar[tuple[str, ...]] = ('red', 'blue', 'green', 'yellow')
NUMBERS: ClassVar[tuple[int, ...]] = tuple(range(10))
NUMBERS: ClassVar[tuple[int, ...]] = tuple(range(8))
HAND_SIZE: ClassVar[int] = 7

rng: random.Random
Expand Down

0 comments on commit 22d6dfb

Please # to comment.