author | terom |
Sat, 08 Nov 2008 20:34:14 +0000 | |
changeset 22 | b70d30e1b0fe |
parent 21 | 32c6cc55256a |
child 23 | 8d802b573cf0 |
permissions | -rw-r--r-- |
21 | 1 |
|
2 |
#include "NetworkServer.hh" |
|
3 |
#include "NetworkClient.hh" |
|
4 |
||
5 |
class Engine { |
|
6 |
private: |
|
7 |
// game state |
|
8 |
GameState game_state; |
|
9 |
||
10 |
// network server/client |
|
11 |
NetworkServer *net_server; |
|
12 |
NetworkClient *net_client; |
|
13 |
||
14 |
// to exit the mainloop |
|
15 |
bool is_running; |
|
16 |
||
17 |
// default constructor |
|
18 |
Engine (void); |
|
19 |
||
20 |
public: |
|
21 |
static void runNetworkServer (const std::string &listen_port); |
|
22 |
static void runNetworkClient (const std::string &connect_host, const std::string &connect_port); |
|
22
b70d30e1b0fe
all the network code is now there, although it doesn't quite work
terom
parents:
21
diff
changeset
|
23 |
|
b70d30e1b0fe
all the network code is now there, although it doesn't quite work
terom
parents:
21
diff
changeset
|
24 |
static void log (const std::string &level, const std::string &type, const std::string &message); |
b70d30e1b0fe
all the network code is now there, although it doesn't quite work
terom
parents:
21
diff
changeset
|
25 |
|
21 | 26 |
private: |
27 |
void main_loop (void); |
|
28 |
||
29 |
}; |