Александр Добычин
Ученик
(245)
1 неделю назад
if free_from_right():
while free_from_right() and wall_from_up():
move_right()
elif free_from_up():
while free_from_up():
move_up()
while free_from_left() or free_from_up():
if wall_from_up() and free_from_right():
while free_from_right and wall_from_up():
move_right()
elif free_from_up() and wall_from_left():
move_up()
move_right()
elif free_from_up():
move_up()
elif free_from_left():
while free_from_left():
move_left()