#ifndef BLANK_SERVER_SERVER_HPP
#define BLANK_SERVER_SERVER_HPP
+#include "../app/Config.hpp"
+
#include <list>
#include <SDL_net.h>
namespace blank {
+class CompositeModel;
class World;
namespace server {
class Server {
public:
- struct Config {
- Uint16 port = 12354;
- };
-
-public:
- Server(const Config &, World &);
+ Server(const Config::Network &, World &);
~Server();
void Handle();
World &GetWorld() noexcept { return world; }
+ void SetPlayerModel(const CompositeModel &) noexcept;
+ bool HasPlayerModel() const noexcept;
+ const CompositeModel &GetPlayerModel() const noexcept;
+
private:
void HandlePacket(const UDPpacket &);
std::list<ClientConnection> clients;
World &world;
+ const CompositeModel *player_model;
};