Delay after showing cards when all in condition is true. Added option TCP_NODELAY. Round is now shown before dealing cards.

This commit is contained in:
lotodore
2007-06-07 14:06:22 +00:00
parent cfdc52a8d5
commit 05a86be4fe
16 changed files with 223 additions and 126 deletions
+26 -1
View File
@@ -157,7 +157,6 @@ protected:
ServerRecvStateStartRound();
static void GameRun(Game &curGame);
static void SendNewRoundCards(ServerRecvThread &server, Game &curGame, int state);
static std::list<PlayerInterface *> GetActivePlayers(Game &curGame);
};
@@ -211,6 +210,32 @@ private:
boost::microsec_timer m_delayTimer;
};
// State: Delay after showing cards (all in)
class ServerRecvStateShowCardsDelay : public ServerRecvStateReceiving, public ServerRecvStateRunning
{
public:
// Access the state singleton.
static ServerRecvStateShowCardsDelay &Instance();
virtual ~ServerRecvStateShowCardsDelay();
// Overwrite default processing
virtual int Process(ServerRecvThread &server);
void SetTimer(const boost::microsec_timer &timer);
protected:
// Protected constructor - this is a singleton.
ServerRecvStateShowCardsDelay();
virtual int InternalProcess(ServerRecvThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet);
private:
boost::microsec_timer m_delayTimer;
};
// State: Delay before next hand.
class ServerRecvStateNextHand : public ServerRecvStateReceiving, public ServerRecvStateRunning
{