echovr_api.game_state module¶
-
class
echovr_api.game_state.
GameState
(client_name=None, sessionid=None, match_type='INVALID GAMETYPE', map_name='INVALID LEVEL', private_match=False, tournament_match=False, game_clock_display=None, game_clock=None, game_status='unknown', possession=[], blue_points=0, orange_points=0, disc={}, last_score={}, teams=[])[source]¶ Bases:
object
Represents the current state of a game sesion.
Initialized using data directly from the Echo VR API. See the Echo VR API documentation for further details on the attributes associated with this class, and the expected intialization parameters.
Parameters: - client_name (
Optional
[str
]) – The username of the currently signed-in user. - sessionid (
Optional
[str
]) – A 128-bit string-encoded GUID. - match_type (
str
) – Represents the type of match being played. - map_name (
str
) – Represents the current “map” (environment) the user is playing in. - private_match (
bool
) – Whether the current session is a private match. - tournament_match (
bool
) – Whether the current session is being used for an official tournament. - game_clock_display (
Optional
[str
]) – A human-readable representation of the current game clock time. - game_clock (
Optional
[float
]) – The current game clock time, in seconds. - game_status (
str
) – The current game’s status. - possession (
List
[int
]) – An arry of two integers representing which team currently posesses the disk. - blue_points (
int
) – The current score of the blue team. - orange_points (
int
) – The current score of the orange team. - disc (
dict
) – A dict representing the current state of the disk. - last_score (
dict
) – A dict containing facts and statistics related to the last goal scored. - teams (
List
[dict
]) – An array of dicts containing data used to instantiate the game’s two teams.
Raises: InvalidGameStateError – Raised when you attempt to initialize the game into a state that doesn’t make sense (such as having three teams).
-
blue_points
= None¶ The current score of the blue team.
-
client_name
= None¶ The username of the currently signed-in user.
-
find_player
(username=None)[source]¶ Find the
Player
with the given propertiesReturns the player whose attributes match the given properties, or
None
if no match is found.Parameters: username ( Optional
[str
]) – The username of the Player
-
find_team
(color=None)[source]¶ Find the
Team
with the given propertiesReturns the team whose attributes match the given properties, or
None
if no match is found.Parameters: color ( Optional
[str
]) – TheColor
of the Team
-
game_clock
= None¶ The current game clock time, in seconds.
-
game_clock_display
= None¶ A human-readable representation of the current game clock time.
-
game_status
= None¶ The current game’s status.
-
last_score
= None¶ A
ContextualizedLastScore
object containing facts and statistics related to the last goal scored.
-
map_name
= None¶ Represents the current “map” (environment) the user is playing in.
-
match_type
= None¶ Represents the type of match being played.
-
orange_points
= None¶ The current score of the orange team.
-
possession
= None¶ An arry of two integers representing which team currently posesses the disk.
-
private_match
= None¶ Whether the current session is a private match.
-
sessionid
= None¶ A 128-bit string-encoded GUID.
-
tournament_match
= None¶ Whether the current session is being used for an official tournament.
- client_name (