logging not longer in mainwindow
This commit is contained in:
@@ -91,7 +91,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
||||
|
||||
// myFlipCards auf 0 setzen
|
||||
for(i=0; i<startQuantityPlayers; i++) {
|
||||
playerArray[i]->setMyCardsFlip(0);
|
||||
playerArray[i]->setMyCardsFlip(0, 0);
|
||||
}
|
||||
|
||||
// // // !!!!!!!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //
|
||||
|
||||
@@ -83,7 +83,21 @@ public:
|
||||
void setMyTurn(bool theValue){ myTurn = theValue;}
|
||||
bool getMyTurn() const{ return myTurn;}
|
||||
|
||||
void setMyCardsFlip(bool theValue){ myCardsFlip = theValue;}
|
||||
void setMyCardsFlip(bool theValue, int state){
|
||||
myCardsFlip = theValue;
|
||||
// log flipping cards
|
||||
if(myCardsFlip) {
|
||||
switch(state) {
|
||||
case 1: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt);
|
||||
break;
|
||||
case 2: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1]);
|
||||
break;
|
||||
case 3: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt, "has");
|
||||
break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool getMyCardsFlip() const{ return myCardsFlip;}
|
||||
|
||||
void setMyCardsValueInt(int theValue) { myCardsValueInt = theValue;}
|
||||
@@ -118,6 +132,14 @@ public:
|
||||
void setSBluffStatus ( bool theValue ) { sBluffStatus = theValue; }
|
||||
bool getSBluffStatus() const { return sBluffStatus; }
|
||||
|
||||
void setMyWinnerState ( bool theValue, int pot ) {
|
||||
myWinnerState = theValue;
|
||||
if(theValue) actualHand->getGuiInterface()->logPlayerWinsMsg(myID, pot);
|
||||
}
|
||||
bool getMyWinnerState() const { return myWinnerState;}
|
||||
|
||||
|
||||
|
||||
void action();
|
||||
|
||||
void preflopEngine();
|
||||
@@ -141,6 +163,8 @@ public:
|
||||
void setNetSessionData(boost::shared_ptr<SessionData> session);
|
||||
boost::shared_ptr<SessionData> getNetSessionData();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
ConfigFile *myConfig;
|
||||
@@ -181,6 +205,8 @@ private:
|
||||
|
||||
int sBluff;
|
||||
bool sBluffStatus;
|
||||
|
||||
bool myWinnerState;
|
||||
|
||||
boost::shared_ptr<SessionData> myNetSessionData;
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, Boar
|
||||
if(playerArray[i]->getMyActiveStatus() != 0) {
|
||||
playerArray[i]->setHand(this);
|
||||
}
|
||||
playerArray[i]->setMyCardsFlip(0);
|
||||
playerArray[i]->setMyCardsFlip(0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
void setMyTurn(bool theValue){ myTurn = theValue;}
|
||||
bool getMyTurn() const{ return myTurn;}
|
||||
|
||||
void setMyCardsFlip(bool theValue){ myCardsFlip = theValue;}
|
||||
void setMyCardsFlip(bool theValue, int state){ myCardsFlip = theValue;}
|
||||
bool getMyCardsFlip() const{ return myCardsFlip;}
|
||||
|
||||
void setMyCardsValueInt(int theValue) { myCardsValueInt = theValue;}
|
||||
@@ -112,6 +112,9 @@ public:
|
||||
void setSBluffStatus ( bool theValue ) { sBluffStatus = theValue; }
|
||||
bool getSBluffStatus() const { return sBluffStatus; }
|
||||
|
||||
void setMyWinnerState ( bool theValue, int pot ) { myWinnerState = theValue; }
|
||||
bool getMyWinnerState() const { return myWinnerState;}
|
||||
|
||||
void action();
|
||||
|
||||
void preflopEngine();
|
||||
@@ -176,6 +179,8 @@ private:
|
||||
int sBluff;
|
||||
bool sBluffStatus;
|
||||
|
||||
bool myWinnerState;
|
||||
|
||||
boost::shared_ptr<SessionData> myNetSessionData;
|
||||
};
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
virtual void setMyTurn(bool theValue) =0;
|
||||
virtual bool getMyTurn() const =0;
|
||||
|
||||
virtual void setMyCardsFlip(bool theValue) =0;
|
||||
virtual void setMyCardsFlip(bool theValue, int state) =0;
|
||||
virtual bool getMyCardsFlip() const =0;
|
||||
|
||||
virtual void setMyCardsValueInt(int theValue) =0;
|
||||
@@ -96,6 +96,9 @@ public:
|
||||
|
||||
virtual void setSBluffStatus ( bool theValue ) =0;
|
||||
virtual bool getSBluffStatus() const =0;
|
||||
|
||||
virtual void setMyWinnerState ( bool theValue, int pot ) =0;
|
||||
virtual bool getMyWinnerState() const =0;
|
||||
|
||||
virtual void action() =0;
|
||||
|
||||
|
||||
@@ -1846,10 +1846,8 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
||||
holeCardsArray[i][j]->startFlipCards(guiGameSpeed, QPixmap(":/cards/resources/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);
|
||||
}
|
||||
}
|
||||
//Karten umdrehen Loggen
|
||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt());
|
||||
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||
//set Player value (logging)
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1874,10 +1872,8 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
||||
|
||||
}
|
||||
}
|
||||
//Karten umdrehen Loggen
|
||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt() );
|
||||
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||
//set Player value (logging)
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1891,8 +1887,8 @@ void mainWindowImpl::postRiverRunAnimation2() {
|
||||
currentHand->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
|
||||
if(currentHand->getPlayerArray()[i]->getMyActiveStatus() && currentHand->getPlayerArray()[i]->getMyAction() != 1) {
|
||||
|
||||
//Kartenwerte Loggen
|
||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[i]->getMyCardsValueInt(), "has");
|
||||
//set Player value (logging)
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1,3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1971,7 +1967,10 @@ void mainWindowImpl::postRiverRunAnimation3() {
|
||||
int pot = currentHand->getPlayerArray()[i]->getMyCash() - cashLabelArray[i]->text().remove(" $").toInt(&toIntBool,10) ;
|
||||
//Wenn River dann auch das Blatt loggen!
|
||||
// if (textLabel_handLabel->text() == "River") {
|
||||
myLog->logPlayerWinsMsg(i, pot);
|
||||
|
||||
//set Player value (logging)
|
||||
currentHand->getPlayerArray()[i]->setMyWinnerState(1, pot);
|
||||
|
||||
// }
|
||||
// else {
|
||||
// myLog->logPlayerWinsMsg(i, pot);
|
||||
@@ -2109,10 +2108,8 @@ void mainWindowImpl::flipHolecardsAllIn() {
|
||||
holeCardsArray[i][j]->startFlipCards(guiGameSpeed, QPixmap(":/cards/resources/graphics/cards/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);
|
||||
}
|
||||
}
|
||||
//Karten umdrehen Loggen
|
||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), tempCardsIntArray[0], tempCardsIntArray[1]);
|
||||
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||
//set Player value (logging)
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1,2);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2138,10 +2135,8 @@ void mainWindowImpl::flipHolecardsAllIn() {
|
||||
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j], FALSE);
|
||||
}
|
||||
}
|
||||
//Karten umdrehen Loggen
|
||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[i]->getMyName(), temp2CardsIntArray[0], temp2CardsIntArray[1] );
|
||||
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1);
|
||||
//set Player value (logging)
|
||||
currentHand->getPlayerArray()[i]->setMyCardsFlip(1,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2160,10 +2155,9 @@ void mainWindowImpl::showMyCards() {
|
||||
|
||||
currentHand->getPlayerArray()[0]->getMyCards(tempCardsIntArray);
|
||||
if( currentHand->getPlayerArray()[0]->getMyCardsFlip() == 0 && currentHand->getActualRound() == 4 && currentHand->getPlayerArray()[0]->getMyActiveStatus() && currentHand->getPlayerArray()[0]->getMyAction() != 1) {
|
||||
//Karten umdrehen Loggen
|
||||
myLog->logFlipHoleCardsMsg(currentHand->getPlayerArray()[0]->getMyName().c_str(), tempCardsIntArray[0], tempCardsIntArray[1], currentHand->getPlayerArray()[0]->getMyCardsValueInt() );
|
||||
|
||||
currentHand->getPlayerArray()[0]->setMyCardsFlip(1);
|
||||
//set Player value (logging)
|
||||
currentHand->getPlayerArray()[0]->setMyCardsFlip(1,1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2612,7 +2606,7 @@ void mainWindowImpl::playSound() {
|
||||
can free it up and set 'music' back to NULL. SDL_Mixer
|
||||
provides us with a callback routine we can use to do
|
||||
exactly that */
|
||||
// Mix_HookMusicFinished(mainWindowImpl::musicDone);
|
||||
// Mix_HookMusicFinished(musicDone);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user