100-days-of-code/projects/Day 6/reeborg-maze.py

17 lines
269 B
Python

def turn_right():
turn_left()
turn_left()
turn_left()
while front_is_clear():
move()
turn_left()
while not at_goal():
if right_is_clear():
turn_right()
move()
elif front_is_clear():
move()
else:
turn_left()