X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fgame.py;h=393672d469f2c7d839e4da7dbe3f903a5b1cca95;hp=1b568a048b673f05f8e857fc3a882ebc0c5978c3;hb=bfa63f1a2dc9c66399f8159857d4cc54f038eaa2;hpb=e0c24aed084b96f3c5800d869bc759f89667bd6a diff --git a/qchess/game.py b/qchess/game.py index 1b568a0..393672d 100644 --- a/qchess/game.py +++ b/qchess/game.py @@ -18,13 +18,19 @@ class GameThread(StoppableThread): for p in self.players: with self.lock: - self.state["turn"] = p # "turn" contains the player who's turn it is + if isinstance(p, NetworkSender): + self.state["turn"] = p.base_player # "turn" contains the player who's turn it is + else: + self.state["turn"] = p #try: if True: [x,y] = p.select() # Player selects a square if self.stopped(): break + + + result = self.board.select(x, y, colour = p.colour) for p2 in self.players: p2.update(result) # Inform players of what happened