1 #ifndef GAMES_COREMINER_GAME_H
2 #define GAMES_COREMINER_GAME_H
14 #include <unordered_map>
16 #include <initializer_list>
18 #include "../../joueur/src/any.hpp"
21 #include "../../joueur/src/base_game.hpp"
22 #include "impl/coreminer_fwd.hpp"
45 class Game :
public Base_game
252 Game_(std::initializer_list<std::pair<std::string, Any&&>> init);
253 Game_() : Game_({}){}
254 virtual void resize(
const std::string& name, std::size_t size)
override;
255 virtual void change_vec_values(
const std::string& name, std::vector<std::pair<std::size_t, Any>>& values)
override;
256 virtual void remove_key(
const std::string& name, Any& key)
override;
257 virtual std::unique_ptr<Any> add_key_value(
const std::string& name, Any& key, Any& value)
override;
258 virtual bool is_map(
const std::string& name)
override;
259 virtual void rebind_by_name(Any* to_change,
const std::string& member, std::shared_ptr<Base_object> ref)
override;
270 #endif // GAMES_COREMINER_GAME_H
const std::vector< Miner > & miners
Every Miner in the game.
Definition: game.hpp:147
const int & ladder_health
The amount of mining power needed to remove a ladder from a Tile.
Definition: game.hpp:107
const int & upgrade_price
The cost to upgrade a Miner.
Definition: game.hpp:217
const int & current_turn
The current turn number, starting at 0 for the first player's turn.
Definition: game.hpp:77
const int & support_health
The amount of mining power needed to remove a support from a Tile.
Definition: game.hpp:202
const int & suffocation_damage
The amount of damage taken when suffocating inside a filled Tile.
Definition: game.hpp:187
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...
Definition: game.hpp:207
const int & bomb_size
The amount of cargo space taken up by a Bomb.
Definition: game.hpp:57
const int & fall_weight_damage
The amount of extra damage taken for falling while carrying a large amount of cargo.
Definition: game.hpp:92
const int & bomb_price
The monetary price of a bomb when bought or sold.
Definition: game.hpp:52
const std::vector< Upgrade > & upgrades
Every Upgrade for a Miner in the game.
Definition: game.hpp:222
const int & building_material_price
The monetary price of building materials when bought.
Definition: game.hpp:67
const int & victory_amount
The amount of victory points (value) required to win.
Definition: game.hpp:227
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 clien...
Definition: game.hpp:97
const int & map_width
The number of Tiles in the map along the x (horizontal) axis.
Definition: game.hpp:127
const int & support_cost
The amount of building material required to build a support.
Definition: game.hpp:197
const int & fall_damage
The amount of damage taken per Tile fallen.
Definition: game.hpp:87
const int & max_upgrade_level
The highest upgrade level allowed on a Miner.
Definition: game.hpp:142
const int & spawn_price
The monetary price of spawning a Miner.
Definition: game.hpp:182
const double & time_added_per_turn
The amount of time (in nano-seconds) added after each player performs a turn.
Definition: game.hpp:212
const std::vector< Bomb > & bombs
Every Bomb in the game.
Definition: game.hpp:62
const int & ore_price
The amount of money awarded when ore is dumped in the base and sold.
Definition: game.hpp:152
const int & ore_value
The amount of value awarded when ore is dumped in the base and sold.
Definition: game.hpp:157
const int & suffocation_weight_damage
The amount of extra damage taken for suffocating under a large amount of material.
Definition: game.hpp:192
const std::vector< Player > & players
List of all the players in the game.
Definition: game.hpp:162
A Tile in the game that makes up the 2D map grid.
Definition: tile.hpp:37
const int & shield_cost
The amount of building material required to shield a Tile.
Definition: game.hpp:172
const int & large_cargo_size
The amount deemed as a large amount of cargo.
Definition: game.hpp:112
const Player & current_player
The player whose turn it is currently. That player can send commands. Other players cannot...
Definition: game.hpp:72
Tile get_tile_at(const int x, const int y)
Gets the Tile at a specified (x, y) position
const int & shield_health
The amount of mining power needed to remove one unit of shielding off a Tile.
Definition: game.hpp:177
const int & ladder_cost
The amount of building material required to build a ladder.
Definition: game.hpp:102
const int & map_height
The number of Tiles in the map along the y (vertical) axis.
Definition: game.hpp:122
const int & max_shielding
The maximum amount of shielding possible on a Tile.
Definition: game.hpp:132
const int & large_material_size
The amount deemed as a large amount of material.
Definition: game.hpp:117
const std::string & session
A unique identifier for the game instance that is being played.
Definition: game.hpp:167
const int & dirt_price
The monetary price of dirt when bought or sold.
Definition: game.hpp:82
A player in this game. Every AI controls one player.
Definition: player.hpp:37
const int & max_turns
The maximum number of turns before the game will automatically end.
Definition: game.hpp:137
Mine resources to obtain more value than your opponent.
Definition: game.hpp:45