--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Engine.hh Wed Dec 03 19:16:32 2008 +0000
@@ -0,0 +1,54 @@
+#ifndef ENGINE_HH
+#define ENGINE_HH
+
+// XXX: forward-declare Engine for other components
+class Engine;
+
+#include "GameState.hh"
+#include "Graphics.hh"
+#include "NetworkServer.hh"
+#include "NetworkClient.hh"
+
+#include "Logger.hh"
+
+class Engine {
+ private:
+ // game state
+ GameState game_state;
+
+ // Graphics/Input
+ Graphics *graphics;
+
+ // network server/client
+ NetworkServer *net_server;
+ NetworkClient *net_client;
+
+ // to exit the mainloop
+ bool is_running;
+
+ public:
+ // default constructor
+ Engine (void);
+
+ // setup graphics
+ void setupGraphics (void);
+
+ // set up network server/client
+ // setting up both of these will lead to odd behaviour :)
+ void setupNetworkServer (const std::string &listen_port);
+ void setupNetworkClient (const std::string &connect_host, const std::string &connect_port);
+ void setupSinglePlayer (void);
+
+ // run the main loop
+ void run (void);
+
+ // terminate the main loop
+ void stop (void);
+
+ public:
+ // logging utility
+ static Logger log (enum LogLevel level, const char *type);
+
+};
+
+#endif /* ENGINE_HH */