delete unused function "getMyWinnerState"; activate Engine-Action-Log in localHand; run astyle

This commit is contained in:
floty
2011-10-29 14:41:17 +00:00
parent 01047622c2
commit bb3fb9e13c
7 changed files with 31 additions and 51 deletions
+29 -28
View File
@@ -528,34 +528,35 @@ void LocalHand::setBlinds()
void LocalHand::switchRounds() void LocalHand::switchRounds()
{ {
// // logging last player action // logging last player action
// PlayerListConstIterator previousPlayerIt = getRunningPlayerIt(previousPlayerID); PlayerListConstIterator previousPlayerIt = getRunningPlayerIt(previousPlayerID);
// if(previousPlayerIt == runningPlayerList->end()) { if(previousPlayerIt != runningPlayerList->end()) {
// throw LocalException(__FILE__, __LINE__, ERR_RUNNING_PLAYER_NOT_FOUND); switch((*previousPlayerIt)->getMyAction()) {
// } case PLAYER_ACTION_FOLD: {
myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_FOLD);
}
// switch((*previousPlayerIt)->getMyAction()) { break;
// case PLAYER_ACTION_FOLD: { case PLAYER_ACTION_CHECK: {
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_FOLD); myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_CHECK);
// } break; }
// case PLAYER_ACTION_CHECK: { break;
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_CHECK); case PLAYER_ACTION_CALL: {
// } break; myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_CALL,(*previousPlayerIt)->getMySet());
// case PLAYER_ACTION_CALL: { }
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_CALL); break;
// } break; case PLAYER_ACTION_BET:
// case PLAYER_ACTION_BET: case PLAYER_ACTION_RAISE: {
// case PLAYER_ACTION_RAISE: { myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_BET,(*previousPlayerIt)->getMySet());
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_BET,(*previousPlayerIt)->getMySet()); }
// } break; break;
// case PLAYER_ACTION_ALLIN: { case PLAYER_ACTION_ALLIN: {
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_ALL_IN,(*previousPlayerIt)->getMySet()); myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_ALL_IN,(*previousPlayerIt)->getMySet());
// } break; }
// default: { break;
// } default: {
// } }
}
}
PlayerListIterator it, it_1; PlayerListIterator it, it_1;
PlayerListConstIterator it_c; PlayerListConstIterator it_c;
-5
View File
@@ -255,11 +255,6 @@ public:
if(theValue) myWinnerState = theValue; if(theValue) myWinnerState = theValue;
currentHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue); currentHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue);
} }
bool getMyWinnerState() const {
return myWinnerState;
}
void action(); void action();
@@ -442,13 +442,6 @@ ClientPlayer::setMyWinnerState(bool theValue, int pot)
currentHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue); currentHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue);
} }
bool
ClientPlayer::getMyWinnerState() const
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return myWinnerState;
}
void void
ClientPlayer::action() ClientPlayer::action()
{ {
-1
View File
@@ -110,7 +110,6 @@ public:
bool getSBluffStatus() const; bool getSBluffStatus() const;
void setMyWinnerState (bool theValue, int pot); void setMyWinnerState (bool theValue, int pot);
bool getMyWinnerState() const;
void action(); void action();
int checkMyAction(int targetAction, int targetBet, int highestSet, int minimumRaise, int smallBlind); int checkMyAction(int targetAction, int targetBet, int highestSet, int minimumRaise, int smallBlind);
-1
View File
@@ -108,7 +108,6 @@ public:
virtual bool getSBluffStatus() const =0; virtual bool getSBluffStatus() const =0;
virtual void setMyWinnerState ( bool theValue, int pot ) =0; virtual void setMyWinnerState ( bool theValue, int pot ) =0;
virtual bool getMyWinnerState() const =0;
virtual void action() =0; virtual void action() =0;
virtual int checkMyAction(int targetAction, int targetBet, int highestSet, int minimumRaise, int smallBlind) = 0; virtual int checkMyAction(int targetAction, int targetBet, int highestSet, int minimumRaise, int smallBlind) = 0;
-8
View File
@@ -1824,7 +1824,6 @@ void gameTableImpl::myFold()
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand(); boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front(); boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
humanPlayer->setMyAction(PLAYER_ACTION_FOLD); humanPlayer->setMyAction(PLAYER_ACTION_FOLD);
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,1,LOG_ACTION_FOLD);
humanPlayer->setMyTurn(0); humanPlayer->setMyTurn(0);
//set that i was the last active player. need this for unhighlighting groupbox //set that i was the last active player. need this for unhighlighting groupbox
@@ -1843,7 +1842,6 @@ void gameTableImpl::myCheck()
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand(); boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front(); boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
humanPlayer->setMyTurn(0); humanPlayer->setMyTurn(0);
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,1,LOG_ACTION_CHECK);
humanPlayer->setMyAction(PLAYER_ACTION_CHECK); humanPlayer->setMyAction(PLAYER_ACTION_CHECK);
//set that i was the last active player. need this for unhighlighting groupbox //set that i was the last active player. need this for unhighlighting groupbox
@@ -1910,11 +1908,9 @@ void gameTableImpl::myCall()
humanPlayer->setMySet(humanPlayer->getMyCash()); humanPlayer->setMySet(humanPlayer->getMyCash());
humanPlayer->setMyCash(0); humanPlayer->setMyCash(0);
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,1,LOG_ACTION_ALL_IN,humanPlayer->getMySet());
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN); humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
} else { } else {
humanPlayer->setMySet(tempHighestSet - humanPlayer->getMySet()); humanPlayer->setMySet(tempHighestSet - humanPlayer->getMySet());
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,1,LOG_ACTION_CALL,humanPlayer->getMySet());
humanPlayer->setMyAction(PLAYER_ACTION_CALL); humanPlayer->setMyAction(PLAYER_ACTION_CALL);
} }
humanPlayer->setMyTurn(0); humanPlayer->setMyTurn(0);
@@ -1949,7 +1945,6 @@ void gameTableImpl::mySet()
humanPlayer->setMySet(humanPlayer->getMyCash()); humanPlayer->setMySet(humanPlayer->getMyCash());
humanPlayer->setMyCash(0); humanPlayer->setMyCash(0);
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN); humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,1,LOG_ACTION_ALL_IN,humanPlayer->getMySet());
// full bet rule // full bet rule
if(currentHand->getCurrentBeRo()->getHighestSet() + currentHand->getCurrentBeRo()->getMinimumRaise() > humanPlayer->getMySet()) { if(currentHand->getCurrentBeRo()->getHighestSet() + currentHand->getCurrentBeRo()->getMinimumRaise() > humanPlayer->getMySet()) {
@@ -1961,7 +1956,6 @@ void gameTableImpl::mySet()
//do not if allIn //do not if allIn
if(humanPlayer->getMyAction() != 6) { if(humanPlayer->getMyAction() != 6) {
humanPlayer->setMyAction(PLAYER_ACTION_RAISE); humanPlayer->setMyAction(PLAYER_ACTION_RAISE);
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,1,LOG_ACTION_BET,humanPlayer->getMySet());
} }
myActionIsRaise = 0; myActionIsRaise = 0;
@@ -1972,7 +1966,6 @@ void gameTableImpl::mySet()
//do not if allIn //do not if allIn
if(humanPlayer->getMyAction() != 6) { if(humanPlayer->getMyAction() != 6) {
humanPlayer->setMyAction(PLAYER_ACTION_BET); humanPlayer->setMyAction(PLAYER_ACTION_BET);
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,1,LOG_ACTION_BET,humanPlayer->getMySet());
} }
myActionIsBet = 0; myActionIsBet = 0;
@@ -2010,7 +2003,6 @@ void gameTableImpl::myAllIn()
humanPlayer->setMySet(humanPlayer->getMyCash()); humanPlayer->setMySet(humanPlayer->getMyCash());
humanPlayer->setMyCash(0); humanPlayer->setMyCash(0);
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN); humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,1,LOG_ACTION_ALL_IN,humanPlayer->getMySet());
// full bet rule // full bet rule
if(currentHand->getCurrentBeRo()->getHighestSet() + currentHand->getCurrentBeRo()->getMinimumRaise() > humanPlayer->getMySet()) { if(currentHand->getCurrentBeRo()->getHighestSet() + currentHand->getCurrentBeRo()->getMinimumRaise() > humanPlayer->getMySet()) {
+2 -1
View File
@@ -371,7 +371,8 @@ void startWindowImpl::callInternetGameLoginDialog()
void startWindowImpl::callRejoinPossibleDialog(unsigned gameId) void startWindowImpl::callRejoinPossibleDialog(unsigned gameId)
{/* {
/*
assert(mySession); assert(mySession);
GameInfo info(mySession->getClientGameInfo(gameId));*/ GameInfo info(mySession->getClientGameInfo(gameId));*/