BeRo refactoring

This commit is contained in:
doitux
2007-08-08 12:54:20 +00:00
parent 2f04eeb245
commit 6eebcc943f
6 changed files with 44 additions and 21 deletions
+9 -9
View File
@@ -190,7 +190,7 @@ void LocalHand::start() {
void LocalHand::assignButtons() {
int i;
int i,j;
//Aktive Spieler zählen
int activePlayersCounter = 0;
@@ -206,26 +206,26 @@ void LocalHand::assignButtons() {
// assign Small Blind next to dealer. ATTENTION: in heads up it is big blind
i = dealerPosition;
do {
for(j=0; (j<MAX_NUMBER_OF_PLAYERS && !(playerArray[i]->getMyActiveStatus())) || j==0; j++) {
i = (i+1)%(MAX_NUMBER_OF_PLAYERS);
if(playerArray[i]->getMyActiveStatus()) {
if(activePlayersCounter > 2) playerArray[i]->setMyButton(2); //small blind normal
else playerArray[i]->setMyButton(3); //big blind in heads up
else playerArray[i]->setMyButton(3); //big blind in heads up
}
} while(!(playerArray[i]->getMyActiveStatus()));
}
// assign big blind next to small blind. ATTENTION: in heads up it is small blind
do {
for(j=0; (j<MAX_NUMBER_OF_PLAYERS && !(playerArray[i]->getMyActiveStatus())) || j==0; j++) {
i = (i+1)%(MAX_NUMBER_OF_PLAYERS);
if(playerArray[i]->getMyActiveStatus()) {
if(activePlayersCounter > 2) playerArray[i]->setMyButton(3); //big blind normal
else playerArray[i]->setMyButton(2); //small blind in heads up
}
} while(!(playerArray[i]->getMyActiveStatus()));
}
//do sets
for (i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {