game.hpp 748 Bytes
Newer Older
louiz’'s avatar
louiz’ committed
1 2 3 4 5 6 7 8
/**
 * Base class for GameServer and GameClient
 */

#ifndef GAME_HPP_INCLUDED
#define GAME_HPP_INCLUDED

#include <world/world.hpp>
louiz’'s avatar
louiz’ committed
9 10
#include <world/entity.hpp>

11
#include <utils/time.hpp>
louiz’'s avatar
louiz’ committed
12 13 14
#include <game/turn_handler.hpp>
#include <game/occupants_handler.hpp>

louiz’'s avatar
louiz’ committed
15 16
class Message;

louiz’'s avatar
louiz’ committed
17 18 19 20 21 22
class Game
{
public:
  Game();
  ~Game();

louiz’'s avatar
louiz’ committed
23
  void new_entity_callback(Message* msg);
louiz’'s avatar
louiz’ committed
24
  void move_callback(Message* msg);
louiz’'s avatar
louiz’ committed
25
  void cast_callback(Message* msg);
26
  utils::FloatingSeconds current_world_time() const;
louiz’'s avatar
louiz’ committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40

protected:
  World world;
  OccupantsHandler occupants_handler;
  TurnHandler turn_handler;

  Game(const Game&) = delete;
  Game(Game&&) = delete;
  Game& operator=(const Game&) = delete;
  Game& operator=(Game&&) = delete;
};


#endif /* GAME_HPP_INCLUDED */