bugfix: allin-bug

This commit is contained in:
floty
2007-08-31 13:09:07 +00:00
parent a84f164b8a
commit a0e78485df
6 changed files with 18 additions and 13 deletions
+7 -1
View File
@@ -63,6 +63,7 @@ void LocalBeRo::run() {
break;
case GAME_STATE_RIVER: myHand->getGuiInterface()->logDealBoardCardsMsg(myBeRoID, tempBoardCardsArray[0], tempBoardCardsArray[1], tempBoardCardsArray[2], tempBoardCardsArray[3], tempBoardCardsArray[4]);
break;
default: { cout << "ERROR in localbero.cpp - wrong myBeRoID" << endl;}
}
logBoardCardsDone = 1;
@@ -107,7 +108,9 @@ void LocalBeRo::run() {
myHand->setBettingRoundsPlayed(myBeRoID);
}
if( !(myHand->getActualQuantityPlayers() < 3 && firstHeadsUpRound == 1) ) {
//// !!!!!!!!!!!!! very buggy, rule breaking -> TODO !!!!!!!!!!!!!!!! //////////////
if( !(myHand->getActualQuantityPlayers() < 3 && firstHeadsUpRound == 1) || myHand->getPlayerArray()[playersTurn]->getMyActiveStatus() == 0 ) {
// not first round in heads up (for headsup dealer is smallblind so it is dealers turn)
// naechsten Spieler ermitteln
@@ -115,9 +118,12 @@ void LocalBeRo::run() {
for(i=0; (i<MAX_NUMBER_OF_PLAYERS && !(myHand->getPlayerArray()[playersTurn]->getMyActiveStatus()) || (myHand->getPlayerArray()[playersTurn]->getMyAction())==1 || (myHand->getPlayerArray()[playersTurn]->getMyAction())==6) || i==0; i++) {
playersTurn = (playersTurn+1)%(MAX_NUMBER_OF_PLAYERS);
}
firstHeadsUpRound = 0;
}
else { firstHeadsUpRound = 0; }
////// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ////////////////
//Spieler-Position vor SmallBlind-Position ermitteln
int activePlayerBeforeSmallBlind = smallBlindPosition;
-4
View File
@@ -37,7 +37,6 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
myBoard->setHand(this);
for(i=0; i<startQuantityPlayers; i++) {
playerArray[i]->setHand(this);
// myFlipCards auf 0 setzen
@@ -173,9 +172,6 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// for(i=0; i<4; i++) {
// cout << i << ": " << playerArray[i]->getMyCardsValueInt() << endl;
// }
dealerPosition = 2;
}