Game

class games.stardash.game.Game

Bases: joueur.base_game.BaseGame

The class representing the Game in the Stardash game.

Collect of the most of the rarest mineral orbiting around the sun and out-compete your competitor.

property bodies

All the celestial bodies in the game. The first two are planets and the third is the sun. The fourth is the VP asteroid. Everything else is normal asteroids.

Type

list[games.stardash.body.Body]

property current_player

The player whose turn it is currently. That player can send commands. Other players cannot.

Type

games.stardash.player.Player

property current_turn

The current turn number, starting at 0 for the first player’s turn.

Type

int

property dash_cost

The cost of dashing.

Type

int

property dash_distance

The distance traveled each turn by dashing.

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.stardash.game_object.GameObject]

property genarium_value

The value of every unit of genarium.

Type

float

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 jobs

A list of all jobs. The first element is corvette, second is missileboat, third is martyr, fourth is transport, and fifth is miner.

Type

list[games.stardash.job.Job]

property legendarium_value

The value of every unit of legendarium.

Type

float

property max_asteroid

The highest amount of material, that can be in a asteroid.

Type

int

property max_turns

The maximum number of turns before the game will automatically end.

Type

int

property min_asteroid

The smallest amount of material, that can be in a asteroid.

Type

int

property mining_speed

The rate at which miners grab minerals from asteroids.

Type

int

property mythicite_amount

The amount of mythicite that spawns at the start of the game.

Type

float

property orbits_protected

The number of orbit updates you cannot mine the mithicite asteroid.

Type

int

property ore_rarity_genarium

The rarity modifier of the most common ore. This controls how much spawns.

Type

float

property ore_rarity_legendarium

The rarity modifier of the rarest ore. This controls how much spawns.

Type

float

property ore_rarity_rarium

The rarity modifier of the second rarest ore. This controls how much spawns.

Type

float

property planet_energy_cap

The amount of energy a planet can hold at once.

Type

int

property planet_recharge_rate

The amount of energy the planets restore each round.

Type

int

property players

List of all the players in the game.

Type

list[games.stardash.player.Player]

property projectile_radius

The standard size of ships.

Type

int

property projectile_speed

The amount of distance missiles travel through space.

Type

int

property projectiles

Every projectile in the game.

Type

list[games.stardash.projectile.Projectile]

property rarium_value

The value of every unit of rarium.

Type

float

property regenerate_rate

The regeneration rate of asteroids.

Type

float

property session

A unique identifier for the game instance that is being played.

Type

str

property ship_radius

The standard size of ships.

Type

int

property size_x

The size of the map in the X direction.

Type

int

property size_y

The size of the map in the Y direction.

Type

int

property time_added_per_turn

The amount of time (in nano-seconds) added after each player performs a turn.

Type

int

property turns_to_orbit

The number of turns it takes for a asteroid to orbit the sun. (Asteroids move after each players turn).

Type

int

property units

Every Unit in the game.

Type

list[games.stardash.unit.Unit]