diff --git a/pokerth_lib.pro b/pokerth_lib.pro index 60de2603..0e9adf66 100644 --- a/pokerth_lib.pro +++ b/pokerth_lib.pro @@ -125,7 +125,8 @@ HEADERS += \ src/engine/local_engine/tools.h \ src/engine/local_engine/localbero.h \ src/engine/local_engine/localexception.h \ - src/engine/local_engine/arraydata.h \ + src/engine/local_engine/arraydata.h \ + src/engine/local_engine/log.h \ src/engine/network_engine/clientboard.h \ src/engine/network_engine/clientenginefactory.h \ src/engine/network_engine/clienthand.h \ @@ -173,6 +174,7 @@ SOURCES += \ src/engine/local_engine/localbero.cpp \ src/engine/local_engine/localexception.cpp \ src/engine/local_engine/arraydata.cpp \ + src/engine/local_engine/log.cpp \ src/engine/network_engine/clientboard.cpp \ src/engine/network_engine/clientenginefactory.cpp \ src/engine/network_engine/clienthand.cpp \ diff --git a/src/engine/local_engine/log.cpp b/src/engine/local_engine/log.cpp index 319cbef9..6fd6e80b 100644 --- a/src/engine/local_engine/log.cpp +++ b/src/engine/local_engine/log.cpp @@ -25,6 +25,7 @@ #include "configfile.h" #include "game_defs.h" #include "log.h" +#include "playerinterface.h" using namespace std; diff --git a/src/engine/local_engine/log.h b/src/engine/local_engine/log.h index d1c77a52..1eea1771 100644 --- a/src/engine/local_engine/log.h +++ b/src/engine/local_engine/log.h @@ -20,10 +20,16 @@ #ifndef LOG_H #define LOG_H -#include "playerinterface.h" +#include +#include struct sqlite3; class ConfigFile; +class PlayerInterface; + +typedef boost::shared_ptr > > PlayerList; +typedef std::list >::iterator PlayerListIterator; +typedef std::list >::const_iterator PlayerListConstIterator; class Log { @@ -33,7 +39,7 @@ public: ~Log(); - void logNewGameMsg(int, int, int, unsigned, PlayerList); + void logNewGameMsg(int gameID, int startCash, int startSmallBlind, unsigned dealerPosition, PlayerList seatsList); // void closeLogDbAtExit(); diff --git a/src/game.cpp b/src/game.cpp index 23b2c8cb..d8325284 100755 --- a/src/game.cpp +++ b/src/game.cpp @@ -21,6 +21,7 @@ #include #include +#include "log.h" #include "localexception.h" #include "engine_msg.h" @@ -109,7 +110,7 @@ Game::Game(GuiInterface* gui, boost::shared_ptr factory, currentBoard->setPlayerLists(seatsList, activePlayerList, runningPlayerList); // log game data -// myLog->logNewGameMsg(myGameID, startCash, startSmallBlind, dealerPosition, seatsList); + myLog->logNewGameMsg(myGameID, startCash, startSmallBlind, dealerPosition, seatsList); //start timer blindsTimer.reset(); diff --git a/src/game.h b/src/game.h index 7acaf51e..b70bd857 100755 --- a/src/game.h +++ b/src/game.h @@ -23,7 +23,6 @@ #include #include "gamedata.h" #include "playerdata.h" -#include "log.h" #include diff --git a/src/session.cpp b/src/session.cpp index 5c1ff34a..b229b86e 100755 --- a/src/session.cpp +++ b/src/session.cpp @@ -46,6 +46,7 @@ Session::Session(GuiInterface *g, ConfigFile *c) : currentGameNum(0), myGui(g), myConfig(c), myLog(0), myGameType(GAME_TYPE_NONE) { myQtToolsInterface = CreateQtToolsWrapper(); + myLog = new Log(myConfig); }