summary refs log tree commit diff stats
path: root/src/game.h
blob: d7fdcd7c3338d80969b4a7a0e6a704ae95fbfcd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef GAME_H_1014DDC9
#define GAME_H_1014DDC9

#include <random>
#include "entity_manager.h"
#include "system_manager.h"
#include "renderer/renderer.h"

class Game {
public:

  Game(std::mt19937& rng);

  void execute();

  inline std::mt19937& getRng()
  {
    return rng_;
  }

  inline Renderer& getRenderer()
  {
    return renderer_;
  }

  inline EntityManager& getEntityManager()
  {
    return entityManager_;
  }

  inline SystemManager& getSystemManager()
  {
    return systemManager_;
  }

  friend void key_callback(
    GLFWwindow* window,
    int key,
    int scancode,
    int action,
    int mods);

private:

  std::mt19937 rng_;
  Renderer renderer_;
  SystemManager systemManager_;
  EntityManager entityManager_;
  bool shouldQuit_ = false;
};

#endif /* end of include guard: GAME_H_1014DDC9 */