C++ Joueur Client
 All Classes Namespaces Functions Variables
cpp_client::coreminer::Game Class Reference

Mine resources to obtain more value than your opponent. More...

#include <game.hpp>

Inheritance diagram for cpp_client::coreminer::Game:

Public Member Functions

Tile get_tile_at (const int x, const int y)
 Gets the Tile at a specified (x, y) position More...
 

Public Attributes

const int & bomb_price
 The monetary price of a bomb when bought or sold. More...
 
const int & bomb_size
 The amount of cargo space taken up by a Bomb. More...
 
const std::vector< Bomb > & bombs
 Every Bomb in the game. More...
 
const int & building_material_price
 The monetary price of building materials when bought. More...
 
const Playercurrent_player
 The player whose turn it is currently. That player can send commands. Other players cannot. More...
 
const int & current_turn
 The current turn number, starting at 0 for the first player's turn. More...
 
const int & dirt_price
 The monetary price of dirt when bought or sold. More...
 
const int & fall_damage
 The amount of damage taken per Tile fallen. More...
 
const int & fall_weight_damage
 The amount of extra damage taken for falling while carrying a large amount of cargo. More...
 
const std::unordered_map
< std::string, Game_object > & 
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. More...
 
const int & ladder_cost
 The amount of building material required to build a ladder. More...
 
const int & ladder_health
 The amount of mining power needed to remove a ladder from a Tile. More...
 
const int & large_cargo_size
 The amount deemed as a large amount of cargo. More...
 
const int & large_material_size
 The amount deemed as a large amount of material. More...
 
const int & map_height
 The number of Tiles in the map along the y (vertical) axis. More...
 
const int & map_width
 The number of Tiles in the map along the x (horizontal) axis. More...
 
const int & max_shielding
 The maximum amount of shielding possible on a Tile. More...
 
const int & max_turns
 The maximum number of turns before the game will automatically end. More...
 
const int & max_upgrade_level
 The highest upgrade level allowed on a Miner. More...
 
const std::vector< Miner > & miners
 Every Miner in the game. More...
 
const int & ore_price
 The amount of money awarded when ore is dumped in the base and sold. More...
 
const int & ore_value
 The amount of value awarded when ore is dumped in the base and sold. More...
 
const std::vector< Player > & players
 List of all the players in the game. More...
 
const std::string & session
 A unique identifier for the game instance that is being played. More...
 
const int & shield_cost
 The amount of building material required to shield a Tile. More...
 
const int & shield_health
 The amount of mining power needed to remove one unit of shielding off a Tile. More...
 
const int & spawn_price
 The monetary price of spawning a Miner. More...
 
const int & suffocation_damage
 The amount of damage taken when suffocating inside a filled Tile. More...
 
const int & suffocation_weight_damage
 The amount of extra damage taken for suffocating under a large amount of material. More...
 
const int & support_cost
 The amount of building material required to build a support. More...
 
const int & support_health
 The amount of mining power needed to remove a support from a Tile. More...
 
const std::vector< Tile > & tiles
 All the tiles in the map, stored in Row-major order. Use x + y * mapWidth to access the correct index. More...
 
const double & time_added_per_turn
 The amount of time (in nano-seconds) added after each player performs a turn. More...
 
const int & upgrade_price
 The cost to upgrade a Miner. More...
 
const std::vector< Upgrade > & upgrades
 Every Upgrade for a Miner in the game. More...
 
const int & victory_amount
 The amount of victory points (value) required to win. More...
 

Detailed Description

Mine resources to obtain more value than your opponent.

Member Function Documentation

Tile cpp_client::coreminer::Game::get_tile_at ( const int  x,
const int  y 
)

Gets the Tile at a specified (x, y) position

Parameters
xinteger between 0 and the mapWidth
yinteger between 0 and the mapHeight
Returns
the Tile at (x, y) or null if out of bounds

Member Data Documentation

const int& cpp_client::coreminer::Game::bomb_price

The monetary price of a bomb when bought or sold.

const int& cpp_client::coreminer::Game::bomb_size

The amount of cargo space taken up by a Bomb.

const std::vector<Bomb>& cpp_client::coreminer::Game::bombs

Every Bomb in the game.

const int& cpp_client::coreminer::Game::building_material_price

The monetary price of building materials when bought.

const Player& cpp_client::coreminer::Game::current_player

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

const int& cpp_client::coreminer::Game::current_turn

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

const int& cpp_client::coreminer::Game::dirt_price

The monetary price of dirt when bought or sold.

const int& cpp_client::coreminer::Game::fall_damage

The amount of damage taken per Tile fallen.

const int& cpp_client::coreminer::Game::fall_weight_damage

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

const std::unordered_map<std::string, Game_object>& cpp_client::coreminer::Game::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.

const int& cpp_client::coreminer::Game::ladder_cost

The amount of building material required to build a ladder.

const int& cpp_client::coreminer::Game::ladder_health

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

const int& cpp_client::coreminer::Game::large_cargo_size

The amount deemed as a large amount of cargo.

const int& cpp_client::coreminer::Game::large_material_size

The amount deemed as a large amount of material.

const int& cpp_client::coreminer::Game::map_height

The number of Tiles in the map along the y (vertical) axis.

const int& cpp_client::coreminer::Game::map_width

The number of Tiles in the map along the x (horizontal) axis.

const int& cpp_client::coreminer::Game::max_shielding

The maximum amount of shielding possible on a Tile.

const int& cpp_client::coreminer::Game::max_turns

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

const int& cpp_client::coreminer::Game::max_upgrade_level

The highest upgrade level allowed on a Miner.

const std::vector<Miner>& cpp_client::coreminer::Game::miners

Every Miner in the game.

const int& cpp_client::coreminer::Game::ore_price

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

const int& cpp_client::coreminer::Game::ore_value

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

const std::vector<Player>& cpp_client::coreminer::Game::players

List of all the players in the game.

const std::string& cpp_client::coreminer::Game::session

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

const int& cpp_client::coreminer::Game::shield_cost

The amount of building material required to shield a Tile.

const int& cpp_client::coreminer::Game::shield_health

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

const int& cpp_client::coreminer::Game::spawn_price

The monetary price of spawning a Miner.

const int& cpp_client::coreminer::Game::suffocation_damage

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

const int& cpp_client::coreminer::Game::suffocation_weight_damage

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

const int& cpp_client::coreminer::Game::support_cost

The amount of building material required to build a support.

const int& cpp_client::coreminer::Game::support_health

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

const std::vector<Tile>& cpp_client::coreminer::Game::tiles

All the tiles in the map, stored in Row-major order. Use x + y * mapWidth to access the correct index.

const double& cpp_client::coreminer::Game::time_added_per_turn

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

const int& cpp_client::coreminer::Game::upgrade_price

The cost to upgrade a Miner.

const std::vector<Upgrade>& cpp_client::coreminer::Game::upgrades

Every Upgrade for a Miner in the game.

const int& cpp_client::coreminer::Game::victory_amount

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


The documentation for this class was generated from the following file: