Robot Devastation
Screen.hpp
1 // Authors: see AUTHORS.md at project root.
2 // CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
3 // URL: https://github.com/asrob-uc3m/robotDevastation
4 
5 #ifndef __RD_SCREEN_HPP__
6 #define __RD_SCREEN_HPP__
7 
8 #include <string>
9 #include <vector>
10 #include "ImageManager.hpp"
11 #include "Player.hpp"
12 #include "Target.hpp"
13 #include "Weapon.hpp"
14 
15 namespace rd{
16 
24 class Screen
25 {
26  public:
27  virtual bool init() = 0;
28  virtual bool cleanup() = 0;
29  virtual bool drawScreen(void *screen) = 0;
30  virtual bool update(const std::string & parameter, const std::string & value);
31  virtual bool update(const std::string & parameter, const Image & value); //-- Required by GameScreen and DeadScreen
32  virtual bool update(const std::string & parameter, const Player & value); //-- Required by GameScreen
33  virtual bool update(const std::string & parameter, const std::vector<Player> & value); //-- Required by GameScreen
34  virtual bool update(const std::string & parameter, const std::vector<Target> & value); //-- Required by GameScreen
35  virtual bool update(const std::string & parameter, const Weapon & value); //-- Required by GameScreen
36  virtual int getHeight() const;
37  virtual int getWidth() const;
38  virtual ~Screen() {}
39 
40  protected:
41  Screen();
42 
43  int h, w; //-- Screen size
44 };
45 
46 }
47 
48 #endif //-- __RD_SCREEN_HPP__
rd::Player
Class that represents a player of this game, with a 'unique' id, name, health, team id and score.
Definition: Player.hpp:21
rd
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
rd::Screen
A User Interface.
Definition: Screen.hpp:24
rd::Weapon
Class that represents a weapon.
Definition: Weapon.hpp:22