summaryrefslogtreecommitdiff
path: root/swiftstory/game_manager.py
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2021-12-29 19:21:45 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2021-12-29 20:06:14 +0100
commit741f8234edde84dccefcbf5dc0ba3b70c0e016e2 (patch)
treec6207bfd9c20eeac59bea2ffef5d4fad70108c29 /swiftstory/game_manager.py
parentf5edd5035d06adc7b6bceb1f521b4911706cde0b (diff)
Add docstrings to all modules
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'swiftstory/game_manager.py')
-rw-r--r--swiftstory/game_manager.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/swiftstory/game_manager.py b/swiftstory/game_manager.py
index 56279a6..aa951f5 100644
--- a/swiftstory/game_manager.py
+++ b/swiftstory/game_manager.py
@@ -1,3 +1,6 @@
+""" Module defining a class to store the games/rooms in the different
+languages. """
+
from dataclasses import dataclass
import logging
from typing import Dict, List
@@ -10,7 +13,7 @@ from swiftstory.cards import Cards
class NoSuchGameError(Exception):
- """ Exception to be raised when no game is found matching the criterias.
+ """ Exception to be raised when no game is found matching the criterion.
"""
def __init__(self, message: str = "", game_name: str = "", lang: str = "") -> None:
self.game_name = game_name
@@ -20,14 +23,14 @@ class NoSuchGameError(Exception):
@dataclass
class LangContainer:
- """ Container for game ojects in a given language. """
+ """ Container for game objects in a given language. """
black_cards: List[str]
white_cards: List[str]
games: Dict[str, Game]
class GameManager:
-
+ """ Store the different rooms/games of the different languages. """
def __init__(self) -> None:
self.lang_containers: Dict[str, LangContainer] = {}