Skip to content
Gabriël edited this page Nov 1, 2021 · 4 revisions

The Game class holds all information on a game: The process, stats and more. You don't have to create your own instances.

Properties

  • statistics: GameStats - Alias for Game.stats
  • scores: List[int] - Alias for Game.stats.scores. Returns a list of the current score for all players.

Fields

  • name: str - The custom name for this game. Used only for user reference.
  • status: GameStatus - The current status of this game. For more information, see GameStatus.
  • stats: GameStats - Not to be confused with Game.status (that's why the alias Game.statistics exists), this holds the stats for every player. Updated every real-time second by the Launcher.

Functions

Game(name, debug) - Instantiate a new instance of this class.

Required Parameters

  • name: str - A custom name for this game, used for user reference.

Optional Parameters

  • debug: bool = False - Whether to print debug statements to the console. Usually set by the Launcher that creates this game instance.

Returns

An new instance of the Game class.


Game.kill() - Kills the game process.

Returns

Nothing.

Clone this wiki locally