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

Convert as many humans to as you can to survive in this post-apocalyptic wasteland. More...

#include <game.hpp>

Inheritance diagram for cpp_client::catastrophe::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 double & cat_energy_mult
 The multiplier for the amount of energy regenerated when resting in a shelter with the cat overlord. 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 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 & harvest_cooldown
 The amount of turns it takes for a Tile that was just harvested to grow food again. More...
 
const std::vector< Job > & jobs
 All the Jobs that Units can have in the game. More...
 
const int & lower_harvest_amount
 The amount that the harvest rate is lowered each season. 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_turns
 The maximum number of turns before the game will automatically end. More...
 
const double & monument_cost_mult
 The multiplier for the cost of actions when performing them in range of a monument. Does not effect pickup cost. More...
 
const int & monument_materials
 The number of materials in a monument. More...
 
const int & neutral_materials
 The number of materials in a neutral Structure. 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 & shelter_materials
 The number of materials in a shelter. More...
 
const int & starting_food
 The amount of food Players start with. More...
 
const double & starving_energy_mult
 The multiplier for the amount of energy regenerated when resting while starving. More...
 
const std::vector< Structure > & structures
 Every Structure in the game. 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 int & time_added_per_turn
 The amount of time (in nano-seconds) added after each player performs a turn. More...
 
const int & turns_between_harvests
 After a food tile is harvested, the number of turns before it can be harvested again. More...
 
const int & turns_to_create_human
 The number of turns between fresh humans being spawned on the road. More...
 
const int & turns_to_lower_harvest
 The number of turns before the harvest rate is lowered (length of each season basically). More...
 
const std::vector< Unit > & units
 Every Unit in the game. More...
 
const int & wall_materials
 The number of materials in a wall. More...
 

Detailed Description

Convert as many humans to as you can to survive in this post-apocalyptic wasteland.

Member Function Documentation

Tile cpp_client::catastrophe::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 double& cpp_client::catastrophe::Game::cat_energy_mult

The multiplier for the amount of energy regenerated when resting in a shelter with the cat overlord.

const Player& cpp_client::catastrophe::Game::current_player

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

const int& cpp_client::catastrophe::Game::current_turn

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

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

The amount of turns it takes for a Tile that was just harvested to grow food again.

const std::vector<Job>& cpp_client::catastrophe::Game::jobs

All the Jobs that Units can have in the game.

const int& cpp_client::catastrophe::Game::lower_harvest_amount

The amount that the harvest rate is lowered each season.

const int& cpp_client::catastrophe::Game::map_height

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

const int& cpp_client::catastrophe::Game::map_width

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

const int& cpp_client::catastrophe::Game::max_turns

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

const double& cpp_client::catastrophe::Game::monument_cost_mult

The multiplier for the cost of actions when performing them in range of a monument. Does not effect pickup cost.

const int& cpp_client::catastrophe::Game::monument_materials

The number of materials in a monument.

const int& cpp_client::catastrophe::Game::neutral_materials

The number of materials in a neutral Structure.

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

List of all the players in the game.

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

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

const int& cpp_client::catastrophe::Game::shelter_materials

The number of materials in a shelter.

const int& cpp_client::catastrophe::Game::starting_food

The amount of food Players start with.

const double& cpp_client::catastrophe::Game::starving_energy_mult

The multiplier for the amount of energy regenerated when resting while starving.

const std::vector<Structure>& cpp_client::catastrophe::Game::structures

Every Structure in the game.

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

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

const int& cpp_client::catastrophe::Game::time_added_per_turn

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

const int& cpp_client::catastrophe::Game::turns_between_harvests

After a food tile is harvested, the number of turns before it can be harvested again.

const int& cpp_client::catastrophe::Game::turns_to_create_human

The number of turns between fresh humans being spawned on the road.

const int& cpp_client::catastrophe::Game::turns_to_lower_harvest

The number of turns before the harvest rate is lowered (length of each season basically).

const std::vector<Unit>& cpp_client::catastrophe::Game::units

Every Unit in the game.

const int& cpp_client::catastrophe::Game::wall_materials

The number of materials in a wall.


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