Added break condition for Exploration Complete condition.

This commit is contained in:
d3rped 2018-03-28 03:53:05 +02:00
parent acccb15f3e
commit 3d9f674eab

View file

@ -34,9 +34,10 @@ def run():
communication._status = Mode.COMPLETE communication._status = Mode.COMPLETE
communication.encode_message(Command.TARGET, None) communication.encode_message(Command.TARGET, None)
communication.encode_message(Command.COMPLETE, None) communication.encode_message(Command.COMPLETE, None)
break
move.setcurdir(communication.getdir()) move.setcurdir(communication.getdir())
communication.process_edges(move.getstationedges()) 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 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: while len(communication.navto) > 0:
move.turnto(communication.navto[0][1]) move.turnto(communication.navto[0][1])