Fixing cppcheck "Prefer prefix ++/-- operators for non-primitive types." issues.

This commit is contained in:
lotodore
2011-02-09 14:33:39 +00:00
parent 07a4403e97
commit 4032bf48a2
24 changed files with 173 additions and 173 deletions
+6 -6
View File
@@ -34,7 +34,7 @@ LocalBeRo::LocalBeRo(HandInterface* hi, int id, unsigned dP, int sB, GameState g
PlayerListConstIterator it_c;
// determine bigBlindPosition
for(it_c=myHand->getActivePlayerList()->begin(); it_c!=myHand->getActivePlayerList()->end(); it_c++) {
for(it_c=myHand->getActivePlayerList()->begin(); it_c!=myHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyButton() == BUTTON_BIG_BLIND) {
bigBlindPositionId = (*it_c)->getMyUniqueID();
break;
@@ -45,7 +45,7 @@ LocalBeRo::LocalBeRo(HandInterface* hi, int id, unsigned dP, int sB, GameState g
}
// determine smallBlindPosition
for(it_c=myHand->getActivePlayerList()->begin(); it_c!=myHand->getActivePlayerList()->end(); it_c++) {
for(it_c=myHand->getActivePlayerList()->begin(); it_c!=myHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyButton() == BUTTON_SMALL_BLIND) {
smallBlindPositionId = (*it_c)->getMyUniqueID();
break;
@@ -108,7 +108,7 @@ void LocalBeRo::run() {
for(size_t i=0; i<myHand->getActivePlayerList()->size(); i++) {
if(it_1 == myHand->getActivePlayerList()->begin()) it_1 = myHand->getActivePlayerList()->end();
it_1--;
--it_1;
it_2 = myHand->getRunningPlayerIt((*it_1)->getMyUniqueID());
// running player found
@@ -157,7 +157,7 @@ void LocalBeRo::run() {
// check if all running players have same sets (else allHighestSet = false)
for( it_c = myHand->getRunningPlayerList()->begin(); it_c != myHand->getRunningPlayerList()->end(); it_c++) {
for( it_c = myHand->getRunningPlayerList()->begin(); it_c != myHand->getRunningPlayerList()->end(); ++it_c) {
if(highestSet != (*it_c)->getMySet()) {
allHighestSet = false;
break;
@@ -172,7 +172,7 @@ void LocalBeRo::run() {
myHand->setCurrentRound(myBeRoID+1);
//Action loeschen und ActionButtons refresh
for(it_c=myHand->getRunningPlayerList()->begin(); it_c!=myHand->getRunningPlayerList()->end(); it_c++) {
for(it_c=myHand->getRunningPlayerList()->begin(); it_c!=myHand->getRunningPlayerList()->end(); ++it_c) {
(*it_c)->setMyAction(PLAYER_ACTION_NONE);
}
@@ -205,7 +205,7 @@ void LocalBeRo::run() {
throw LocalException(__FILE__, __LINE__, ERR_RUNNING_PLAYER_NOT_FOUND);
}
currentPlayersTurnIt++;
++currentPlayersTurnIt;
if(currentPlayersTurnIt == myHand->getRunningPlayerList()->end()) currentPlayersTurnIt = myHand->getRunningPlayerList()->begin();
currentPlayersTurnId = (*currentPlayersTurnIt)->getMyUniqueID();
@@ -42,7 +42,7 @@ void LocalBeRoPostRiver::postRiverRun() {
PlayerListIterator it;
// who is the winner
for(it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); it_c++) {
for(it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); ++it_c) {
if( (*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->getMyCardsValueInt() > highestCardsValue ) {
highestCardsValue = (*it_c)->getMyCardsValueInt();
@@ -51,7 +51,7 @@ void LocalBeRoPostRiver::postRiverRun() {
int potPlayers = 0;
for(it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); it_c++) {
for(it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); ++it_c) {
if( (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
potPlayers++;
}
@@ -59,7 +59,7 @@ void LocalBeRoPostRiver::postRiverRun() {
// prüfen ob nur noch human player an der verteilung teilnimmt und myAggressive für human player setzen
if(potPlayers == 1) {
for(it=getMyHand()->getActivePlayerList()->begin(); it!=getMyHand()->getActivePlayerList()->end(); it++) {
for(it=getMyHand()->getActivePlayerList()->begin(); it!=getMyHand()->getActivePlayerList()->end(); ++it) {
if( (*it)->getMyAction() != PLAYER_ACTION_FOLD) {
(*it)->setMyAggressive(true);
}
+4 -4
View File
@@ -65,7 +65,7 @@ void LocalBeRoPreflop::run() {
}
if(it == getMyHand()->getActivePlayerList()->begin()) it = getMyHand()->getActivePlayerList()->end();
it--;
--it;
setFirstRoundLastPlayersTurnId( (*it)->getMyUniqueID() );
@@ -114,7 +114,7 @@ void LocalBeRoPreflop::run() {
PlayerListConstIterator it_c;
// check if all running players have same sets (else allHighestSet = false)
for(it_c=getMyHand()->getRunningPlayerList()->begin(); it_c!=getMyHand()->getRunningPlayerList()->end(); it_c++) {
for(it_c=getMyHand()->getRunningPlayerList()->begin(); it_c!=getMyHand()->getRunningPlayerList()->end(); ++it_c) {
if(getHighestSet() != (*it_c)->getMySet()) {
allHighestSet = false;
break;
@@ -127,7 +127,7 @@ void LocalBeRoPreflop::run() {
throw LocalException(__FILE__, __LINE__, ERR_RUNNING_PLAYER_NOT_FOUND);
}
currentPlayersTurnIt++;
++currentPlayersTurnIt;
if(currentPlayersTurnIt == getMyHand()->getRunningPlayerList()->end()) currentPlayersTurnIt = getMyHand()->getRunningPlayerList()->begin();
setCurrentPlayersTurnId( (*currentPlayersTurnIt)->getMyUniqueID() );
@@ -140,7 +140,7 @@ void LocalBeRoPreflop::run() {
getMyHand()->setCurrentRound(GAME_STATE_FLOP);
//Action loeschen und ActionButtons refresh
for(it_c=getMyHand()->getRunningPlayerList()->begin(); it_c!=getMyHand()->getRunningPlayerList()->end(); it_c++) {
for(it_c=getMyHand()->getRunningPlayerList()->begin(); it_c!=getMyHand()->getRunningPlayerList()->end(); ++it_c) {
(*it_c)->setMyAction(PLAYER_ACTION_NONE);
}
+13 -13
View File
@@ -47,7 +47,7 @@ void LocalBoard::collectSets() {
sets = 0;
PlayerListConstIterator it_c;
for(it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
for(it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c) {
sets += (*it_c)->getMySet();
}
@@ -59,7 +59,7 @@ void LocalBoard::collectPot() {
sets = 0;
PlayerListIterator it;
for(it=seatsList->begin(); it!=seatsList->end(); it++) {
for(it=seatsList->begin(); it!=seatsList->end(); ++it) {
(*it)->setMySetNull();
}
@@ -75,7 +75,7 @@ void LocalBoard::distributePot() {
// filling player sets vector
vector<unsigned> playerSets;
for(it=seatsList->begin(); it!=seatsList->end(); it++) {
for(it=seatsList->begin(); it!=seatsList->end(); ++it) {
if((*it)->getMyActiveStatus()) {
playerSets.push_back( ( ((*it)->getMyRoundStartCash()) - ((*it)->getMyCash()) ) );
} else {
@@ -114,14 +114,14 @@ void LocalBoard::distributePot() {
potLevel.push_back((playerSetsSort.size()-i)*potLevel[0]);
// determine level highestCardsValue
for(it_c=seatsList->begin(), j=0; it_c!=seatsList->end(); it_c++,j++) {
for(it_c=seatsList->begin(), j=0; it_c!=seatsList->end(); ++it_c,j++) {
if((*it_c)->getMyActiveStatus() && (*it_c)->getMyCardsValueInt() > highestCardsValue && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD && playerSets[j] >= potLevel[0]) {
highestCardsValue = (*it_c)->getMyCardsValueInt();
}
}
// level winners
for(it_c=seatsList->begin(), j=0; it_c!=seatsList->end(); it_c++,j++) {
for(it_c=seatsList->begin(), j=0; it_c!=seatsList->end(); ++it_c,j++) {
if((*it_c)->getMyActiveStatus() && highestCardsValue == (*it_c)->getMyCardsValueInt() && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD && playerSets[j] >= potLevel[0]) {
potLevel.push_back((*it_c)->getMyUniqueID());
}
@@ -140,7 +140,7 @@ void LocalBoard::distributePot() {
for(j=2; j<potLevel.size(); j++) {
// find seat with potLevel[j]-ID
for(it=seatsList->begin(); it!=seatsList->end(); it++) {
for(it=seatsList->begin(); it!=seatsList->end(); ++it) {
if((*it)->getMyUniqueID() == potLevel[j]) {
break;
}
@@ -163,7 +163,7 @@ void LocalBoard::distributePot() {
// winnerPointer = currentHand->getDealerPosition();
// find Seat with dealerPosition
for(it=seatsList->begin(); it!=seatsList->end(); it++) {
for(it=seatsList->begin(); it!=seatsList->end(); ++it) {
if((*it)->getMyUniqueID() == dealerPosition) {
break;
}
@@ -182,7 +182,7 @@ void LocalBoard::distributePot() {
// winnerHit = false;
it++;
++it;
if(it == seatsList->end())
it = seatsList->begin();
@@ -256,7 +256,7 @@ void LocalBoard::determinePlayerNeedToShowCards() {
PlayerListConstIterator it_c;
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)->getMyAction() != PLAYER_ACTION_FOLD) {
playerNeedToShowCards.push_back((*it_c)->getMyUniqueID());
}
@@ -296,7 +296,7 @@ void LocalBoard::determinePlayerNeedToShowCards() {
// cout << "lAP-Ende: " << currentHand->getLastActionPlayer() << endl;
// 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() == lastActionPlayer && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
lastActionPlayerIt = it_c;
// cout << (*it_c)->getMyUniqueID() << endl;
@@ -305,7 +305,7 @@ void LocalBoard::determinePlayerNeedToShowCards() {
}
if(it_c == activePlayerList->end()) {
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)->getMyAction() != PLAYER_ACTION_FOLD) {
lastActionPlayerIt = it_c;
break;
@@ -337,7 +337,7 @@ void LocalBoard::determinePlayerNeedToShowCards() {
// firstAfterLastActionPlayerIt++;
it_c = lastActionPlayerIt;
it_c++;
++it_c;
for(unsigned i = 0; i < activePlayerList->size(); i++) {
@@ -404,7 +404,7 @@ void LocalBoard::determinePlayerNeedToShowCards() {
}
it_c++;
++it_c;
}
+29 -29
View File
@@ -40,7 +40,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
CardsValue myCardsValue;
for(it=seatsList->begin(); it!=seatsList->end(); it++) {
for(it=seatsList->begin(); it!=seatsList->end(); ++it) {
(*it)->setHand(this);
// set myFlipCards 0
(*it)->setMyCardsFlip(0, 0);
@@ -61,7 +61,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
k = 0;
myBoard->setMyCards(tempBoardArray);
for(it=activePlayerList->begin(); it!=activePlayerList->end(); it++, k++) {
for(it=activePlayerList->begin(); it!=activePlayerList->end(); ++it, k++) {
(*it)->getMyBestHandPosition(bestHandPos);
@@ -144,7 +144,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
(*it)->setMyBestHandPosition(temp5Array);
// player1
it++;
++it;
tempPlayerArray[0] = 31;
tempPlayerArray[1] = 8;
@@ -157,7 +157,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
(*it)->setMyBestHandPosition(temp5Array);
// player2
it++;
++it;
tempPlayerArray[0] = 26;
tempPlayerArray[1] = 27;
@@ -170,7 +170,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
(*it)->setMyBestHandPosition(temp5Array);
// player3
it++;
++it;
tempPlayerArray[0] = 31;
tempPlayerArray[1] = 30;
@@ -183,7 +183,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
(*it)->setMyBestHandPosition(temp5Array);
// player4
it++;
++it;
tempPlayerArray[0] = 50;
tempPlayerArray[1] = 51;
@@ -196,7 +196,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
(*it)->setMyBestHandPosition(temp5Array);
// player5
it++;
++it;
tempPlayerArray[0] = 25;
tempPlayerArray[1] = 24;
@@ -209,7 +209,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
(*it)->setMyBestHandPosition(temp5Array);
// player6
it++;
++it;
tempPlayerArray[0] = 38;
tempPlayerArray[1] = 37;
@@ -222,7 +222,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
(*it)->setMyBestHandPosition(temp5Array);
// player7
it++;
++it;
tempPlayerArray[0] = 32;
tempPlayerArray[1] = 33;
@@ -235,7 +235,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
(*it)->setMyBestHandPosition(temp5Array);
// player8
it++;
++it;
tempPlayerArray[0] = 19;
tempPlayerArray[1] = 20;
@@ -279,7 +279,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
// (*it)->setMyBestHandPosition(temp5Array);
// player1
it++;
++it;
// tempPlayerArray[0] = 47;
// tempPlayerArray[1] = 22;
@@ -292,7 +292,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
// (*it)->setMyBestHandPosition(temp5Array);
// player2
it++;
++it;
// tempPlayerArray[0] = 33;
// tempPlayerArray[1] = 27;
@@ -305,7 +305,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
// (*it)->setMyBestHandPosition(temp5Array);
// player3
it++;
++it;
// tempPlayerArray[0] = 38;
// tempPlayerArray[1] = 22;
@@ -318,7 +318,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
// (*it)->setMyBestHandPosition(temp5Array);
// player4
it++;
++it;
// tempPlayerArray[0] = 25;
// tempPlayerArray[1] = 16;
@@ -331,7 +331,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
// (*it)->setMyBestHandPosition(temp5Array);
// player5
it++;
++it;
// tempPlayerArray[0] = 27;
// tempPlayerArray[1] = 10;
@@ -396,7 +396,7 @@ void LocalHand::assignButtons() {
PlayerListConstIterator it_c;
// delete all buttons
for (it=seatsList->begin(); it!=seatsList->end(); it++) {
for (it=seatsList->begin(); it!=seatsList->end(); ++it) {
(*it)->setMyButton(BUTTON_NONE);
}
@@ -418,7 +418,7 @@ void LocalHand::assignButtons() {
for(i=0; i<seatsList->size(); i++) {
dealerPositionIt++;
++dealerPositionIt;
if(dealerPositionIt == seatsList->end()) dealerPositionIt = seatsList->begin();
it = getActivePlayerIt( (*dealerPositionIt)->getMyUniqueID() );
@@ -439,7 +439,7 @@ void LocalHand::assignButtons() {
lastActionPlayer = (*it)->getMyUniqueID();
myBoard->setLastActionPlayer(lastActionPlayer);
it++;
++it;
if(it == activePlayerList->end()) it = activePlayerList->begin();
if(activePlayerList->size() > 2) {
@@ -463,7 +463,7 @@ void LocalHand::assignButtons() {
// cout << "lAP-Button: " << lastActionPlayer << endl;
//do sets --> TODO switch?
for (it_c=runningPlayerList->begin(); it_c!=runningPlayerList->end(); it_c++) {
for (it_c=runningPlayerList->begin(); it_c!=runningPlayerList->end(); ++it_c) {
//small blind
if((*it_c)->getMyButton() == BUTTON_SMALL_BLIND) {
@@ -514,24 +514,24 @@ void LocalHand::switchRounds() {
it_1 = it;
if(it_1 == runningPlayerList->begin()) it_1 = runningPlayerList->end();
it_1--;
--it_1;
getCurrentBeRo()->setCurrentPlayersTurnId((*it_1)->getMyUniqueID());
}
} else {
it++;
++it;
}
}
// determine number of all in players
int allInPlayersCounter = 0;
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)->getMyAction() == PLAYER_ACTION_ALLIN) allInPlayersCounter++;
}
// determine number of non-fold players
int nonFoldPlayerCounter = 0;
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)->getMyAction() != PLAYER_ACTION_FOLD) nonFoldPlayerCounter++;
}
@@ -556,7 +556,7 @@ void LocalHand::switchRounds() {
// 2) all players but one all in and he has highest set
if(allInPlayersCounter+1 == nonFoldPlayerCounter) {
for(it_c=runningPlayerList->begin(); it_c!=runningPlayerList->end(); it_c++) {
for(it_c=runningPlayerList->begin(); it_c!=runningPlayerList->end(); ++it_c) {
if((*it_c)->getMySet() >= myBeRo[currentRound]->getHighestSet()) {
allInCondition = true;
@@ -572,7 +572,7 @@ void LocalHand::switchRounds() {
if(smallBlindIt_c!=runningPlayerList->end() && bigBlindIt_c!=activePlayerList->end() && currentRound == GAME_STATE_PREFLOP && myBeRo[currentRound]->getFirstRound()) {
// determine player who are all in with less than small blind amount
int tempCounter = 0;
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)->getMyAction() == PLAYER_ACTION_ALLIN && (*it_c)->getMySet() <= smallBlind) {
tempCounter++;
}
@@ -584,7 +584,7 @@ void LocalHand::switchRounds() {
}
// no.2: heads up -> detect player who is all in and bb but could set less than sb
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); ++it_c) {
if(activePlayerList->size()==2 && (*it_c)->getMyAction() == PLAYER_ACTION_ALLIN && (*it_c)->getMyButton()==BUTTON_BIG_BLIND && (*it_c)->getMySet()<=smallBlind && currentRound == GAME_STATE_PREFLOP) {
allInCondition = true;
@@ -659,7 +659,7 @@ PlayerListIterator LocalHand::getSeatIt(unsigned uniqueId) const {
PlayerListIterator it;
for(it=seatsList->begin(); it!=seatsList->end(); it++) {
for(it=seatsList->begin(); it!=seatsList->end(); ++it) {
if((*it)->getMyUniqueID() == uniqueId) {
break;
}
@@ -673,7 +673,7 @@ PlayerListIterator LocalHand::getActivePlayerIt(unsigned uniqueId) const {
PlayerListIterator it;
for(it=activePlayerList->begin(); it!=activePlayerList->end(); it++) {
for(it=activePlayerList->begin(); it!=activePlayerList->end(); ++it) {
if((*it)->getMyUniqueID() == uniqueId) {
break;
}
@@ -687,7 +687,7 @@ PlayerListIterator LocalHand::getRunningPlayerIt(unsigned uniqueId) const {
PlayerListIterator it;
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); it++) {
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); ++it) {
if((*it)->getMyUniqueID() == uniqueId) {
break;
+9 -9
View File
@@ -1150,7 +1150,7 @@ void LocalPlayer::preflopEngine() {
// count number of active human players
size_t countHumanPlayers = 0;
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyType() == PLAYER_TYPE_HUMAN) {
countHumanPlayers++;
}
@@ -1159,7 +1159,7 @@ void LocalPlayer::preflopEngine() {
// local or network game and only one human player is active --> set aggValue
if(countHumanPlayers == 1) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyType() == PLAYER_TYPE_HUMAN && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
int aggValue = (int)((( (*it_c)->getMyAggressive()*1.0)/7.0 - 1.0/currentHand->getActivePlayerList()->size())*21.0);
myNiveau[0] -= aggValue;
@@ -1506,7 +1506,7 @@ void LocalPlayer::flopEngine() {
// count number of active human players
size_t countHumanPlayers = 0;
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyType() == PLAYER_TYPE_HUMAN) {
countHumanPlayers++;
}
@@ -1515,7 +1515,7 @@ void LocalPlayer::flopEngine() {
// local or network game and only one human player is active --> set aggValue
if(countHumanPlayers == 1) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyType() == PLAYER_TYPE_HUMAN && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
int aggValue = (int)((( (*it_c)->getMyAggressive()*1.0)/7.0 - 1.0/currentHand->getActivePlayerList()->size())*21.0);
myNiveau[0] -= aggValue;
@@ -2201,7 +2201,7 @@ void LocalPlayer::turnEngine() {
// count number of active human players
size_t countHumanPlayers = 0;
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyType() == PLAYER_TYPE_HUMAN) {
countHumanPlayers++;
}
@@ -2210,7 +2210,7 @@ void LocalPlayer::turnEngine() {
// local or network game and only one human player is active --> set aggValue
if(countHumanPlayers == 1) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyType() == PLAYER_TYPE_HUMAN && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
int aggValue = (int)((( (*it_c)->getMyAggressive()*1.0)/7.0 - 1.0/currentHand->getActivePlayerList()->size())*21.0);
myNiveau[0] -= aggValue;
@@ -2729,7 +2729,7 @@ void LocalPlayer::riverEngine() {
// count number of active human players
size_t countHumanPlayers = 0;
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyType() == PLAYER_TYPE_HUMAN) {
countHumanPlayers++;
}
@@ -2738,7 +2738,7 @@ void LocalPlayer::riverEngine() {
// local or network game and only one human player is active --> set aggValue
if(countHumanPlayers == 1) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); ++it_c) {
if((*it_c)->getMyType() == PLAYER_TYPE_HUMAN && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
int aggValue = (int)((( (*it_c)->getMyAggressive()*1.0)/7.0 - 1.0/currentHand->getActivePlayerList()->size())*21.0);
myNiveau[0] -= aggValue;
@@ -5131,7 +5131,7 @@ LocalPlayer::resetActionTimeoutCounter()
bool LocalPlayer::checkIfINeedToShowCards()
{
std::list<unsigned> playerNeedToShowCardsList = currentHand->getBoard()->getPlayerNeedToShowCards();
for(std::list<unsigned>::iterator it = playerNeedToShowCardsList.begin(); it != playerNeedToShowCardsList.end(); it++)
for(std::list<unsigned>::iterator it = playerNeedToShowCardsList.begin(); it != playerNeedToShowCardsList.end(); ++it)
{
if(*it == myUniqueID) return true;
}