src/proto2/Engine.hh
author terom
Sat, 08 Nov 2008 20:34:14 +0000
changeset 22 b70d30e1b0fe
parent 21 32c6cc55256a
child 23 8d802b573cf0
permissions -rw-r--r--
all the network code is now there, although it doesn't quite work

#include "NetworkServer.hh"
#include "NetworkClient.hh"

class Engine {
	private:
		// game state
		GameState game_state;
		
		// network server/client
		NetworkServer *net_server;
		NetworkClient *net_client;

		// to exit the mainloop
		bool is_running;
		
		// default constructor
		Engine (void);

	public:
		static void runNetworkServer (const std::string &listen_port);
		static void runNetworkClient (const std::string &connect_host, const std::string &connect_port);
		
		static void log (const std::string &level, const std::string &type, const std::string &message);

	private:
		void main_loop (void);

};