From 639de9f4d4b9898b54b027d08337081d79214158 Mon Sep 17 00:00:00 2001 From: Scrblmer Date: Sat, 23 Sep 2017 01:20:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D1=91=D0=BD=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=80=D1=8F=D0=B4=D0=BE=D0=BA=20=D0=B2=D1=8B=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=BE=D0=B2?= =?UTF-8?q?=20-=20=D0=B2=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D0=B5=20=D0=BE?= =?UTF-8?q?=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D1=81=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D1=8F=D0=BD=D0=B8=D1=8F=20=D0=BC=D0=B8=D1=80=D0=B0?= =?UTF-8?q?=20=D0=BE=D0=B1=D0=B5=D0=B8=D0=BC=20=D1=81=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D0=B5=D0=B3=D0=B8=D1=8F=D0=BC,=20=D0=B7=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=BC=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B9?= =?UTF-8?q?=20=D0=BE=D1=82=20=D0=BE=D0=B1=D0=BE=D0=B8=D1=85=20=D0=BA=D0=BB?= =?UTF-8?q?=D0=B8=D0=B5=D0=BD=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- localrunner/world/run.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/localrunner/world/run.py b/localrunner/world/run.py index 4f31b4d..72fbce1 100644 --- a/localrunner/world/run.py +++ b/localrunner/world/run.py @@ -144,14 +144,18 @@ def start(self): self.blue_client.send({'message': 'beginning', 'color': 'SECOND_PLAYER'}) for _ in range(0, self.ticks_count): - blue_message = [] if not self.blue_client.is_close: self.blue_client.send(self.api.get_world_state_for(self.blue_client)) + + if not self.red_client.is_close: + self.red_client.send(self.api.get_world_state_for(self.red_client)) + + blue_message = [] + if not self.blue_client.is_close: blue_message = yield self.blue_client.read_messages() red_message = [] if not self.red_client.is_close: - self.red_client.send(self.api.get_world_state_for(self.red_client)) red_message = yield self.red_client.read_messages() self.api.apply_commands(blue_message, self.blue_client)