creating log-object in main-function and commiting it to session
This commit is contained in:
@@ -152,7 +152,7 @@ void LocalBeRo::run()
|
||||
LOG_ERROR(__FILE__ << " (" << __LINE__ << "): ERROR - wrong myBeRoID");
|
||||
}
|
||||
}
|
||||
myHand->getLog()->logBoardCards(myBeRoID, tempBoardCardsArray);
|
||||
if(myHand->getLog()) myHand->getLog()->logBoardCards(myBeRoID, tempBoardCardsArray);
|
||||
logBoardCardsDone = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -89,12 +89,14 @@ void LocalBeRoPostRiver::postRiverRun()
|
||||
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) nonfoldPlayersCounter++;
|
||||
}
|
||||
if(nonfoldPlayersCounter>1) {
|
||||
getMyHand()->getLog()->logHoleCardsHandName(GAME_STATE_POST_RIVER,getMyHand()->getActivePlayerList());
|
||||
if(getMyHand()->getLog()) getMyHand()->getLog()->logHoleCardsHandName(GAME_STATE_POST_RIVER,getMyHand()->getActivePlayerList());
|
||||
}
|
||||
if(getMyHand()->getLog()) {
|
||||
getMyHand()->getLog()->logHandWinner(getMyHand()->getActivePlayerList(), highestCardsValue, getMyHand()->getBoard()->getWinners());
|
||||
getMyHand()->getLog()->logPlayerSitsOut(getMyHand()->getActivePlayerList());
|
||||
getMyHand()->getLog()->logGameWinner(getMyHand()->getActivePlayerList());
|
||||
getMyHand()->getLog()->logAfterHand();
|
||||
}
|
||||
getMyHand()->getLog()->logHandWinner(getMyHand()->getActivePlayerList(), highestCardsValue, getMyHand()->getBoard()->getWinners());
|
||||
getMyHand()->getLog()->logPlayerSitsOut(getMyHand()->getActivePlayerList());
|
||||
getMyHand()->getLog()->logGameWinner(getMyHand()->getActivePlayerList());
|
||||
getMyHand()->getLog()->logAfterHand();
|
||||
|
||||
//starte die Animaionsreihe
|
||||
getMyHand()->getGuiInterface()->postRiverRunAnimation1();
|
||||
|
||||
@@ -365,7 +365,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
|
||||
|
||||
setBlinds();
|
||||
|
||||
myLog->logNewHandMsg(myID, dealerPosition+1, smallBlind, smallBlindPosition+1, 2*smallBlind, bigBlindPosition+1, seatsList);
|
||||
if(myLog) myLog->logNewHandMsg(myID, dealerPosition+1, smallBlind, smallBlindPosition+1, 2*smallBlind, bigBlindPosition+1, seatsList);
|
||||
|
||||
myBeRo = myFactory->createBeRo(this, dealerPosition, smallBlind);
|
||||
}
|
||||
@@ -527,7 +527,7 @@ void LocalHand::switchRounds()
|
||||
// logging last player action
|
||||
PlayerListConstIterator previousPlayerIt = getRunningPlayerIt(previousPlayerID);
|
||||
if(previousPlayerIt != runningPlayerList->end()) {
|
||||
myLog->logPlayerAction(currentRound,(*previousPlayerIt)->getMyID()+1,myLog->transformPlayerActionLog((*previousPlayerIt)->getMyAction()),(*previousPlayerIt)->getMySet());
|
||||
if(myLog) myLog->logPlayerAction(currentRound,(*previousPlayerIt)->getMyID()+1,myLog->transformPlayerActionLog((*previousPlayerIt)->getMyAction()),(*previousPlayerIt)->getMySet());
|
||||
}
|
||||
|
||||
PlayerListIterator it, it_1;
|
||||
@@ -630,7 +630,7 @@ void LocalHand::switchRounds()
|
||||
myGui->flipHolecardsAllIn();
|
||||
// Logging HoleCards
|
||||
if(currentRound<GAME_STATE_RIVER) {
|
||||
myLog->logHoleCardsHandName(currentRound,activePlayerList);
|
||||
if(myLog) myLog->logHoleCardsHandName(currentRound,activePlayerList);
|
||||
}
|
||||
|
||||
if (currentRound < GAME_STATE_POST_RIVER) // do not increment past 4
|
||||
@@ -642,7 +642,7 @@ void LocalHand::switchRounds()
|
||||
|
||||
myBoard->getMyCards(tempBoardCardsArray);
|
||||
myGui->logDealBoardCardsMsg(currentRound, tempBoardCardsArray[0], tempBoardCardsArray[1], tempBoardCardsArray[2], tempBoardCardsArray[3], tempBoardCardsArray[4]);
|
||||
myLog->logBoardCards(currentRound, tempBoardCardsArray);
|
||||
if(myLog) myLog->logBoardCards(currentRound, tempBoardCardsArray);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user