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

Use cowboys to have a good time and play some music on a Piano, while brawling with enemy Cowboys. More...

#include <game.hpp>

Inheritance diagram for cpp_client::saloon::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 & bartender_cooldown
 How many turns a Bartender will be busy for after throwing a Bottle. More...
 
const std::vector< Bottle > & bottles
 All the beer Bottles currently flying across the saloon in the game. More...
 
const int & brawler_damage
 How much damage is applied to neighboring things bit by the Sharpshooter between turns. More...
 
const std::vector< Cowboy > & cowboys
 Every Cowboy in the game. 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::vector< Furnishing > & furnishings
 Every furnishing in the game. 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 std::vector< std::string > & jobs
 All the jobs that Cowboys can be called in with. 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_cowboys_per_job
 The maximum number of Cowboys a Player can bring into the saloon of each specific job. 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 & rowdiness_to_siesta
 When a player's rowdiness reaches or exceeds this number their Cowboys take a collective siesta. More...
 
const std::string & session
 A unique identifier for the game instance that is being played. More...
 
const int & sharpshooter_damage
 How much damage is applied to things hit by Sharpshooters when they act. More...
 
const int & siesta_length
 How long siestas are for a player's team. 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_drunk
 How many turns a Cowboy will be drunk for if a bottle breaks on it. More...
 

Detailed Description

Use cowboys to have a good time and play some music on a Piano, while brawling with enemy Cowboys.

Member Function Documentation

Tile cpp_client::saloon::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::saloon::Game::bartender_cooldown

How many turns a Bartender will be busy for after throwing a Bottle.

const std::vector<Bottle>& cpp_client::saloon::Game::bottles

All the beer Bottles currently flying across the saloon in the game.

const int& cpp_client::saloon::Game::brawler_damage

How much damage is applied to neighboring things bit by the Sharpshooter between turns.

const std::vector<Cowboy>& cpp_client::saloon::Game::cowboys

Every Cowboy in the game.

const Player& cpp_client::saloon::Game::current_player

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

const int& cpp_client::saloon::Game::current_turn

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

const std::vector<Furnishing>& cpp_client::saloon::Game::furnishings

Every furnishing in the game.

const std::unordered_map<std::string, Game_object>& cpp_client::saloon::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 std::vector<std::string>& cpp_client::saloon::Game::jobs

All the jobs that Cowboys can be called in with.

const int& cpp_client::saloon::Game::map_height

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

const int& cpp_client::saloon::Game::map_width

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

const int& cpp_client::saloon::Game::max_cowboys_per_job

The maximum number of Cowboys a Player can bring into the saloon of each specific job.

const int& cpp_client::saloon::Game::max_turns

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

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

List of all the players in the game.

const int& cpp_client::saloon::Game::rowdiness_to_siesta

When a player's rowdiness reaches or exceeds this number their Cowboys take a collective siesta.

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

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

const int& cpp_client::saloon::Game::sharpshooter_damage

How much damage is applied to things hit by Sharpshooters when they act.

const int& cpp_client::saloon::Game::siesta_length

How long siestas are for a player's team.

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

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

const int& cpp_client::saloon::Game::turns_drunk

How many turns a Cowboy will be drunk for if a bottle breaks on it.


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