terom@21: terom@21: #include "NetworkServer.hh" terom@21: #include "NetworkClient.hh" terom@21: terom@21: class Engine { terom@21: private: terom@21: // game state terom@21: GameState game_state; terom@21: terom@21: // network server/client terom@21: NetworkServer *net_server; terom@21: NetworkClient *net_client; terom@21: terom@21: // to exit the mainloop terom@21: bool is_running; terom@21: terom@21: // default constructor terom@21: Engine (void); terom@21: terom@21: public: terom@21: static void runNetworkServer (const std::string &listen_port); terom@21: static void runNetworkClient (const std::string &connect_host, const std::string &connect_port); terom@22: terom@22: static void log (const std::string &level, const std::string &type, const std::string &message); terom@22: terom@21: private: terom@21: void main_loop (void); terom@21: terom@21: };