diff --git a/src/main.py b/src/main.py index dae34e7..d951198 100644 --- a/src/main.py +++ b/src/main.py @@ -26,21 +26,23 @@ def run(): print("received Planet Name") while(communication.status() is not Mode.COMPLETE): - move.getstationedges() # TODO: Register in map - move.turnto(90) # TODO: add control mechanism to communication class - move.traversetonextstation(False) # TODO: let same control mechanism decide if station is known, also traversetonextstation needs a return value - while(communication.status() is Mode.GOTOSTATION): # should be triggered if current station has no unexplored edges for instructions in communication.navto: - move.follow(instructions) - communication.update() + for instructions in communication.navto: + move.turnto(instructions[1]) + move.traversetonextstation(True) + communication.update() while(communication.status() is Mode.TARGET): # should be triggered when communication gets TARGET signal from server for instructions in communication.navto: - move.follow(instructions) - communication.update() # TODO: implement update function that communicates with server and waits/checks for new instructions - if(communication.status() == Mode.TARGET2): # TODO: implement Target change - break + for instructions in communication.navto: + move.turnto(instructions[1]) + move.traversetonextstation(True) + communication.update() + + communication(move.getstationedges()) # TODO: Register in map + move.turnto(communication.navto[0][1]) # TODO: add control mechanism to communication class + move.traversetonextstation(False) # TODO: let same control mechanism decide if station is known, also traversetonextstation needs a return value communication.update()