Fixed bug with log files
authorSam Moore <[email protected]>
Fri, 2 Mar 2012 13:20:19 +0000 (21:20 +0800)
committerSam Moore <[email protected]>
Fri, 2 Mar 2012 13:20:19 +0000 (21:20 +0800)
I had added some extra log messages for testing the networking functions,
and forgot to remove them, hence replaying a logged file (with the -f option)
was failing.

judge/manager/game.cpp

index e87927d..ea7a7c9 100644 (file)
@@ -43,7 +43,7 @@ Game::Game(const char * redPath, const char * bluePath, const bool enableGraphic
                        fprintf(stderr, "BLUE! (blue: \"%s\")\n", bluePath);
                exit(EXIT_FAILURE);
        }
                        fprintf(stderr, "BLUE! (blue: \"%s\")\n", bluePath);
                exit(EXIT_FAILURE);
        }
-       logMessage("Game initialised.\n");
+//     logMessage("Game initialised.\n");
 }
 
 Game::Game(const char * fromFile, const bool enableGraphics, double newStallTime, const bool allowIllegal, FILE * newLog, const  Piece::Colour & newReveal, int newMaxTurns, bool newPrintBoard, double newTimeoutTime) : red(NULL), blue(NULL), turn(Piece::RED), theBoard(10,10), graphicsEnabled(enableGraphics), stallTime(newStallTime), allowIllegalMoves(allowIllegal), log(newLog), reveal(newReveal), turnCount(0), input(NULL), maxTurns(newMaxTurns), printBoard(newPrintBoard), timeoutTime(newTimeoutTime)
 }
 
 Game::Game(const char * fromFile, const bool enableGraphics, double newStallTime, const bool allowIllegal, FILE * newLog, const  Piece::Colour & newReveal, int newMaxTurns, bool newPrintBoard, double newTimeoutTime) : red(NULL), blue(NULL), turn(Piece::RED), theBoard(10,10), graphicsEnabled(enableGraphics), stallTime(newStallTime), allowIllegalMoves(allowIllegal), log(newLog), reveal(newReveal), turnCount(0), input(NULL), maxTurns(newMaxTurns), printBoard(newPrintBoard), timeoutTime(newTimeoutTime)
@@ -479,7 +479,7 @@ MovementResult Game::Play()
        
        
 
        
        
 
-       logMessage("Messaging red with \"START\"\n");
+//     logMessage("Messaging red with \"START\"\n");
        red->Message("START");
        
 
        red->Message("START");
        
 

UCC git Repository :: git.ucc.asn.au