From 1e88f861a867dec16548e7375ec1313a6c15936c Mon Sep 17 00:00:00 2001 From: doitux Date: Sat, 13 Jan 2007 16:54:08 +0000 Subject: [PATCH] --- src/local_engine/localflop.cpp | 8 ++++---- src/local_engine/localhand.cpp | 6 +++--- src/local_engine/localpreflop.cpp | 6 +++--- src/local_engine/localriver.cpp | 12 ++++++------ src/local_engine/localturn.cpp | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/local_engine/localflop.cpp b/src/local_engine/localflop.cpp index 2865a108..51748485 100755 --- a/src/local_engine/localflop.cpp +++ b/src/local_engine/localflop.cpp @@ -22,7 +22,7 @@ using namespace std; -LocalFlop::LocalFlop(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstFlopRun(TRUE), firstFlopRound(TRUE), playersTurn(dP) +LocalFlop::LocalFlop(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstFlopRun(1), firstFlopRound(1), playersTurn(dP) { int i; @@ -46,7 +46,7 @@ void LocalFlop::flopRun() { if (firstFlopRun) { myHand->getGuiInterface()->dealFlopCards(); - firstFlopRun = FALSE; + firstFlopRun = 0; } @@ -94,13 +94,13 @@ void LocalFlop::flopRun() { do { activePlayerBeforeSmallBlind = (activePlayerBeforeSmallBlind + myHand->getGuiInterface()->getMaxQuantityPlayers() - 1 ) % (myHand->getGuiInterface()->getMaxQuantityPlayers()); } while(!(myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyActiveStatus()) || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==1 || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==6); - myHand->getPlayerArray()[playersTurn]->setMyTurn(TRUE); + myHand->getPlayerArray()[playersTurn]->setMyTurn(1); myHand->getGuiInterface()->refreshGroupbox(); // cout << "activePlayerBeforeSmallBlind " << activePlayerBeforeSmallBlind << endl; // cout << "playersTurn " << playersTurn << endl; // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende - if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstFlopRound = FALSE; } + if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstFlopRound = 0; } if(playersTurn == 0) { // Wir sind dran diff --git a/src/local_engine/localhand.cpp b/src/local_engine/localhand.cpp index 82395713..efc1b20f 100755 --- a/src/local_engine/localhand.cpp +++ b/src/local_engine/localhand.cpp @@ -21,7 +21,7 @@ using namespace std; -LocalHand::LocalHand(GuiInterface *g, LocalBoard *b, LocalPlayer **p, int id, int qP, int dP, int sB,int sC) : myW(w), myGui(g), myBoard(b), playerArray(p), myPreflop(0), myFlop(0), myTurn(0), myRiver(0), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), allInCondition(FALSE) +LocalHand::LocalHand(GuiInterface *g, LocalBoard *b, LocalPlayer **p, int id, int qP, int dP, int sB,int sC) : myGui(g), myBoard(b), playerArray(p), myPreflop(0), myFlop(0), myTurn(0), myRiver(0), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), allInCondition(0) { int i, j; CardsValue myCardsValue; @@ -181,7 +181,7 @@ void LocalHand::switchRounds() { else { // 1) wenn alle All In if(allInPlayersCounter == activePlayersCounter) { - allInCondition = TRUE; + allInCondition = 1; } // 2) alle bis auf einen All In und der hat HighestSet @@ -203,7 +203,7 @@ void LocalHand::switchRounds() { default: {} } if(playerArray[i]->getMySet() >= tempHighestSet) { - allInCondition = TRUE; + allInCondition = 1; } } } diff --git a/src/local_engine/localpreflop.cpp b/src/local_engine/localpreflop.cpp index 08cc250c..aa94507c 100755 --- a/src/local_engine/localpreflop.cpp +++ b/src/local_engine/localpreflop.cpp @@ -22,7 +22,7 @@ using namespace std; -LocalPreflop::LocalPreflop(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), bigBlindPosition(0), smallBlind(sB), highestSet(2*sB), preflopFirstRound(TRUE), playersTurn(0) +LocalPreflop::LocalPreflop(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), bigBlindPosition(0), smallBlind(sB), highestSet(2*sB), preflopFirstRound(1), playersTurn(0) { @@ -95,11 +95,11 @@ void LocalPreflop::preflopRun() { playersTurn = (playersTurn+1)%(myHand->getGuiInterface()->getMaxQuantityPlayers()); // falls BigBlind, dann PreflopFirstRound zuende - if(myHand->getPlayerArray()[playersTurn]->getMyButton() == 3) preflopFirstRound = FALSE; + if(myHand->getPlayerArray()[playersTurn]->getMyButton() == 3) preflopFirstRound = 0; } while(!(myHand->getPlayerArray()[playersTurn]->getMyActiveStatus()) || myHand->getPlayerArray()[playersTurn]->getMyAction() == 1 || myHand->getPlayerArray()[playersTurn]->getMyAction() == 6); - myHand->getPlayerArray()[playersTurn]->setMyTurn(TRUE); + myHand->getPlayerArray()[playersTurn]->setMyTurn(1); myHand->getGuiInterface()->refreshGroupbox(); if(playersTurn == 0) { diff --git a/src/local_engine/localriver.cpp b/src/local_engine/localriver.cpp index 44e930ed..22d876e8 100755 --- a/src/local_engine/localriver.cpp +++ b/src/local_engine/localriver.cpp @@ -23,7 +23,7 @@ using namespace std; -LocalRiver::LocalRiver(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstRiverRun(TRUE), firstRiverRound(TRUE), playersTurn(dP), highestCardsValue(0) +LocalRiver::LocalRiver(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstRiverRun(1), firstRiverRound(1), playersTurn(dP), highestCardsValue(0) { int i; @@ -45,7 +45,7 @@ void LocalRiver::riverRun() { if (firstRiverRun) { myHand->getGuiInterface()->dealRiverCard(); - firstRiverRun = FALSE; + firstRiverRun = 0; } @@ -95,13 +95,13 @@ void LocalRiver::riverRun() { do { activePlayerBeforeSmallBlind = (activePlayerBeforeSmallBlind + myHand->getGuiInterface()->getMaxQuantityPlayers() - 1 ) % (myHand->getGuiInterface()->getMaxQuantityPlayers()); } while(!(myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyActiveStatus()) || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==1 || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==6); - myHand->getPlayerArray()[playersTurn]->setMyTurn(TRUE); + myHand->getPlayerArray()[playersTurn]->setMyTurn(1); myHand->getGuiInterface()->refreshGroupbox(); // cout << "activePlayerBeforeSmallBlind " << activePlayerBeforeSmallBlind << endl; // cout << "playersTurn " << playersTurn << endl; // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende - if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstRiverRound = FALSE; } + if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstRiverRound = 0; } if(playersTurn == 0) { // Wir sind dran @@ -349,9 +349,9 @@ void LocalRiver::distributePot() { for(i=0; igetGuiInterface()->getMaxQuantityPlayers(); i++) { // prfen ob Spieler i zu den Winnern gehᅵt - playerIsWinner = FALSE; + playerIsWinner = 0; for(j=0; j Spieler i gehᅵt zu den Winnern + if(winnersArray[j] == i) playerIsWinner = 1; // -> Spieler i gehᅵt zu den Winnern } // zuerst prfen ob ein gefoldeter Spieler was gesetzt hatte diff --git a/src/local_engine/localturn.cpp b/src/local_engine/localturn.cpp index 95d50013..2bf5aa07 100755 --- a/src/local_engine/localturn.cpp +++ b/src/local_engine/localturn.cpp @@ -22,7 +22,7 @@ using namespace std; -LocalTurn::LocalTurn(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstTurnRun(TRUE), firstTurnRound(TRUE), playersTurn(dP) +LocalTurn::LocalTurn(LocalHand* bR, int id, int qP, int dP, int sB) : myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstTurnRun(1), firstTurnRound(1), playersTurn(dP) { int i; @@ -45,7 +45,7 @@ void LocalTurn::turnRun() { if (firstTurnRun) { myHand->getGuiInterface()->dealTurnCard(); - firstTurnRun = FALSE; + firstTurnRun = 0; } @@ -95,13 +95,13 @@ void LocalTurn::turnRun() { do { activePlayerBeforeSmallBlind = (activePlayerBeforeSmallBlind + myHand->getGuiInterface()->getMaxQuantityPlayers() - 1 ) % (myHand->getGuiInterface()->getMaxQuantityPlayers()); } while(!(myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyActiveStatus()) || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==1 || (myHand->getPlayerArray()[activePlayerBeforeSmallBlind]->getMyAction())==6); - myHand->getPlayerArray()[playersTurn]->setMyTurn(TRUE); + myHand->getPlayerArray()[playersTurn]->setMyTurn(1); myHand->getGuiInterface()->refreshGroupbox(); // cout << "activePlayerBeforeSmallBlind " << activePlayerBeforeSmallBlind << endl; // cout << "playersTurn " << playersTurn << endl; // wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende - if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstTurnRound = FALSE; } + if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind) { firstTurnRound = 0; } if(playersTurn == 0) { // Wir sind dran