C++ Joueur Client
 All Classes Namespaces Functions Variables
ai.hpp
1 #ifndef GAMES_SALOON_AI_HPP
2 #define GAMES_SALOON_AI_HPP
3 
4 #include "impl/saloon.hpp"
5 #include "game.hpp"
6 #include "bottle.hpp"
7 #include "cowboy.hpp"
8 #include "furnishing.hpp"
9 #include "game_object.hpp"
10 #include "player.hpp"
11 #include "tile.hpp"
12 #include "young_gun.hpp"
13 
14 #include "../../joueur/src/base_ai.hpp"
15 #include "../../joueur/src/attr_wrapper.hpp"
16 
17 // <<-- Creer-Merge: includes -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
18 // You can add additional #includes here
19 // <<-- /Creer-Merge: includes -->>
20 
21 namespace cpp_client
22 {
23 
24 namespace saloon
25 {
26 
30 class AI : public Base_ai
31 {
32 public:
37 
42 
43  //<<-- Creer-Merge: class variables -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
44  // You can add additional class variables here.
45  //<<-- /Creer-Merge: class variables -->>
46 
52  virtual std::string get_name() const override;
53 
57  virtual void start() override;
58 
64  virtual void ended(bool won, const std::string& reason) override;
65 
69  virtual void game_updated() override;
70 
75  bool run_turn();
76 
77  // <<-- Creer-Merge: methods -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
78  // You can add additional methods here.
79  // <<-- /Creer-Merge: methods -->>
80 
85 std::vector<Tile> find_path(const Tile& start, const Tile& goal);
86 
87 
88 
89  // ####################
90  // Don't edit these!
91  // ####################
93  virtual std::string invoke_by_name(const std::string& name,
94  const std::unordered_map<std::string, Any>& args) override;
95  virtual void set_game(Base_game* ptr) override;
96  virtual void set_player(std::shared_ptr<Base_object> obj) override;
97  virtual void print_win_loss_info() override;
99  // ####################
100  // Don't edit these!
101  // ####################
102 
103 };
104 
105 } // SALOON
106 
107 } // cpp_client
108 
109 #endif // GAMES_SALOON_AI_HPP
Use cowboys to have a good time and play some music on a Piano, while brawling with enemy Cowboys...
Definition: game.hpp:45
Game game
This is a reference to the Game object itself, it contains all the information about the current game...
Definition: ai.hpp:36
bool run_turn()
This is called every time it is this AI.player's turn.
Definition: ai.cpp:65
virtual std::string get_name() const override
This returns your AI's name to the game server. Replace the string name.
Definition: ai.cpp:21
virtual void game_updated() override
This is automatically called the game (or anything in it) updates
Definition: ai.cpp:42
This is the header file for building your Saloon AI
Definition: ai.hpp:30
virtual void start() override
This is automatically called when the game first starts, once the game objects are created ...
Definition: ai.cpp:32
virtual void ended(bool won, const std::string &reason) override
This is automatically called when the game ends.
Definition: ai.cpp:54
A Tile in the game that makes up the 2D map grid.
Definition: tile.hpp:37
Player player
This is a pointer to your AI's player. This AI class is not a player, but it should command this Play...
Definition: ai.hpp:41
Definition: base_ai.hpp:16
std::vector< Tile > find_path(const Tile &start, const Tile &goal)
Definition: ai.cpp:77
A player in this game. Every AI controls one player.
Definition: player.hpp:37