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:
+7
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user