establishing new parameter roundBeforePostRiver; deleting needless parameter bettingRoundsPlayed
This commit is contained in:
@@ -54,6 +54,7 @@ public:
|
|||||||
|
|
||||||
virtual void setCurrentRound(GameState theValue) =0;
|
virtual void setCurrentRound(GameState theValue) =0;
|
||||||
virtual GameState getCurrentRound() const =0;
|
virtual GameState getCurrentRound() const =0;
|
||||||
|
virtual GameState getRoundBeforePostRiver() const =0;
|
||||||
|
|
||||||
virtual void setDealerPosition(int theValue) =0;
|
virtual void setDealerPosition(int theValue) =0;
|
||||||
virtual int getDealerPosition() const =0;
|
virtual int getDealerPosition() const =0;
|
||||||
@@ -67,9 +68,6 @@ public:
|
|||||||
virtual void setStartCash(int theValue) =0;
|
virtual void setStartCash(int theValue) =0;
|
||||||
virtual int getStartCash() const =0;
|
virtual int getStartCash() const =0;
|
||||||
|
|
||||||
virtual void setBettingRoundsPlayed(int theValue) =0;
|
|
||||||
virtual int getBettingRoundsPlayed() const =0;
|
|
||||||
|
|
||||||
virtual void setPreviousPlayerID(int theValue) =0;
|
virtual void setPreviousPlayerID(int theValue) =0;
|
||||||
virtual int getPreviousPlayerID() const =0;
|
virtual int getPreviousPlayerID() const =0;
|
||||||
|
|
||||||
|
|||||||
@@ -198,15 +198,6 @@ void LocalBeRo::run()
|
|||||||
} else {
|
} else {
|
||||||
// aktuelle bero ist wirklich dran
|
// aktuelle bero ist wirklich dran
|
||||||
|
|
||||||
// Anzahl der effektiv gespielten Runden (des human player) erhöhen
|
|
||||||
it_c = myHand->getActivePlayerIt(0);
|
|
||||||
if( it_c != myHand->getActivePlayerList()->end() ) {
|
|
||||||
// human player is active
|
|
||||||
if( (*it_c)->getMyAction() != PLAYER_ACTION_FOLD ) {
|
|
||||||
myHand->setBettingRoundsPlayed(myBeRoID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// determine next running player
|
// determine next running player
|
||||||
PlayerListConstIterator currentPlayersTurnIt = myHand->getRunningPlayerIt( currentPlayersTurnId );
|
PlayerListConstIterator currentPlayersTurnIt = myHand->getRunningPlayerIt( currentPlayersTurnId );
|
||||||
if(currentPlayersTurnIt == myHand->getRunningPlayerList()->end()) {
|
if(currentPlayersTurnIt == myHand->getRunningPlayerList()->end()) {
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ void LocalBoard::distributePot()
|
|||||||
int highestCardsValue;
|
int highestCardsValue;
|
||||||
size_t winnerCount;
|
size_t winnerCount;
|
||||||
size_t mod;
|
size_t mod;
|
||||||
// int winnerPointer;
|
|
||||||
bool winnerHit;
|
bool winnerHit;
|
||||||
|
|
||||||
// level loop
|
// level loop
|
||||||
@@ -161,8 +160,6 @@ void LocalBoard::distributePot()
|
|||||||
// --> distribution after smallBlind
|
// --> distribution after smallBlind
|
||||||
else {
|
else {
|
||||||
|
|
||||||
// winnerPointer = currentHand->getDealerPosition();
|
|
||||||
|
|
||||||
// find Seat with dealerPosition
|
// find Seat with dealerPosition
|
||||||
for(it=seatsList->begin(); it!=seatsList->end(); ++it) {
|
for(it=seatsList->begin(); it!=seatsList->end(); ++it) {
|
||||||
if((*it)->getMyUniqueID() == dealerPosition) {
|
if((*it)->getMyUniqueID() == dealerPosition) {
|
||||||
@@ -179,25 +176,16 @@ void LocalBoard::distributePot()
|
|||||||
|
|
||||||
for(k=0; k<MAX_NUMBER_OF_PLAYERS && !winnerHit; k++) {
|
for(k=0; k<MAX_NUMBER_OF_PLAYERS && !winnerHit; k++) {
|
||||||
|
|
||||||
// winnerPointer = (winnerPointer+1)%(MAX_NUMBER_OF_PLAYERS);
|
|
||||||
|
|
||||||
// winnerHit = false;
|
|
||||||
|
|
||||||
++it;
|
++it;
|
||||||
if(it == seatsList->end())
|
if(it == seatsList->end())
|
||||||
it = seatsList->begin();
|
it = seatsList->begin();
|
||||||
|
|
||||||
for(l=2; l<potLevel.size(); l++) {
|
for(l=2; l<potLevel.size(); l++) {
|
||||||
// if(winnerPointer == potLevel[l]) winnerHit = true;
|
|
||||||
if((*it)->getMyUniqueID() == potLevel[l]) winnerHit = true;
|
if((*it)->getMyUniqueID() == potLevel[l]) winnerHit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// it = currentHand->getSeatIt(winnerPointer);
|
|
||||||
// if(it == seatsList->end()) {
|
|
||||||
// throw LocalException(__FILE__, __LINE__, ERR_SEAT_NOT_FOUND);
|
|
||||||
// }
|
|
||||||
if(j<mod) {
|
if(j<mod) {
|
||||||
(*it)->setMyCash( (*it)->getMyCash() + (int)((potLevel[1])/winnerCount) + 1);
|
(*it)->setMyCash( (*it)->getMyCash() + (int)((potLevel[1])/winnerCount) + 1);
|
||||||
// filling winners vector
|
// filling winners vector
|
||||||
@@ -268,40 +256,17 @@ void LocalBoard::determinePlayerNeedToShowCards()
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// all winners have to show their cards
|
// all winners have to show their cards
|
||||||
// playerNeedToShowCards = winners;
|
|
||||||
|
|
||||||
// std::_List_const_iterator<unsigned> it_c;
|
|
||||||
|
|
||||||
std::list<std::pair<int,int> > level;
|
std::list<std::pair<int,int> > level;
|
||||||
|
|
||||||
// for(it_c=winners.begin(); it_c != winners.end(); ++it_c) {
|
|
||||||
// cout << (*it_c) << endl;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// cout << "lastActionPlayer" << currentHand->getCurrentBeRo()->getLastActionPlayer() << endl;
|
|
||||||
//
|
|
||||||
// int lastActionPlayer = ;
|
|
||||||
//
|
|
||||||
// if(lastActionPlayer == -1) {
|
|
||||||
// lastActionPlayer = 0;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
PlayerListConstIterator lastActionPlayerIt;
|
PlayerListConstIterator lastActionPlayerIt;
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
|
|
||||||
// cout << "lAP-Ende: " << currentHand->getLastActionPlayer() << endl;
|
|
||||||
// search lastActionPlayer
|
// search lastActionPlayer
|
||||||
for(it_c = activePlayerList->begin(); it_c != activePlayerList->end(); ++it_c) {
|
for(it_c = activePlayerList->begin(); it_c != activePlayerList->end(); ++it_c) {
|
||||||
if((*it_c)->getMyUniqueID() == lastActionPlayerID && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
if((*it_c)->getMyUniqueID() == lastActionPlayerID && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||||
lastActionPlayerIt = it_c;
|
lastActionPlayerIt = it_c;
|
||||||
// cout << (*it_c)->getMyUniqueID() << endl;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,27 +283,16 @@ void LocalBoard::determinePlayerNeedToShowCards()
|
|||||||
// the player who has done the last action has to show his cards first
|
// the player who has done the last action has to show his cards first
|
||||||
playerNeedToShowCards.push_back((*lastActionPlayerIt)->getMyUniqueID());
|
playerNeedToShowCards.push_back((*lastActionPlayerIt)->getMyUniqueID());
|
||||||
|
|
||||||
// cout << (*lastActionPlayerIt)->getMyUniqueID() << " - " << (*lastActionPlayerIt)->getMyName() << endl;
|
|
||||||
|
|
||||||
// int *level_tmp = new int[2];
|
|
||||||
std::pair<int,int> level_tmp;
|
std::pair<int,int> level_tmp;
|
||||||
// get position und cardsValue of the player who show his cards first
|
// get position und cardsValue of the player who show his cards first
|
||||||
level_tmp.first = (*lastActionPlayerIt)->getMyCardsValueInt();
|
level_tmp.first = (*lastActionPlayerIt)->getMyCardsValueInt();
|
||||||
level_tmp.second = (*lastActionPlayerIt)->getMyRoundStartCash()-(*lastActionPlayerIt)->getMyCash();
|
level_tmp.second = (*lastActionPlayerIt)->getMyRoundStartCash()-(*lastActionPlayerIt)->getMyCash();
|
||||||
|
|
||||||
// level_tmp = {(*lastActionPlayerIt)->getMyCardsValueInt(),(*lastActionPlayerIt)->getMyRoundStartCash()-(*lastActionPlayerIt)->getMyCash()};
|
|
||||||
|
|
||||||
// cout << level_tmp[0] << "," << level_tmp[1] << endl;
|
|
||||||
|
|
||||||
level.push_back(level_tmp);
|
level.push_back(level_tmp);
|
||||||
|
|
||||||
std::list<std::pair<int,int> >::iterator level_it;
|
std::list<std::pair<int,int> >::iterator level_it;
|
||||||
// std::list<std::pair<int,int> >::iterator level_it_tmp;
|
|
||||||
std::list<std::pair<int,int> >::iterator next_level_it;
|
std::list<std::pair<int,int> >::iterator next_level_it;
|
||||||
|
|
||||||
// PlayerListConstIterator firstAfterLastActionPlayerIt = lastActionPlayerIt;
|
|
||||||
// firstAfterLastActionPlayerIt++;
|
|
||||||
|
|
||||||
it_c = lastActionPlayerIt;
|
it_c = lastActionPlayerIt;
|
||||||
++it_c;
|
++it_c;
|
||||||
|
|
||||||
@@ -347,19 +301,13 @@ void LocalBoard::determinePlayerNeedToShowCards()
|
|||||||
if(it_c == activePlayerList->end()) it_c = activePlayerList->begin();
|
if(it_c == activePlayerList->end()) it_c = activePlayerList->begin();
|
||||||
|
|
||||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||||
// for(it_c = firstAfterLastActionPlayerIt; it_c != lastActionPlayerIt; ++it_c) {
|
|
||||||
|
|
||||||
// if(it_c == lastActionPlayerIt) {
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
for(level_it = level.begin(); level_it != level.end(); ++level_it) {
|
for(level_it = level.begin(); level_it != level.end(); ++level_it) {
|
||||||
if((*it_c)->getMyCardsValueInt() > (*level_it).first) {
|
if((*it_c)->getMyCardsValueInt() > (*level_it).first) {
|
||||||
next_level_it = level_it;
|
next_level_it = level_it;
|
||||||
++next_level_it;
|
++next_level_it;
|
||||||
if(next_level_it == level.end()) {
|
if(next_level_it == level.end()) {
|
||||||
playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
|
playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
|
||||||
// level_tmp = new int[2];
|
|
||||||
level_tmp.first = (*it_c)->getMyCardsValueInt();
|
level_tmp.first = (*it_c)->getMyCardsValueInt();
|
||||||
level_tmp.second = (*it_c)->getMyRoundStartCash()-(*it_c)->getMyCash();
|
level_tmp.second = (*it_c)->getMyRoundStartCash()-(*it_c)->getMyCash();
|
||||||
level.push_back(level_tmp);
|
level.push_back(level_tmp);
|
||||||
@@ -369,11 +317,6 @@ void LocalBoard::determinePlayerNeedToShowCards()
|
|||||||
if((*it_c)->getMyCardsValueInt() == (*level_it).first) {
|
if((*it_c)->getMyCardsValueInt() == (*level_it).first) {
|
||||||
next_level_it = level_it;
|
next_level_it = level_it;
|
||||||
++next_level_it;
|
++next_level_it;
|
||||||
//
|
|
||||||
// for(level_it_tmp = level.begin(); level_it_tmp != level.end(); level_it_tmp++) {
|
|
||||||
// cout << (*level_it_tmp)[0] << "," << (*level_it_tmp)[1] << endl;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if(next_level_it == level.end() || (*it_c)->getMyRoundStartCash()-(*it_c)->getMyCash() > (*next_level_it).second) {
|
if(next_level_it == level.end() || (*it_c)->getMyRoundStartCash()-(*it_c)->getMyCash() > (*next_level_it).second) {
|
||||||
playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
|
playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
|
||||||
@@ -385,20 +328,11 @@ void LocalBoard::determinePlayerNeedToShowCards()
|
|||||||
} else {
|
} else {
|
||||||
if((*it_c)->getMyRoundStartCash()-(*it_c)->getMyCash() > (*level_it).second) {
|
if((*it_c)->getMyRoundStartCash()-(*it_c)->getMyCash() > (*level_it).second) {
|
||||||
playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
|
playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
|
||||||
// level_tmp = new int(2);
|
|
||||||
level_tmp.first = (*it_c)->getMyCardsValueInt();
|
level_tmp.first = (*it_c)->getMyCardsValueInt();
|
||||||
level_tmp.second = (*it_c)->getMyRoundStartCash()-(*it_c)->getMyCash();
|
level_tmp.second = (*it_c)->getMyRoundStartCash()-(*it_c)->getMyCash();
|
||||||
//
|
|
||||||
// for(level_it_tmp = level.begin(); level_it_tmp != level.end(); level_it_tmp++) {
|
|
||||||
// cout << (*level_it_tmp)[0] << "," << (*level_it_tmp)[1] << endl;
|
|
||||||
// }
|
|
||||||
|
|
||||||
level.insert(level_it,level_tmp);
|
level.insert(level_it,level_tmp);
|
||||||
|
|
||||||
// for(level_it_tmp = level.begin(); level_it_tmp != level.end(); level_it_tmp++) {
|
|
||||||
// cout << (*level_it_tmp)[0] << "," << (*level_it_tmp)[1] << endl;
|
|
||||||
// }
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -411,31 +345,8 @@ void LocalBoard::determinePlayerNeedToShowCards()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// for(level_it = level.begin(); level_it != level.end(); ++level_it) {
|
|
||||||
// delete[] *level_it;
|
|
||||||
// }
|
|
||||||
level.clear();
|
level.clear();
|
||||||
|
|
||||||
// bool showCards;
|
|
||||||
|
|
||||||
// search for more player who have to show their cards (perhaps not all situation are considered yet)
|
|
||||||
// for(it_c = ++lastActionPlayerIt; it_c!=activePlayerList->end(); ++it_c) {
|
|
||||||
//
|
|
||||||
// showCards = false;
|
|
||||||
//
|
|
||||||
//// if((*it_c)->getMyCardsValueInt() >= highestCardsValueInt) {
|
|
||||||
//// playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
|
|
||||||
//// highestCardsValueInt = (*it_c)->getMyCardsValueInt();
|
|
||||||
//// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// for(it_c = activePlayerList->begin(); it_c!=lastActionPlayerIt; ++it_c) {
|
|
||||||
//// if((*it_c)->getMyCardsValueInt() >= highestCardsValueInt) {
|
|
||||||
//// playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
|
|
||||||
//// highestCardsValueInt = (*it_c)->getMyCardsValueInt();
|
|
||||||
//// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -443,11 +354,4 @@ void LocalBoard::determinePlayerNeedToShowCards()
|
|||||||
playerNeedToShowCards.sort();
|
playerNeedToShowCards.sort();
|
||||||
playerNeedToShowCards.unique();
|
playerNeedToShowCards.unique();
|
||||||
|
|
||||||
// std::_List_iterator<unsigned> playerNeedToShowCardsIt;
|
|
||||||
//
|
|
||||||
// for(playerNeedToShowCardsIt = playerNeedToShowCards.begin(); playerNeedToShowCardsIt!=playerNeedToShowCards.end(); playerNeedToShowCardsIt++) {
|
|
||||||
// cout << (*playerNeedToShowCardsIt) << '\t';
|
|
||||||
// }
|
|
||||||
// cout << endl;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,8 +30,8 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost::shared_ptr<BoardInterface> b, Log *l, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, unsigned dP, int sB,int sC)
|
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost::shared_ptr<BoardInterface> b, Log *l, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, unsigned dP, int sB,int sC)
|
||||||
: myFactory(f), myGui(g), myBoard(b), myLog(l), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), smallBlindPosition(dP), bigBlindPosition(dP), currentRound(GAME_STATE_PREFLOP), smallBlind(sB), startCash(sC), previousPlayerID(-1), lastActionPlayerID(0), allInCondition(false),
|
: myFactory(f), myGui(g), myBoard(b), myLog(l), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), smallBlindPosition(dP), bigBlindPosition(dP), currentRound(GAME_STATE_PREFLOP), roundBeforePostRiver(GAME_STATE_PREFLOP), smallBlind(sB), startCash(sC), previousPlayerID(-1), lastActionPlayerID(0), allInCondition(false),
|
||||||
cardsShown(false), bettingRoundsPlayed(0)
|
cardsShown(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
@@ -656,40 +656,34 @@ void LocalHand::switchRounds()
|
|||||||
|
|
||||||
myGui->refreshGameLabels((GameState)getCurrentRound());
|
myGui->refreshGameLabels((GameState)getCurrentRound());
|
||||||
|
|
||||||
|
if(currentRound < GAME_STATE_POST_RIVER) {
|
||||||
|
roundBeforePostRiver = currentRound;
|
||||||
|
}
|
||||||
|
|
||||||
switch(currentRound) {
|
switch(currentRound) {
|
||||||
case 0: {
|
case GAME_STATE_PREFLOP: {
|
||||||
// start preflop
|
|
||||||
myGui->preflopAnimation1();
|
myGui->preflopAnimation1();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: {
|
case GAME_STATE_FLOP: {
|
||||||
// start flop
|
|
||||||
myGui->flopAnimation1();
|
myGui->flopAnimation1();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: {
|
case GAME_STATE_TURN: {
|
||||||
// start turn
|
|
||||||
myGui->turnAnimation1();
|
myGui->turnAnimation1();
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3: {
|
case GAME_STATE_RIVER: {
|
||||||
// start river
|
|
||||||
myGui->riverAnimation1();
|
myGui->riverAnimation1();
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4: {
|
case GAME_STATE_POST_RIVER: {
|
||||||
// start post river
|
|
||||||
myGui->postRiverAnimation1();
|
myGui->postRiverAnimation1();
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,6 +94,9 @@ public:
|
|||||||
GameState getCurrentRound() const {
|
GameState getCurrentRound() const {
|
||||||
return currentRound;
|
return currentRound;
|
||||||
}
|
}
|
||||||
|
GameState getRoundBeforePostRiver() const {
|
||||||
|
return roundBeforePostRiver;
|
||||||
|
}
|
||||||
|
|
||||||
void setDealerPosition(int theValue) {
|
void setDealerPosition(int theValue) {
|
||||||
dealerPosition = theValue;
|
dealerPosition = theValue;
|
||||||
@@ -123,13 +126,6 @@ public:
|
|||||||
return startCash;
|
return startCash;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setBettingRoundsPlayed(int theValue) {
|
|
||||||
bettingRoundsPlayed = theValue;
|
|
||||||
}
|
|
||||||
int getBettingRoundsPlayed() const {
|
|
||||||
return bettingRoundsPlayed;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setPreviousPlayerID(int theValue) {
|
void setPreviousPlayerID(int theValue) {
|
||||||
previousPlayerID = theValue;
|
previousPlayerID = theValue;
|
||||||
}
|
}
|
||||||
@@ -178,6 +174,7 @@ private:
|
|||||||
unsigned smallBlindPosition;
|
unsigned smallBlindPosition;
|
||||||
unsigned bigBlindPosition;
|
unsigned bigBlindPosition;
|
||||||
GameState currentRound;
|
GameState currentRound;
|
||||||
|
GameState roundBeforePostRiver;
|
||||||
int smallBlind;
|
int smallBlind;
|
||||||
int startCash;
|
int startCash;
|
||||||
|
|
||||||
@@ -186,9 +183,6 @@ private:
|
|||||||
|
|
||||||
bool allInCondition;
|
bool allInCondition;
|
||||||
bool cardsShown;
|
bool cardsShown;
|
||||||
|
|
||||||
// hier steht bis zu welcher bettingRound der human player gespielt hat: 0 - nur Preflop, 1 - bis Flop, ...
|
|
||||||
int bettingRoundsPlayed;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
using namespace std;
|
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)
|
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),
|
smallBlind(sB), startCash(sC), previousPlayerID(-1), allInCondition(0),
|
||||||
cardsShown(false), bettingRoundsPlayed(0)
|
cardsShown(false)
|
||||||
{
|
{
|
||||||
PlayerListIterator it;
|
PlayerListIterator it;
|
||||||
|
|
||||||
@@ -216,6 +216,13 @@ ClientHand::getCurrentRound() const
|
|||||||
return currentRound;
|
return currentRound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GameState
|
||||||
|
ClientHand::getRoundBeforePostRiver() const
|
||||||
|
{
|
||||||
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||||
|
return roundBeforePostRiver;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientHand::setDealerPosition(int theValue)
|
ClientHand::setDealerPosition(int theValue)
|
||||||
{
|
{
|
||||||
@@ -272,20 +279,6 @@ ClientHand::getStartCash() const
|
|||||||
return startCash;
|
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
|
void
|
||||||
ClientHand::setPreviousPlayerID(int theValue)
|
ClientHand::setPreviousPlayerID(int theValue)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public:
|
|||||||
|
|
||||||
void setCurrentRound ( GameState theValue );
|
void setCurrentRound ( GameState theValue );
|
||||||
GameState getCurrentRound() const;
|
GameState getCurrentRound() const;
|
||||||
|
GameState getRoundBeforePostRiver() const;
|
||||||
|
|
||||||
void setDealerPosition ( int theValue );
|
void setDealerPosition ( int theValue );
|
||||||
int getDealerPosition() const;
|
int getDealerPosition() const;
|
||||||
@@ -116,6 +117,7 @@ private:
|
|||||||
int startQuantityPlayers;
|
int startQuantityPlayers;
|
||||||
unsigned dealerPosition;
|
unsigned dealerPosition;
|
||||||
GameState currentRound;
|
GameState currentRound;
|
||||||
|
GameState roundBeforePostRiver;
|
||||||
int smallBlind;
|
int smallBlind;
|
||||||
int startCash;
|
int startCash;
|
||||||
|
|
||||||
@@ -124,9 +126,6 @@ private:
|
|||||||
|
|
||||||
bool allInCondition;
|
bool allInCondition;
|
||||||
bool cardsShown;
|
bool cardsShown;
|
||||||
|
|
||||||
// hier steht bis zu welcher bettingRound der human player gespielt hat: 0 - nur Preflop, 1 - bis Flop, ...
|
|
||||||
int bettingRoundsPlayed;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user