From 3d9f674eab5e6ad302dee90132f9dfbfdf685484 Mon Sep 17 00:00:00 2001 From: d3rped Date: Wed, 28 Mar 2018 03:53:05 +0200 Subject: [PATCH] Added break condition for Exploration Complete condition. --- src/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index eed4e18..31ab2d9 100644 --- a/src/main.py +++ b/src/main.py @@ -34,9 +34,10 @@ def run(): communication._status = Mode.COMPLETE communication.encode_message(Command.TARGET, None) communication.encode_message(Command.COMPLETE, None) - break move.setcurdir(communication.getdir()) communication.process_edges(move.getstationedges()) + if(communication._status == Mode.COMPLETE): + break if(communication.status() is Mode.GOTOSTATION or communication.status() is Mode.TARGET): # should be triggered if current station has no unexplored edges while len(communication.navto) > 0: move.turnto(communication.navto[0][1])