adds LogNewBlindsSetsMsg to seperate blindsSets logging
This commit is contained in:
+10
-1
@@ -239,8 +239,17 @@ void Game::startHand()
|
||||
//GUI bereinigen
|
||||
myGui->nextRoundCleanGui();
|
||||
|
||||
//Log new Hand
|
||||
myGui->logNewGameHandMsg(myGameID, actualHandID);
|
||||
|
||||
//Log blinds sets for new Hand
|
||||
PlayerListConstIterator it_sB, it_bB;
|
||||
it_sB = actualHand->getActivePlayerIt(actualHand->getCurrentBeRo()->getSmallBlindPositionId());
|
||||
it_bB = actualHand->getActivePlayerIt(actualHand->getCurrentBeRo()->getBigBlindPositionId());
|
||||
if(it_sB != actualHand->getActivePlayerList()->end() && it_bB != actualHand->getActivePlayerList()->end()) {
|
||||
myGui->logNewBlindsSetsMsg(myGameID, (*it_sB)->getMySet(), (*it_bB)->getMySet(), (*it_sB)->getMyName().c_str(), (*it_bB)->getMyName().c_str());
|
||||
}
|
||||
else { cout << "Log Error: cannot find sBID or bBID" << "\n"; }
|
||||
|
||||
actualHand->start();
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ void ServerGuiWrapper::stopTimeoutAnimation(int /*playerId*/) {}
|
||||
void ServerGuiWrapper::logPlayerActionMsg(string /*playerName*/, int /*action*/, int /*setValue*/) {}
|
||||
void ServerGuiWrapper::logNewGameHandMsg(int /*gameID*/, int /*handID*/) {}
|
||||
void ServerGuiWrapper::logPlayerWinsMsg(std::string /*playerName*/, int /*pot*/) {}
|
||||
void ServerGuiWrapper::logNewBlindsSetsMsg(int /*gameID*/, int /*sbSet*/, int /*bbSet*/, std::string /*sbName*/, std::string /*bbName*/) {}
|
||||
|
||||
void ServerGuiWrapper::logDealBoardCardsMsg(int /*roundID*/, int /*card1*/, int /*card2*/, int /*card3*/, int /*card4*/, int /*card5*/) {}
|
||||
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string /*playerName*/, int /*card1*/, int /*card2*/, int /*cardsValueInt*/, std::string /*showHas*/) {}
|
||||
void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID*/) {}
|
||||
|
||||
@@ -85,6 +85,7 @@ public:
|
||||
void logPlayerActionMsg(std::string playerName, int action, int setValue) ;
|
||||
void logNewGameHandMsg(int gameID, int handID) ;
|
||||
void logPlayerWinsMsg(std::string playerName, int pot);
|
||||
void logNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, std::string sbName, std::string bbName);
|
||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) ;
|
||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") ;
|
||||
void logPlayerWinGame(std::string playerName, int gameID);
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
virtual void logPlayerActionMsg(std::string playName, int action, int setValue) =0;
|
||||
virtual void logNewGameHandMsg(int gameID, int HandID) =0;
|
||||
virtual void logPlayerWinsMsg(std::string playerName, int pot) = 0;
|
||||
virtual void logNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, std::string sbName, std::string bbName) =0;
|
||||
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
|
||||
virtual void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
|
||||
virtual void logPlayerWinGame(std::string playerName, int gameID) =0;
|
||||
|
||||
@@ -103,6 +103,7 @@ void GuiWrapper::stopTimeoutAnimation(int playerId) { myW->signalStopTimeoutAnim
|
||||
|
||||
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->signalLogPlayerActionMsg(QString::fromUtf8(playerName.c_str()), action, setValue); }
|
||||
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->signalLogNewGameHandMsg(gameID, handID); }
|
||||
void GuiWrapper::logNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, std::string sbName, std::string bbName) { myLog->signalLogNewBlindsSetsMsg(gameID, sbSet, bbSet, QString::fromUtf8(sbName.c_str()), QString::fromUtf8(bbName.c_str())); }
|
||||
void GuiWrapper::logPlayerWinsMsg(std::string playerName, int pot) { myLog->signalLogPlayerWinsMsg(QString::fromUtf8(playerName.c_str()), pot); }
|
||||
void GuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) { myLog->signalLogDealBoardCardsMsg(roundID, card1, card2, card3, card4, card5); }
|
||||
void GuiWrapper::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cardsValueInt, string showHas) { myLog->signalLogFlipHoleCardsMsg(QString::fromUtf8(playerName.c_str()), card1, card2, cardsValueInt, QString::fromUtf8(showHas.c_str())); }
|
||||
|
||||
@@ -91,6 +91,7 @@ public:
|
||||
|
||||
void logPlayerActionMsg(std::string playerName, int action, int setValue) ;
|
||||
void logNewGameHandMsg(int gameID, int handID) ;
|
||||
void logNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, std::string sbName, std::string bbName);
|
||||
void logPlayerWinsMsg(std::string playerName, int pot);
|
||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
|
||||
|
||||
@@ -35,6 +35,7 @@ Log::Log(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), m
|
||||
|
||||
connect(this, SIGNAL(signalLogPlayerActionMsg(QString, int, int)), this, SLOT(logPlayerActionMsg(QString, int, int)));
|
||||
connect(this, SIGNAL(signalLogNewGameHandMsg(int, int)), this, SLOT(logNewGameHandMsg(int, int)));
|
||||
connect(this, SIGNAL(signalLogNewBlindsSetsMsg(int, int, int, QString, QString)), this, SLOT(logNewBlindsSetsMsg(int, int, int, QString, QString)));
|
||||
connect(this, SIGNAL(signalLogPlayerWinsMsg(QString, int)), this, SLOT(logPlayerWinsMsg(QString, int)));
|
||||
connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int)));
|
||||
connect(this, SIGNAL(signalLogFlipHoleCardsMsg(QString, int, int, int, QString)), this, SLOT(logFlipHoleCardsMsg(QString, int, int, int, QString)));
|
||||
@@ -237,7 +238,7 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// log blinds
|
||||
/* // log blinds
|
||||
logFileStreamString += "</br>BLINDS: ";
|
||||
// for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
|
||||
//
|
||||
@@ -276,7 +277,8 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
||||
|
||||
|
||||
|
||||
|
||||
cout << "SB: " << currentHand->getCurrentBeRo()->getSmallBlindPositionId() << endl;
|
||||
cout << "BB: " << currentHand->getCurrentBeRo()->getBigBlindPositionId() << endl;
|
||||
|
||||
// smallBlind
|
||||
it_c = currentHand->getActivePlayerIt(currentHand->getCurrentBeRo()->getSmallBlindPositionId());
|
||||
@@ -298,8 +300,52 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
||||
|
||||
|
||||
|
||||
logFileStreamString += "</br></br><b>PREFLOP</b>";
|
||||
logFileStreamString += "</br>\n";*/
|
||||
/*
|
||||
if(myConfig->readConfigInt("LogInterval") < 2) {
|
||||
// write for log after every action and after every hand
|
||||
writeLogFileStream(logFileStreamString);
|
||||
logFileStreamString = "";
|
||||
}
|
||||
else {
|
||||
// write for log after every game
|
||||
if(gameID > lastGameID) {
|
||||
writeLogFileStream(logFileStreamString);
|
||||
logFileStreamString = "";
|
||||
lastGameID = gameID;
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Log::logNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, QString sbName, QString bbName) {
|
||||
|
||||
// log blinds
|
||||
logFileStreamString += "</br>BLINDS: ";
|
||||
/*
|
||||
cout << "SB: " << sbName << endl;
|
||||
cout << "BB: " << bbName << endl; */
|
||||
|
||||
// smallBlind
|
||||
// it_c = currentHand->getActivePlayerIt(currentHand->getCurrentBeRo()->getSmallBlindPositionId());
|
||||
// if(it_c != currentHand->getActivePlayerList()->end()) {
|
||||
// logFileStreamString += QString::fromUtf8((*it_c)->getMyName().c_str())+" ("+QString::number((*it_c)->getMySet(),10)+"$), ";
|
||||
// }*/
|
||||
|
||||
logFileStreamString += sbName+" ("+QString::number(sbSet,10)+"$), ";
|
||||
|
||||
// bigBlind
|
||||
// it_c = currentHand->getActivePlayerIt(currentHand->getCurrentBeRo()->getBigBlindPositionId());
|
||||
// if(it_c != currentHand->getActivePlayerList()->end()) {
|
||||
// logFileStreamString += QString::fromUtf8((*it_c)->getMyName().c_str())+" ("+QString::number((*it_c)->getMySet(),10)+"$)";
|
||||
// }
|
||||
logFileStreamString += bbName+" ("+QString::number(bbSet,10)+"$)";
|
||||
|
||||
logFileStreamString += "</br></br><b>PREFLOP</b>";
|
||||
logFileStreamString += "</br>\n";
|
||||
|
||||
|
||||
if(myConfig->readConfigInt("LogInterval") < 2) {
|
||||
// write for log after every action and after every hand
|
||||
@@ -314,8 +360,6 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
||||
lastGameID = gameID;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void Log::logPlayerWinsMsg(QString playerName, int pot) {
|
||||
|
||||
@@ -42,6 +42,7 @@ public:
|
||||
public slots:
|
||||
void logPlayerActionMsg(QString playerName, int action, int setValue);
|
||||
void logNewGameHandMsg(int gameID, int handID);
|
||||
void logNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, QString sbName, QString bbName);
|
||||
void logPlayerWinsMsg(QString playerName, int pot);
|
||||
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||
void logFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||
@@ -59,6 +60,7 @@ public:
|
||||
signals:
|
||||
void signalLogPlayerActionMsg(QString playerName, int action, int setValue);
|
||||
void signalLogNewGameHandMsg(int gameID, int handID);
|
||||
void signalLogNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, QString sbName, QString bbName);
|
||||
void signalLogPlayerWinsMsg(QString playerName, int pot);
|
||||
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
|
||||
void signalLogFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows");
|
||||
|
||||
Reference in New Issue
Block a user