Players should now be able to leave a network game, the other players can continue the game (if it wasn't the server who left).

This commit is contained in:
lotodore
2007-06-03 14:57:33 +00:00
parent 1fcb0c80fd
commit f932e39983
4 changed files with 125 additions and 56 deletions
+4 -1
View File
@@ -157,7 +157,6 @@ protected:
ServerRecvStateStartRound();
static void GameRun(Game &curGame);
static PlayerInterface *GetCurrentPlayer(Game &curGame);
static void SendNewRoundCards(ServerRecvThread &server, Game &curGame, int state);
};
@@ -170,6 +169,9 @@ public:
virtual ~ServerRecvStateWaitPlayerAction();
// Handle leaving players.
virtual int Process(ServerRecvThread &server);
protected:
// Protected constructor - this is a singleton.
@@ -177,6 +179,7 @@ protected:
virtual int InternalProcess(ServerRecvThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet);
static void PerformPlayerAction(ServerRecvThread &server, PlayerInterface *player, PlayerAction action, int bet);
static int GetHighestSet(Game &curGame);
static void SetHighestSet(Game &curGame, int highestSet);
};