1 #ifndef GAMES_SALOON_GAME_H
2 #define GAMES_SALOON_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/saloon_fwd.hpp"
45 class Game :
public Base_game
92 const std::vector<std::string>&
jobs;
177 Game_(std::initializer_list<std::pair<std::string, Any&&>> init);
178 Game_() : Game_({}){}
179 virtual void resize(
const std::string& name, std::size_t size)
override;
180 virtual void change_vec_values(
const std::string& name, std::vector<std::pair<std::size_t, Any>>& values)
override;
181 virtual void remove_key(
const std::string& name, Any& key)
override;
182 virtual std::unique_ptr<Any> add_key_value(
const std::string& name, Any& key, Any& value)
override;
183 virtual bool is_map(
const std::string& name)
override;
184 virtual void rebind_by_name(Any* to_change,
const std::string& member, std::shared_ptr<Base_object> ref)
override;
195 #endif // GAMES_SALOON_GAME_H
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:142
Use cowboys to have a good time and play some music on a Piano, while brawling with enemy Cowboys...
Definition: game.hpp:45
const std::vector< std::string > & jobs
All the jobs that Cowboys can be called in with.
Definition: game.hpp:92
const int & turns_drunk
How many turns a Cowboy will be drunk for if a bottle breaks on it.
Definition: game.hpp:152
const int & sharpshooter_damage
How much damage is applied to things hit by Sharpshooters when they act.
Definition: game.hpp:132
const int & map_width
The number of Tiles in the map along the x (horizontal) axis.
Definition: game.hpp:102
Tile get_tile_at(const int x, const int y)
Gets the Tile at a specified (x, y) position
const Player & current_player
The player whose turn it is currently. That player can send commands. Other players cannot...
Definition: game.hpp:72
const std::string & session
A unique identifier for the game instance that is being played.
Definition: game.hpp:127
const std::vector< Furnishing > & furnishings
Every furnishing in the game.
Definition: game.hpp:82
const int & max_turns
The maximum number of turns before the game will automatically end.
Definition: game.hpp:112
const std::vector< Bottle > & bottles
All the beer Bottles currently flying across the saloon in the game.
Definition: game.hpp:57
const int & bartender_cooldown
How many turns a Bartender will be busy for after throwing a Bottle.
Definition: game.hpp:52
A Tile in the game that makes up the 2D map grid.
Definition: tile.hpp:37
const int & brawler_damage
How much damage is applied to neighboring things bit by the Sharpshooter between turns.
Definition: game.hpp:62
const std::vector< Cowboy > & cowboys
Every Cowboy in the game.
Definition: game.hpp:67
const int & time_added_per_turn
The amount of time (in nano-seconds) added after each player performs a turn.
Definition: game.hpp:147
const int & current_turn
The current turn number, starting at 0 for the first player's turn.
Definition: game.hpp:77
const int & rowdiness_to_siesta
When a player's rowdiness reaches or exceeds this number their Cowboys take a collective siesta...
Definition: game.hpp:122
const int & map_height
The number of Tiles in the map along the y (vertical) axis.
Definition: game.hpp:97
const std::vector< Player > & players
List of all the players in the game.
Definition: game.hpp:117
const int & max_cowboys_per_job
The maximum number of Cowboys a Player can bring into the saloon of each specific job...
Definition: game.hpp:107
const int & siesta_length
How long siestas are for a player's team.
Definition: game.hpp:137
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:87
A player in this game. Every AI controls one player.
Definition: player.hpp:37