X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fsrc%2Fgame.py;fp=qchess%2Fsrc%2Fgame.py;h=a62e280a6efc46a268d2926850ecc7f22270b133;hp=b3c7dd3ecdf86b50e6ab7647da807a828ad270b5;hb=0325af7e6f9c20b549efa84754b4a4a206fe66cc;hpb=6857a85bd7dc426f0b864780596435555bef3f11 diff --git a/qchess/src/game.py b/qchess/src/game.py index b3c7dd3..a62e280 100644 --- a/qchess/src/game.py +++ b/qchess/src/game.py @@ -71,12 +71,15 @@ class GameThread(StoppableThread): if self.stopped(): break + if isinstance(log_file, HttpLog): + log_file.prelog() + self.board.update_move(x, y, x2, y2) result = str(x) + " " + str(y) + " -> " + str(x2) + " " + str(y2) for p2 in self.players: p2.update(result) # Inform players of what happened - log(result) + log(result) if isinstance(graphics, GraphicsThread): with graphics.lock: @@ -122,7 +125,8 @@ class GameThread(StoppableThread): log(self.final_result) - graphics.stop() + if isinstance(graphics, GraphicsThread): + graphics.stop() # A thread that replays a log file