home · contact · privacy
Extend INC command results.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 20 Aug 2017 19:12:13 +0000 (21:12 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 20 Aug 2017 19:12:13 +0000 (21:12 +0200)
server.py

index 0a0ac88fc230d59e6a72c423f5a385a82b82b000..e9b519db5d92af4c74f34b50c5fd8df0bffdb419 100755 (executable)
--- a/server.py
+++ b/server.py
@@ -131,7 +131,8 @@ class CommandHandler:
         self.send_to(connection_id, reply)
 
     def cmd_inc(self, connection_id):
-        """Increment world.turn, send NEW_TURN message to all clients."""
+        """Increment world.turn, send TURN_FINISHED, NEW_TURN to everyone."""
+        self.send_all('TURN_FINISHED ' + str(self.world.turn))
         self.world.turn += 1
         self.send_all('NEW_TURN ' + str(self.world.turn))