establishing new parameter roundBeforePostRiver; deleting needless parameter bettingRoundsPlayed

This commit is contained in:
floty
2011-11-13 16:00:19 +00:00
parent 2678bd9101
commit d38bd0fef0
7 changed files with 27 additions and 154 deletions
+9 -16
View File
@@ -22,9 +22,9 @@
using namespace std;
ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost::shared_ptr<BoardInterface> b, Log *l, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC)
: myFactory(f), myGui(g), myBoard(b), myLog(l), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myID(id), startQuantityPlayers(sP), dealerPosition(dP), currentRound(GAME_STATE_PREFLOP),
: myFactory(f), myGui(g), myBoard(b), myLog(l), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myID(id), startQuantityPlayers(sP), dealerPosition(dP), currentRound(GAME_STATE_PREFLOP), roundBeforePostRiver(GAME_STATE_PREFLOP),
smallBlind(sB), startCash(sC), previousPlayerID(-1), allInCondition(0),
cardsShown(false), bettingRoundsPlayed(0)
cardsShown(false)
{
PlayerListIterator it;
@@ -216,6 +216,13 @@ ClientHand::getCurrentRound() const
return currentRound;
}
GameState
ClientHand::getRoundBeforePostRiver() const
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return roundBeforePostRiver;
}
void
ClientHand::setDealerPosition(int theValue)
{
@@ -272,20 +279,6 @@ ClientHand::getStartCash() const
return startCash;
}
void
ClientHand::setBettingRoundsPlayed(int theValue)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
bettingRoundsPlayed = theValue;
}
int
ClientHand::getBettingRoundsPlayed() const
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return bettingRoundsPlayed;
}
void
ClientHand::setPreviousPlayerID(int theValue)
{
+2 -3
View File
@@ -65,6 +65,7 @@ public:
void setCurrentRound ( GameState theValue );
GameState getCurrentRound() const;
GameState getRoundBeforePostRiver() const;
void setDealerPosition ( int theValue );
int getDealerPosition() const;
@@ -116,6 +117,7 @@ private:
int startQuantityPlayers;
unsigned dealerPosition;
GameState currentRound;
GameState roundBeforePostRiver;
int smallBlind;
int startCash;
@@ -124,9 +126,6 @@ private:
bool allInCondition;
bool cardsShown;
// hier steht bis zu welcher bettingRound der human player gespielt hat: 0 - nur Preflop, 1 - bis Flop, ...
int bettingRoundsPlayed;
};
#endif