X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=judge%2Fmanager%2Fgame.h;h=aebda9dfba671ec5f445ee2c1a6c9365fbb59044;hp=43f4d0e7f6cb287393cd77c32794880051f6fc07;hb=e1153eebe8cfd0c881cef2ff8fca63f130e736b3;hpb=78293905481ab7a67e773d05350da29940a58ea6 diff --git a/judge/manager/game.h b/judge/manager/game.h index 43f4d0e..aebda9d 100644 --- a/judge/manager/game.h +++ b/judge/manager/game.h @@ -9,12 +9,13 @@ /** * Class to manage the game + * Bit messy since I keep adding on parameters :P */ class Game { public: - Game(const char * redPath, const char * bluePath, const bool enableGraphics, double newStallTime = 1.0, const bool allowIllegal=false, FILE * newLog = NULL, const Piece::Colour & newRevealed = Piece::BOTH, int maxTurns = 5000, const bool printBoard = false); - Game(const char * fromFile, const bool enableGraphics, double newStallTime = 1.0, const bool allowIllegal=false, FILE * newLog = NULL, const Piece::Colour & newRevealed = Piece::BOTH, int maxTurns = 5000, const bool printBoard = false); + Game(const char * redPath, const char * bluePath, const bool enableGraphics, double newStallTime = 1.0, const bool allowIllegal=false, FILE * newLog = NULL, const Piece::Colour & newRevealed = Piece::BOTH, int maxTurns = 5000, const bool printBoard = false, double newTimeoutTime = 2.0); + Game(const char * fromFile, const bool enableGraphics, double newStallTime = 1.0, const bool allowIllegal=false, FILE * newLog = NULL, const Piece::Colour & newRevealed = Piece::BOTH, int maxTurns = 5000, const bool printBoard = false, double newTimeoutTime = 2.0); virtual ~Game(); @@ -34,6 +35,7 @@ class Game int TurnCount() const {return turnCount;} static Game * theGame; + static int Tokenise(std::vector & buffer, std::string & str, char split = ' '); //Helper - Split a string into tokens public: int logMessage(const char * format, ...); FILE * GetLogFile() const {return log;} @@ -63,6 +65,9 @@ class Game int maxTurns; const bool printBoard; + + private: + double timeoutTime; };