Game¶
-
class
games.stumped.game.
Game
¶ Bases:
joueur.base_game.BaseGame
The class representing the Game in the Stumped game.
Gather branches and build up your lodge as beavers fight to survive.
-
property
beavers
¶ Every Beaver in the game.
- Type
-
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
free_beavers_count
¶ When a Player has less Beavers than this number, then recruiting other Beavers is free.
- Type
int
-
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.stumped.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
-
get_tile_at
(x: int, y: int) → Optional[games.stumped.tile.Tile]¶ Gets the Tile at a specified (x, y) position.
- Parameters
x (int) – An integer between 0 and the map_width.
y (int) – An integer between 0 and the map_height.
- Returns
The Tile at (x, y) or None if out of bounds.
- Return type
games.stumped.tile.Tile or None
-
property
jobs
¶ All the Jobs that Beavers can have in the game.
- Type
list[games.stumped.job.Job]
-
property
lodge_cost_constant
¶ Constant number used to calculate what it costs to spawn a new lodge.
- Type
float
-
property
lodges_to_win
¶ How many lodges must be owned by a Player at once to win the game.
- Type
int
-
property
map_height
¶ The number of Tiles in the map along the y (vertical) axis.
- Type
int
-
property
map_width
¶ The number of Tiles in the map along the x (horizontal) axis.
- Type
int
-
property
max_turns
¶ The maximum number of turns before the game will automatically end.
- Type
int
-
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
spawner
¶ Every Spawner in the game.
- Type
-
property
spawner_harvest_constant
¶ Constant number used to calculate how many branches/food Beavers harvest from Spawners.
- Type
float
-
property
spawner_types
¶ All the types of Spawners in the game.
- Type
list[str]
-
property
tiles
¶ All the tiles in the map, stored in Row-major order. Use x + y * mapWidth to access the correct index.
- Type
list[games.stumped.tile.Tile]
-
property
time_added_per_turn
¶ The amount of time (in nano-seconds) added after each player performs a turn.
- Type
int
-
property