X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fsrc%2Fgame.py;h=8b279fb9f5fad1e037c691d75b0791a284f4d20e;hp=4eebc76af62acbee1f8113fa9f476383300ebc46;hb=639646adb020e0be9433da7b3d5ef6b987c99f71;hpb=2f1d1b63179c8fce4c2e3ac8aaefbbfff3d0d5ca diff --git a/qchess/src/game.py b/qchess/src/game.py index 4eebc76..8b279fb 100644 --- a/qchess/src/game.py +++ b/qchess/src/game.py @@ -33,13 +33,17 @@ class GameThread(StoppableThread): [x,y] = p.select() # Player selects a square if self.stopped(): break - + + if not (isinstance(p, Network) and p.server == False): + result = self.board.select(x, y, colour = p.colour) + else: + #debug(str(self) + " don't update local board") + result = "" - - - result = self.board.select(x, y, colour = p.colour) + result = p.update(result) for p2 in self.players: - p2.update(result) # Inform players of what happened + if p2 != p: + result = p2.update(result) # Inform players of what happened log(result)