Changes in preparation for the integration of the network server. GUI does not directly know Game and Hand any more, only Session. WARNING: This version crashes due to initialization order problems.

This commit is contained in:
lotodore
2007-05-11 12:01:13 +00:00
parent a37fe9969e
commit 7c6337d810
20 changed files with 441 additions and 323 deletions
+7 -1
View File
@@ -20,6 +20,7 @@
#ifndef STDSESSION_H
#define STDSESSION_H
#include "gamedata.h"
#include "game_defs.h"
#include <string>
class GuiInterface;
@@ -38,14 +39,19 @@ public:
void startGame(const GameData &gameData);
void deleteGame();
Game *getCurrentGame();
void startNetworkClient(const std::string &serverAddress, unsigned serverPort, bool ipv6, const std::string &pwd);
void startNetworkClientForLocalServer();
void terminateNetworkClient();
void startNetworkServer(const GameData &gameData);
void initiateNetworkServerGame();
void waitForNetworkServerAction(GameState state, unsigned uniquePlayerId);
void terminateNetworkServer();
bool isNetworkServerRunning() const;
void setCurrentGameID(const int& theValue) { currentGameID = theValue; }
int getCurrentGameID() const { return currentGameID; }
@@ -56,7 +62,7 @@ private:
ClientThread *myNetClient;
ServerThread *myNetServer;
Game *actualGame;
Game *currentGame;
GuiInterface *myGui;
ConfigFile *myConfig;