Game¶
-
class
games.anarchy.game.
Game
¶ Bases:
joueur.base_game.BaseGame
The class representing the Game in the Anarchy game.
Two player grid based game where each player tries to burn down the other player’s buildings. Let it burn.
-
property
base_bribes_per_turn
¶ How many bribes players get at the beginning of their turn, not counting their burned down Buildings.
- Type
int
-
property
buildings
¶ All the buildings in the game.
- Type
-
property
current_forecast
¶ The current Forecast, which will be applied at the end of the turn.
-
property
current_player
¶ The player whose turn it is currently. That player can send commands. Other players cannot.
-
property
current_turn
¶ The current turn number, starting at 0 for the first player’s turn.
- Type
int
-
property
forecasts
¶ All the forecasts in the game, indexed by turn number.
- Type
-
property
game_objects
¶ A mapping of every game object’s ID to the actual game object. Primarily used by the server and client to easily refer to the game objects via ID.
- Type
dict[str, games.anarchy.game_object.GameObject]
-
get_game_object
(id: str) → Optional[joueur.base_game_object.BaseGameObject]¶ gets the game object with the given id, or None
- Returns
BaseGameObject in the game with the given id, or None if not found
-
property
map_height
¶ The width of the entire map along the vertical (y) axis.
- Type
int
-
property
map_width
¶ The width of the entire map along the horizontal (x) axis.
- Type
int
-
property
max_fire
¶ The maximum amount of fire value for any Building.
- Type
int
-
property
max_forecast_intensity
¶ The maximum amount of intensity value for any Forecast.
- Type
int
-
property
max_turns
¶ The maximum number of turns before the game will automatically end.
- Type
int
-
property
next_forecast
¶ The next Forecast, which will be applied at the end of your opponent’s turn. This is also the Forecast WeatherStations can control this turn.
- Type
games.anarchy.forecast.Forecast or None
-
property
players
¶ List of all the players in the game.
- Type
-
property
session
¶ A unique identifier for the game instance that is being played.
- Type
str
-
property
time_added_per_turn
¶ The amount of time (in nano-seconds) added after each player performs a turn.
- Type
int
-
property