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

Send hordes of the undead at your opponent while defending yourself against theirs to win. More...

#include <game.hpp>

Inheritance diagram for cpp_client::necrowar::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 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 & gold_income_per_unit
 The amount of gold income per turn per unit in a mine. More...
 
const int & island_income_per_unit
 The amount of gold income per turn per unit in the island mine. More...
 
const int & mana_income_per_unit
 The Amount of gold income per turn per unit fishing on the river side. 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 std::vector< Player > & players
 List of all the players in the game. More...
 
const int & river_phase
 The amount of turns it takes between the river changing phases. More...
 
const std::string & session
 A unique identifier for the game instance that is being played. 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 std::vector< Tower_job > & tower_jobs
 A list of every tower type / job. More...
 
const std::vector< Tower > & towers
 Every Tower in the game. More...
 
const std::vector< Unit_job > & unit_jobs
 A list of every unit type / job. More...
 
const std::vector< Unit > & units
 Every Unit in the game. More...
 

Detailed Description

Send hordes of the undead at your opponent while defending yourself against theirs to win.

Member Function Documentation

Tile cpp_client::necrowar::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 Player& cpp_client::necrowar::Game::current_player

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

const int& cpp_client::necrowar::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::necrowar::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::necrowar::Game::gold_income_per_unit

The amount of gold income per turn per unit in a mine.

const int& cpp_client::necrowar::Game::island_income_per_unit

The amount of gold income per turn per unit in the island mine.

const int& cpp_client::necrowar::Game::mana_income_per_unit

The Amount of gold income per turn per unit fishing on the river side.

const int& cpp_client::necrowar::Game::map_height

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

const int& cpp_client::necrowar::Game::map_width

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

const int& cpp_client::necrowar::Game::max_turns

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

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

List of all the players in the game.

const int& cpp_client::necrowar::Game::river_phase

The amount of turns it takes between the river changing phases.

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

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

const std::vector<Tile>& cpp_client::necrowar::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::necrowar::Game::time_added_per_turn

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

const std::vector<Tower_job>& cpp_client::necrowar::Game::tower_jobs

A list of every tower type / job.

const std::vector<Tower>& cpp_client::necrowar::Game::towers

Every Tower in the game.

const std::vector<Unit_job>& cpp_client::necrowar::Game::unit_jobs

A list of every unit type / job.

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

Every Unit in the game.


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