From 7798bd0f376aaf0cf7ad846a088d6d48308f5175 Mon Sep 17 00:00:00 2001 From: floty Date: Sat, 29 Oct 2011 16:21:29 +0000 Subject: [PATCH] delete unused variable "myWinnerState" in player --- src/engine/local_engine/localplayer.cpp | 2 +- src/engine/local_engine/localplayer.h | 7 ------- src/engine/network_engine/clientplayer.cpp | 10 +--------- src/engine/network_engine/clientplayer.h | 3 --- src/engine/playerinterface.h | 2 -- src/gui/qt/gametable/gametableimpl.cpp | 11 ++++------- 6 files changed, 6 insertions(+), 29 deletions(-) diff --git a/src/engine/local_engine/localplayer.cpp b/src/engine/local_engine/localplayer.cpp index db94006b..0ec00258 100755 --- a/src/engine/local_engine/localplayer.cpp +++ b/src/engine/local_engine/localplayer.cpp @@ -849,7 +849,7 @@ LocalPlayer::LocalPlayer(ConfigFile *c, int id, unsigned uniqueId, PlayerType ty : PlayerInterface(), myConfig(c), currentHand(0), myID(id), myUniqueID(uniqueId), myType(type), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myLastRelativeSet(0), myAction(PLAYER_ACTION_NONE), myButton(mB), myActiveStatus(aS), myStayOnTableStatus(1), myTurn(0), myCardsFlip(0), myRoundStartCash(0), lastMoneyWon(0), - sBluff(0), sBluffStatus(false), myWinnerState(false), m_actionTimeoutCounter(0), m_isConnected(false) + sBluff(0), sBluffStatus(false), m_actionTimeoutCounter(0), m_isConnected(false) { // !!!!!!!!!!!!!!!!!!!!!!!! testing !!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src/engine/local_engine/localplayer.h b/src/engine/local_engine/localplayer.h index 857370df..d0d95443 100755 --- a/src/engine/local_engine/localplayer.h +++ b/src/engine/local_engine/localplayer.h @@ -251,11 +251,6 @@ public: return sBluffStatus; } - void setMyWinnerState ( bool theValue, int pot ) { - if(theValue) myWinnerState = theValue; - currentHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue); - } - void action(); int checkMyAction(int targetAction, int targetBet, int highestSet, int minimumRaise, int smallBlind); @@ -327,8 +322,6 @@ private: int sBluff; bool sBluffStatus; - bool myWinnerState; - unsigned m_actionTimeoutCounter; bool m_isConnected; }; diff --git a/src/engine/network_engine/clientplayer.cpp b/src/engine/network_engine/clientplayer.cpp index 8fb795be..bf3734ce 100644 --- a/src/engine/network_engine/clientplayer.cpp +++ b/src/engine/network_engine/clientplayer.cpp @@ -26,7 +26,7 @@ ClientPlayer::ClientPlayer(ConfigFile *c, int id, unsigned uniqueId, PlayerType : PlayerInterface(), myConfig(c), currentHand(0), myID(id), myUniqueID(uniqueId), myType(type), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myLastRelativeSet(0), myAction(PLAYER_ACTION_NONE), myButton(mB), myActiveStatus(aS), myStayOnTableStatus(true), myTurn(false), myCardsFlip(false), myRoundStartCash(0), - lastMoneyWon(0), sBluff(0), sBluffStatus(false), myWinnerState(false), m_isConnected(false) + lastMoneyWon(0), sBluff(0), sBluffStatus(false), m_isConnected(false) { myBestHandPosition[0] = myBestHandPosition[1] = myBestHandPosition[2] = myBestHandPosition[3] = myBestHandPosition[4] = 0; myNiveau[0] = myNiveau[1] = myNiveau[2] = 0; @@ -434,14 +434,6 @@ ClientPlayer::getSBluffStatus() const return sBluffStatus; } -void -ClientPlayer::setMyWinnerState(bool theValue, int pot) -{ - boost::recursive_mutex::scoped_lock lock(m_syncMutex); - if(theValue) myWinnerState = theValue; - currentHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue); -} - void ClientPlayer::action() { diff --git a/src/engine/network_engine/clientplayer.h b/src/engine/network_engine/clientplayer.h index bbe602c3..7317953d 100644 --- a/src/engine/network_engine/clientplayer.h +++ b/src/engine/network_engine/clientplayer.h @@ -109,8 +109,6 @@ public: void setSBluffStatus (bool theValue); bool getSBluffStatus() const; - void setMyWinnerState (bool theValue, int pot); - void action(); int checkMyAction(int targetAction, int targetBet, int highestSet, int minimumRaise, int smallBlind); @@ -186,7 +184,6 @@ private: int sBluff; bool sBluffStatus; - bool myWinnerState; bool m_isConnected; }; diff --git a/src/engine/playerinterface.h b/src/engine/playerinterface.h index 0b7276b1..680f7818 100644 --- a/src/engine/playerinterface.h +++ b/src/engine/playerinterface.h @@ -107,8 +107,6 @@ public: virtual void setSBluffStatus ( bool theValue ) =0; virtual bool getSBluffStatus() const =0; - virtual void setMyWinnerState ( bool theValue, int pot ) =0; - virtual void action() =0; virtual int checkMyAction(int targetAction, int targetBet, int highestSet, int minimumRaise, int smallBlind) = 0; diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index a0f3da72..acff3aa1 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -2460,14 +2460,12 @@ void gameTableImpl::postRiverRunAnimation3() } } //Pot-Verteilung Loggen - //Pro Spieler den Cash aus dem Player und dem Label auslesen. Player_cash - Label_cash = Gewinnsumme - int pot = (*it_c)->getLastMoneyWon(); //Wenn River dann auch das Blatt loggen! // if (textLabel_handLabel->text() == "River") { //set Player value (logging) - currentHand->getLog()->logPlayerAction(5,(*it_c)->getMyID()+1,LOG_ACTION_WIN,pot); - (*it_c)->setMyWinnerState(true, pot); + currentHand->getLog()->logPlayerAction(5,(*it_c)->getMyID()+1,LOG_ACTION_WIN,(*it_c)->getLastMoneyWon()); + myGuiLog->logPlayerWinsMsg(QString::fromUtf8((*it_c)->getMyName().c_str()),(*it_c)->getLastMoneyWon(),true); // } // else { @@ -2492,9 +2490,8 @@ void gameTableImpl::postRiverRunAnimation3() for(it_int = winners.begin(); it_int != winners.end(); ++it_int) { if((*it_int) == (*it_c)->getMyUniqueID()) { - int pot = (*it_c)->getLastMoneyWon(); - currentHand->getLog()->logPlayerAction(5,(*it_c)->getMyID()+1,LOG_ACTION_WIN_SIDE_POT,pot); - (*it_c)->setMyWinnerState(false, pot); + currentHand->getLog()->logPlayerAction(5,(*it_c)->getMyID()+1,LOG_ACTION_WIN_SIDE_POT,(*it_c)->getLastMoneyWon()); + myGuiLog->logPlayerWinsMsg(QString::fromUtf8((*it_c)->getMyName().c_str()), (*it_c)->getLastMoneyWon(), false); } }