]> git.localhorst.tv Git - blank.git/blob - src/app/ServerState.hpp
special treatment for players
[blank.git] / src / app / ServerState.hpp
1 #ifndef BLANK_APP_SERVERSTATE_HPP_
2 #define BLANK_APP_SERVERSTATE_HPP_
3
4 #include "State.hpp"
5 #include "../net/Server.hpp"
6 #include "../world/BlockTypeRegistry.hpp"
7 #include "../world/World.hpp"
8
9
10 namespace blank {
11
12 class HeadlessEnvironment;
13
14 class ServerState
15 : public State {
16
17 public:
18         ServerState(
19                 HeadlessEnvironment &,
20                 const World::Config &,
21                 const WorldSave &,
22                 const Server::Config &
23         );
24
25         void Handle(const SDL_Event &) override;
26         void Update(int dt) override;
27         void Render(Viewport &) override;
28
29 private:
30         HeadlessEnvironment &env;
31         BlockTypeRegistry block_types;
32         World world;
33         Server server;
34
35 };
36
37 }
38
39 #endif