adds activePlayerList and runningPlayerList (XXIII) - bugfixes

This commit is contained in:
doitux
2007-09-29 13:22:00 +00:00
parent 4b56af8c42
commit 390837f332
4 changed files with 50 additions and 15 deletions
+3
View File
@@ -68,6 +68,9 @@ protected:
void setHighestSet(int theValue) { highestSet = theValue; }
int getHighestSet() const { return highestSet;}
void setFirstRun(bool theValue) { firstRun = theValue;}
bool getFirstRun() const { return firstRun;}
void setFirstRound(bool theValue) { firstRound = theValue;}
bool getFirstRound() const { return firstRound;}
+36 -5
View File
@@ -30,6 +30,31 @@ LocalBeRoPreflop::LocalBeRoPreflop(HandInterface* hi, int id, unsigned dP, int s
setHighestSet(2*getSmallBlind());
}
LocalBeRoPreflop::~LocalBeRoPreflop()
{
}
void LocalBeRoPreflop::run() {
if(getFirstRun()) {
// determine bigBlindPosition -> old: delete
// for(bigBlindPositionIt=getMyHand()->getActivePlayerList()->begin(); bigBlindPositionIt!=getMyHand()->getActivePlayerList()->end(); bigBlindPositionIt++) {
// if((*bigBlindPositionIt)->getMyButton() == BUTTON_BIG_BLIND) break;
@@ -150,18 +175,22 @@ LocalBeRoPreflop::LocalBeRoPreflop(HandInterface* hi, int id, unsigned dP, int s
}
LocalBeRoPreflop::~LocalBeRoPreflop()
{
}
void LocalBeRoPreflop::run() {
setFirstRun(false);
}
int i;
bool allHighestSet = true;
@@ -262,6 +291,8 @@ void LocalBeRoPreflop::run() {
// }
// }
// cout << "firstRound. " << getFirstRound() << " - allHighestSet: " << allHighestSet << endl;
// prfen, ob Preflop wirklich dran ist
if(!getFirstRound() && allHighestSet) {
+1
View File
@@ -485,6 +485,7 @@ void LocalHand::switchRounds() {
// refresh runningPlayerList
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); ) {
if((*it)->getMyAction() == PLAYER_ACTION_FOLD || (*it)->getMyAction() == PLAYER_ACTION_ALLIN) {
it = runningPlayerList->erase(it);
if(!(runningPlayerList->empty())) {