You are on page 1of 1

def jump():

turn_left()
move()
turn_right()
move()
turn_right()
move()
turn_left()

def turn_right():
for i in range(3):
turn_left()

# for i in range(6):
# jump()

while not at_goal():


if wall_on_right():
if wall_in_front():
turn_left()
elif front_is_clear():
move()
elif right_is_clear():
turn_right()
move()
turn_right()
move()
else:
turn_left()

def jump():
turn_left()
while wall_on_right():
move()
turn_right()
move()
turn_right()
while front_is_clear():
move()
turn_left()

def turn_right():
for i in range(3):
turn_left()

# for i in range(6):
# jump()

while not at_goal():


if wall_in_front():
jump()
else:
move()

You might also like