1 #ifndef GAMES_ANARCHY_GAME_H
2 #define GAMES_ANARCHY_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/anarchy_fwd.hpp"
45 class Game :
public Base_game
145 Game_(std::initializer_list<std::pair<std::string, Any&&>> init);
146 Game_() : Game_({}){}
147 virtual void resize(
const std::string& name, std::size_t size)
override;
148 virtual void change_vec_values(
const std::string& name, std::vector<std::pair<std::size_t, Any>>& values)
override;
149 virtual void remove_key(
const std::string& name, Any& key)
override;
150 virtual std::unique_ptr<Any> add_key_value(
const std::string& name, Any& key, Any& value)
override;
151 virtual bool is_map(
const std::string& name)
override;
152 virtual void rebind_by_name(Any* to_change,
const std::string& member, std::shared_ptr<Base_object> ref)
override;
163 #endif // GAMES_ANARCHY_GAME_H
const int & map_height
The width of the entire map along the vertical (y) axis.
Definition: game.hpp:87
const std::string & session
A unique identifier for the game instance that is being played.
Definition: game.hpp:122
const std::vector< Player > & players
List of all the players in the game.
Definition: game.hpp:117
const int & max_forecast_intensity
The maximum amount of intensity value for any Forecast.
Definition: game.hpp:102
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:82
A player in this game. Every AI controls one player.
Definition: player.hpp:37
const int & max_fire
The maximum amount of fire value for any Building.
Definition: game.hpp:97
const Player & current_player
The player whose turn it is currently. That player can send commands. Other players cannot...
Definition: game.hpp:67
const int & current_turn
The current turn number, starting at 0 for the first player's turn.
Definition: game.hpp:72
const int & map_width
The width of the entire map along the horizontal (x) axis.
Definition: game.hpp:92
const Forecast & current_forecast
The current Forecast, which will be applied at the end of the turn.
Definition: game.hpp:62
const Forecast & next_forecast
The next Forecast, which will be applied at the end of your opponent's turn. This is also the Forecas...
Definition: game.hpp:112
The weather effect that will be applied at the end of a turn, which causes fires to spread...
Definition: forecast.hpp:37
const std::vector< Forecast > & forecasts
All the forecasts in the game, indexed by turn number.
Definition: game.hpp:77
const int & max_turns
The maximum number of turns before the game will automatically end.
Definition: game.hpp:107
const int & base_bribes_per_turn
How many bribes players get at the beginning of their turn, not counting their burned down Buildings...
Definition: game.hpp:52
Two player grid based game where each player tries to burn down the other player's buildings...
Definition: game.hpp:45
const int & time_added_per_turn
The amount of time (in nano-seconds) added after each player performs a turn.
Definition: game.hpp:127
const std::vector< Building > & buildings
All the buildings in the game.
Definition: game.hpp:57