bugfix: no bigblind in network logs
This commit is contained in:
@@ -101,11 +101,13 @@ 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::logNewBlindsSetsMsg(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*/) {}
|
||||
void ServerGuiWrapper::flushLogAtGame(int /*gameID*/) {}
|
||||
void ServerGuiWrapper::flushLogAtHand() {}
|
||||
|
||||
void ServerGuiWrapper::SignalNetClientConnect(int actionID) { if (myClientcb) myClientcb->SignalNetClientConnect(actionID); }
|
||||
void ServerGuiWrapper::SignalNetClientGameInfo(int actionID) { if (myClientcb) myClientcb->SignalNetClientGameInfo(actionID); }
|
||||
|
||||
@@ -85,10 +85,12 @@ 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 logNewBlindsSetsMsg(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);
|
||||
void flushLogAtGame(int gameID);
|
||||
void flushLogAtHand();
|
||||
|
||||
void SignalNetClientConnect(int actionID);
|
||||
void SignalNetClientGameInfo(int actionID);
|
||||
|
||||
@@ -96,10 +96,12 @@ 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 logNewBlindsSetsMsg(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;
|
||||
virtual void flushLogAtGame(int gameID) =0;
|
||||
virtual void flushLogAtHand() =0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -103,11 +103,14 @@ 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::logNewBlindsSetsMsg(int sbSet, int bbSet, std::string sbName, std::string bbName) { myLog->signalLogNewBlindsSetsMsg(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())); }
|
||||
void GuiWrapper::logPlayerWinGame(std::string playerName, int gameID) { myLog->signalLogPlayerWinGame(QString::fromUtf8(playerName.c_str()), gameID); }
|
||||
void GuiWrapper::flushLogAtGame(int gameID) { myLog->signalFlushLogAtGame(gameID); }
|
||||
void GuiWrapper::flushLogAtHand() { myLog->signalFlushLogAtHand(); }
|
||||
|
||||
|
||||
void GuiWrapper::SignalNetClientConnect(int actionID) { myW->signalNetClientConnect(actionID); }
|
||||
void GuiWrapper::SignalNetClientGameInfo(int actionID) { myW->signalNetClientGameInfo(actionID); }
|
||||
|
||||
@@ -91,11 +91,13 @@ 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 logNewBlindsSetsMsg(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");
|
||||
void logPlayerWinGame(std::string playerName, int gameID);
|
||||
void flushLogAtGame(int gameID);
|
||||
void flushLogAtHand();
|
||||
|
||||
void SignalNetClientConnect(int actionID);
|
||||
void SignalNetClientGameInfo(int actionID);
|
||||
|
||||
@@ -35,12 +35,14 @@ 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(signalLogNewBlindsSetsMsg(int, int, QString, QString)), this, SLOT(logNewBlindsSetsMsg(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)));
|
||||
connect(this, SIGNAL(signalLogPlayerLeftMsg(QString)), this, SLOT(logPlayerLeftMsg(QString)));
|
||||
connect(this, SIGNAL(signalLogPlayerWinGame(QString, int)), this, SLOT(logPlayerWinGame(QString, int)));
|
||||
connect(this, SIGNAL(signalFlushLogAtGame(int)), this, SLOT(flushLogAtGame(int)));
|
||||
connect(this, SIGNAL(signalFlushLogAtHand()), this, SLOT(flushLogAtHand()));
|
||||
|
||||
|
||||
logFileStreamString = "";
|
||||
@@ -320,7 +322,7 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
||||
}
|
||||
}
|
||||
|
||||
void Log::logNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, QString sbName, QString bbName) {
|
||||
void Log::logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName) {
|
||||
|
||||
// log blinds
|
||||
logFileStreamString += "</br>BLINDS: ";
|
||||
@@ -345,21 +347,6 @@ void Log::logNewBlindsSetsMsg(int gameID, int sbSet, int bbSet, QString sbName,
|
||||
|
||||
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::logPlayerWinsMsg(QString playerName, int pot) {
|
||||
@@ -1797,3 +1784,20 @@ void Log::writeLogFileStream(QString streamString) {
|
||||
else { cout << "could not find log-file to write log-messages!" << endl; }
|
||||
}
|
||||
|
||||
void Log::flushLogAtHand() {
|
||||
|
||||
if(myConfig->readConfigInt("LogInterval") < 2) {
|
||||
// write for log after every action and after every hand
|
||||
writeLogFileStream(logFileStreamString);
|
||||
logFileStreamString = "";
|
||||
}
|
||||
}
|
||||
|
||||
void Log::flushLogAtGame(int gameID) {
|
||||
// write for log after every game
|
||||
if(gameID > lastGameID) {
|
||||
writeLogFileStream(logFileStreamString);
|
||||
logFileStreamString = "";
|
||||
lastGameID = gameID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,12 +42,14 @@ 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 logNewBlindsSetsMsg(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");
|
||||
void logPlayerLeftMsg(QString playerName);
|
||||
void logPlayerWinGame(QString playerName, int gameID);
|
||||
void flushLogAtGame(int gameID);
|
||||
void flushLogAtHand();
|
||||
|
||||
|
||||
public:
|
||||
@@ -60,12 +62,14 @@ 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 signalLogNewBlindsSetsMsg(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");
|
||||
void signalLogPlayerLeftMsg(QString playerName);
|
||||
void signalLogPlayerWinGame(QString playerName, int gameID);
|
||||
void signalFlushLogAtGame(int gameID);
|
||||
void signalFlushLogAtHand();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user