delete unused variable "myWinnerState" in player

This commit is contained in:
floty
2011-10-29 16:21:29 +00:00
parent bb3fb9e13c
commit 7798bd0f37
6 changed files with 6 additions and 29 deletions
+1 -1
View File
@@ -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 !!!!!!!!!!!!!!!!!!!!!!!!
-7
View File
@@ -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;
};
+1 -9
View File
@@ -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()
{
-3
View File
@@ -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;
};
-2
View File
@@ -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;
+4 -7
View File
@@ -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);
}
}