Game

class games.coreminer.game.Game

Bases: joueur.base_game.BaseGame

The class representing the Game in the Coreminer game.

Mine resources to obtain more value than your opponent.

property bomb_price

The monetary price of a bomb when bought or sold.

Type

int

property bomb_size

The amount of cargo space taken up by a Bomb.

Type

int

property bombs

Every Bomb in the game.

Type

list[games.coreminer.bomb.Bomb]

property building_material_price

The monetary price of building materials when bought.

Type

int

property current_player

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

Type

games.coreminer.player.Player

property current_turn

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

Type

int

property dirt_price

The monetary price of dirt when bought or sold.

Type

int

property fall_damage

The amount of damage taken per Tile fallen.

Type

int

property fall_weight_damage

The amount of extra damage taken for falling while carrying a large amount of cargo.

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.coreminer.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.coreminer.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.coreminer.tile.Tile or None

property ladder_cost

The amount of building material required to build a ladder.

Type

int

property ladder_health

The amount of mining power needed to remove a ladder from a Tile.

Type

int

property large_cargo_size

The amount deemed as a large amount of cargo.

Type

int

property large_material_size

The amount deemed as a large amount of material.

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_shielding

The maximum amount of shielding possible on a Tile.

Type

int

property max_turns

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

Type

int

property max_upgrade_level

The highest upgrade level allowed on a Miner.

Type

int

property miners

Every Miner in the game.

Type

list[games.coreminer.miner.Miner]

property ore_price

The amount of money awarded when ore is dumped in the base and sold.

Type

int

property ore_value

The amount of value awarded when ore is dumped in the base and sold.

Type

int

property players

List of all the players in the game.

Type

list[games.coreminer.player.Player]

property session

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

Type

str

property shield_cost

The amount of building material required to shield a Tile.

Type

int

property shield_health

The amount of mining power needed to remove one unit of shielding off a Tile.

Type

int

property spawn_price

The monetary price of spawning a Miner.

Type

int

property suffocation_damage

The amount of damage taken when suffocating inside a filled Tile.

Type

int

property suffocation_weight_damage

The amount of extra damage taken for suffocating under a large amount of material.

Type

int

property support_cost

The amount of building material required to build a support.

Type

int

property support_health

The amount of mining power needed to remove a support from a Tile.

Type

int

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.coreminer.tile.Tile]

property time_added_per_turn

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

Type

float

property upgrade_price

The cost to upgrade a Miner.

Type

int

property upgrades

Every Upgrade for a Miner in the game.

Type

list[games.coreminer.upgrade.Upgrade]

property victory_amount

The amount of victory points (value) required to win.

Type

int