This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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; i<myHand->getGuiInterface()->getMaxQuantityPlayers(); i++) {
|
||||
|
||||
// prfen ob Spieler i zu den Winnern gehᅵt
|
||||
playerIsWinner = FALSE;
|
||||
playerIsWinner = 0;
|
||||
for(j=0; j<winnersCounter; j++) {
|
||||
if(winnersArray[j] == i) playerIsWinner = TRUE; // -> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user