adds activePlayerList and runningPlayerList (III)

This commit is contained in:
doitux
2007-09-24 14:57:37 +00:00
parent cbd716d53e
commit 876508c540
+21 -6
View File
@@ -365,9 +365,15 @@ void LocalHand::switchRounds() {
for (it=activePlayerList.begin(); it!=activePlayerList.end(); it++) {
if ((*it)->getMyAction() == 6) allInPlayersCounter++;
}
// TODO -> runningPlayerList.size()
int nonFoldPlayerCounter = 0;
for (it=activePlayerList.begin(); it!=activePlayerList.end(); it++) {
if ((*it)->getMyAction() != 1) nonFoldPlayerCounter++;
}
//wenn nur noch einer nicht-folded dann gleich den Pot verteilen
if(activePlayerList.size()==1) {
if(nonFoldPlayerCounter==1) {
myBoard->collectPot();
myGui->refreshPot();
myGui->refreshSet();
@@ -378,17 +384,26 @@ void LocalHand::switchRounds() {
else {
// 1) wenn alle All In
if(allInPlayersCounter == activePlayerList.size()) {
if(allInPlayersCounter == nonFoldPlayerCounter) {
allInCondition = true;
}
// 2) alle bis auf einen All In und der hat HighestSet
if(allInPlayersCounter+1 == activePlayerList.size()) {
if(allInPlayersCounter+1 == nonFoldPlayerCounter) {
// TODO -> runningPlayerList s.u.
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
if(playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyAction() != 6 && playerArray[i]->getMyActiveStatus() == 1 && playerArray[i]->getMySet() >= myBeRo[actualRound]->getHighestSet()) {
allInCondition = 1;
}
if( (*(runningPlayerList.begin()))->getMySet() >= myBeRo[actualRound]->getHighestSet() ) {
allInCondition = 1;
}
// if( (*(runningPlayerList.begin()))->getMySet() >= myBeRo[actualRound]->getHighestSet() ) {
// allInCondition = 1;
// }
// HeadsUp-Ausnahme -> spieler ermitteln, der all in ist und als bb nur weniger als sb setzen konnte
for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {