First try of showing cards when everybody is all in.
This commit is contained in:
@@ -22,10 +22,10 @@
|
||||
using namespace std;
|
||||
|
||||
ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
: myFactory(f), myGui(g), myBoard(b), playerArray(p), myPreflop(0), myFlop(0), myTurn(0), myRiver(0),
|
||||
myID(id), actualQuantityPlayers(aP), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0),
|
||||
smallBlind(sB), startCash(sC), activePlayersCounter(aP), lastPlayersTurn(0), allInCondition(0),
|
||||
bettingRoundsPlayed(0)
|
||||
: myFactory(f), myGui(g), myBoard(b), playerArray(p), myPreflop(0), myFlop(0), myTurn(0), myRiver(0),
|
||||
myID(id), actualQuantityPlayers(aP), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0),
|
||||
smallBlind(sB), startCash(sC), activePlayersCounter(aP), lastPlayersTurn(0), allInCondition(0),
|
||||
cardsShown(false), bettingRoundsPlayed(0)
|
||||
{
|
||||
int i;
|
||||
lastPlayersTurn = 0;
|
||||
@@ -37,7 +37,7 @@ ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, Boar
|
||||
if(playerArray[i]->getMyActiveStatus() != 0) {
|
||||
playerArray[i]->setHand(this);
|
||||
}
|
||||
// myFlipCards auf 0 setzen
|
||||
// myFlipCards auf 0 setzen
|
||||
playerArray[i]->setMyCardsFlip(0, 0);
|
||||
}
|
||||
|
||||
@@ -77,10 +77,10 @@ void
|
||||
ClientHand::switchRounds()
|
||||
{
|
||||
// update active players counter.
|
||||
activePlayersCounter = 0;
|
||||
for (int i = 0; i < MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
if (playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyActiveStatus() == 1) activePlayersCounter++;
|
||||
}
|
||||
activePlayersCounter = 0;
|
||||
for (int i = 0; i < MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
if (playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyActiveStatus() == 1) activePlayersCounter++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -46,39 +46,42 @@ public:
|
||||
RiverInterface* getRiver() const { return myRiver; }
|
||||
GuiInterface* getGuiInterface() const { return myGui; }
|
||||
|
||||
void setMyID(const int& theValue) { myID = theValue; }
|
||||
void setMyID(int theValue) { myID = theValue; }
|
||||
int getMyID() const { return myID; }
|
||||
|
||||
void setActualQuantityPlayers(const int& theValue) { actualQuantityPlayers = theValue; }
|
||||
void setActualQuantityPlayers(int theValue) { actualQuantityPlayers = theValue; }
|
||||
int getActualQuantityPlayers() const { return actualQuantityPlayers; }
|
||||
|
||||
void setStartQuantityPlayers(const int& theValue) { startQuantityPlayers = theValue; }
|
||||
void setStartQuantityPlayers(int theValue) { startQuantityPlayers = theValue; }
|
||||
int getStartQuantityPlayers() const { return startQuantityPlayers; }
|
||||
|
||||
void setActualRound(const int& theValue) { actualRound = theValue; }
|
||||
void setActualRound(int theValue) { actualRound = theValue; }
|
||||
int getActualRound() const { return actualRound; }
|
||||
|
||||
void setDealerPosition(const int& theValue) { dealerPosition = theValue; }
|
||||
void setDealerPosition(int theValue) { dealerPosition = theValue; }
|
||||
int getDealerPosition() const { return dealerPosition; }
|
||||
|
||||
void setSmallBlind(const int& theValue) { smallBlind = theValue; }
|
||||
void setSmallBlind(int theValue) { smallBlind = theValue; }
|
||||
int getSmallBlind() const { return smallBlind; }
|
||||
|
||||
void setAllInCondition(bool theValue) { allInCondition = theValue; }
|
||||
bool getAllInCondition() const { return allInCondition; }
|
||||
|
||||
void setStartCash(const int& theValue) { startCash = theValue; }
|
||||
void setStartCash(int theValue) { startCash = theValue; }
|
||||
int getStartCash() const { return startCash; }
|
||||
|
||||
void setActivePlayersCounter(const int& theValue) { activePlayersCounter = theValue; }
|
||||
void setActivePlayersCounter(int theValue) { activePlayersCounter = theValue; }
|
||||
int getActivePlayersCounter() const { return activePlayersCounter; }
|
||||
|
||||
void setBettingRoundsPlayed(const int& theValue) { bettingRoundsPlayed = theValue; }
|
||||
void setBettingRoundsPlayed(int theValue) { bettingRoundsPlayed = theValue; }
|
||||
int getBettingRoundsPlayed() const { return bettingRoundsPlayed; }
|
||||
|
||||
void setLastPlayersTurn(const int& theValue) { lastPlayersTurn = theValue; }
|
||||
void setLastPlayersTurn(int theValue) { lastPlayersTurn = theValue; }
|
||||
int getLastPlayersTurn() const { return lastPlayersTurn; }
|
||||
|
||||
void setCardsShown(bool theValue) { cardsShown = theValue; }
|
||||
bool getCardsShown() const { return cardsShown; }
|
||||
|
||||
void switchRounds();
|
||||
|
||||
|
||||
@@ -105,6 +108,7 @@ private:
|
||||
int lastPlayersTurn;
|
||||
|
||||
bool allInCondition;
|
||||
bool cardsShown;
|
||||
|
||||
// hier steht bis zu welcher bettingRound der human player gespielt hat: 0 - nur Preflop, 1 - bis Flop, ...
|
||||
int bettingRoundsPlayed;
|
||||
|
||||
Reference in New Issue
Block a user