Added break condition for Exploration Complete condition.
This commit is contained in:
parent
acccb15f3e
commit
3d9f674eab
1 changed files with 2 additions and 1 deletions
|
@ -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])
|
||||||
|
|
Loading…
Reference in a new issue