summaryrefslogtreecommitdiff
path: root/CAO_GameManager.py
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-06-04 00:13:55 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-06-04 00:14:21 +0100
commit1ee77bcb1df495f52aa7633a3d857db19720bbea (patch)
tree55ccc4420617404605f2a9c5bcdb9d3e6397f6a0 /CAO_GameManager.py
parent22eb778c4f05429dc593c69a60018860024ec56f (diff)
the version version which seems to work correctly
the main file of the project is useless tho for now on Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'CAO_GameManager.py')
-rw-r--r--CAO_GameManager.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/CAO_GameManager.py b/CAO_GameManager.py
new file mode 100644
index 0000000..afd7f09
--- /dev/null
+++ b/CAO_GameManager.py
@@ -0,0 +1,18 @@
+from CAO_Game import CAO_Game
+from CAO_Cards import CAO_Cards
+
+class CAO_GameManager():
+ def __init__(self):
+ self.games = {}
+
+ self.black_cards = CAO_Cards.get_black_cards()
+ self.white_cards = CAO_Cards.get_white_cards()
+
+ def join_game(self, game_name):
+ game = self.games.get(game_name)
+
+ if game is None:
+ print('Starting new game')
+ game = self.games[game_name] = CAO_Game(self.black_cards, self.white_cards)
+
+ return game