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