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])