C++ Joueur Client
 All Classes Namespaces Functions Variables
game.hpp
1 #ifndef GAMES_CHESS_GAME_H
2 #define GAMES_CHESS_GAME_H
3 
4 // Game
5 // The traditional 8x8 chess board with pieces.
6 
7 // DO NOT MODIFY THIS FILE
8 // Never try to directly create an instance of this class, or modify its member variables.
9 // Instead, you should only be reading its variables and calling its functions.
10 
11 #include <vector>
12 #include <queue>
13 #include <deque>
14 #include <unordered_map>
15 #include <string>
16 #include <initializer_list>
17 
18 #include "../../joueur/src/any.hpp"
19 
20 
21 #include "../../joueur/src/base_game.hpp"
22 #include "impl/chess_fwd.hpp"
23 
24 // <<-- Creer-Merge: includes -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
25 // you can add additional #includes here
26 // <<-- /Creer-Merge: includes -->>
27 
28 namespace cpp_client
29 {
30 
39 namespace chess
40 {
41 
45 class Game : public Base_game
46 {
47 public:
48 
52  const std::string& fen;
53 
57  const std::unordered_map<std::string, Game_object>& game_objects;
58 
62  const std::vector<std::string>& history;
63 
67  const std::vector<Player>& players;
68 
72  const std::string& session;
73 
74  // <<-- Creer-Merge: member variables -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
75  // You can add additional member variables here. None of them will be tracked or updated by the server.
76  // <<-- /Creer-Merge: member variables -->>
77 
78 
79 
80  // <<-- Creer-Merge: methods -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
81  // You can add additional methods here.
82  // <<-- /Creer-Merge: methods -->>
83 
84  ~Game_();
85 
86  // ####################
87  // Don't edit these!
88  // ####################
90  Game_(std::initializer_list<std::pair<std::string, Any&&>> init);
91  Game_() : Game_({}){}
92  virtual void resize(const std::string& name, std::size_t size) override;
93  virtual void change_vec_values(const std::string& name, std::vector<std::pair<std::size_t, Any>>& values) override;
94  virtual void remove_key(const std::string& name, Any& key) override;
95  virtual std::unique_ptr<Any> add_key_value(const std::string& name, Any& key, Any& value) override;
96  virtual bool is_map(const std::string& name) override;
97  virtual void rebind_by_name(Any* to_change, const std::string& member, std::shared_ptr<Base_object> ref) override;
99  // ####################
100  // Don't edit these!
101  // ####################
102 };
103 
104 } // chess
105 
106 } // cpp_client
107 
108 #endif // GAMES_CHESS_GAME_H
const std::vector< std::string > & history
The list of [known] moves that have occurred in the game, in Universal Chess Interface (UCI) format...
Definition: game.hpp:62
const std::string & fen
Forsyth-Edwards Notation (fen), a notation that describes the game board state.
Definition: game.hpp:52
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:57
The traditional 8x8 chess board with pieces.
Definition: game.hpp:45
const std::string & session
A unique identifier for the game instance that is being played.
Definition: game.hpp:72
const std::vector< Player > & players
List of all the players in the game.
Definition: game.hpp:67