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)