revisions / additions / GOD DAMN IT
This commit is contained in:
@@ -6,21 +6,22 @@ class CAHClient:
|
||||
platform: str,
|
||||
csid: str,
|
||||
connected_at: int,
|
||||
current_game: str | None):
|
||||
players: list):
|
||||
self.resource: str = resource
|
||||
self.platform: str = platform
|
||||
self.csid: str = csid
|
||||
self.connected_at: int = connected_at
|
||||
self.current_game: str | None = current_game
|
||||
self.players: list = players
|
||||
|
||||
def __iter__(self):
|
||||
return [value for value in self.__dict__.values() if isinstance(value, int) or isinstance(value, float)].__iter__()
|
||||
|
||||
|
||||
class CAHGame:
|
||||
|
||||
def __init__(self,
|
||||
id: str,
|
||||
rounds: int,
|
||||
resources: list[dict],
|
||||
players: list[dict],
|
||||
created_at: int,
|
||||
state: int,
|
||||
@@ -29,6 +30,7 @@ class CAHGame:
|
||||
):
|
||||
self.id: str = id
|
||||
self.rounds: int = rounds
|
||||
self.resources: list[dict] = resources
|
||||
self.players: list[dict] = players
|
||||
self.created_at: int = created_at
|
||||
self.state: int = state
|
||||
@@ -37,4 +39,21 @@ class CAHGame:
|
||||
|
||||
def __iter__(self):
|
||||
return [value for value in self.__dict__.values() if isinstance(value, int) or isinstance(value, float)].__iter__()
|
||||
|
||||
class CAHPlayer:
|
||||
def __init__(self,
|
||||
id: str,
|
||||
current_game: CAHGame,
|
||||
platform: str,
|
||||
related_resource: str,
|
||||
joined_at: str,
|
||||
handle: str):
|
||||
self.id = id
|
||||
self.current_game = current_game
|
||||
self.platform = platform
|
||||
self.related_resource = related_resource
|
||||
self.joined_at = joined_at
|
||||
self.handle = handle
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user