Store game state
This commit is contained in:
parent
015456bb6f
commit
d425426c42
|
@ -11,6 +11,12 @@ class Room(Enum):
|
||||||
C = 'C'
|
C = 'C'
|
||||||
|
|
||||||
|
|
||||||
|
class GameState(Enum):
|
||||||
|
PREPARING = 0
|
||||||
|
VOTING = 1
|
||||||
|
RESULTS = 2
|
||||||
|
|
||||||
|
|
||||||
class Vote(Enum):
|
class Vote(Enum):
|
||||||
ALLY = 'A'
|
ALLY = 'A'
|
||||||
BETRAY = 'B'
|
BETRAY = 'B'
|
||||||
|
@ -101,6 +107,7 @@ class Round:
|
||||||
class Game:
|
class Game:
|
||||||
INSTANCE: ClassVar["Game"] = None
|
INSTANCE: ClassVar["Game"] = None
|
||||||
|
|
||||||
|
state: GameState = GameState.PREPARING
|
||||||
rounds: list[Round] = field(default_factory=list)
|
rounds: list[Round] = field(default_factory=list)
|
||||||
players: dict[str, Player] = field(default_factory=dict)
|
players: dict[str, Player] = field(default_factory=dict)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue