SaveText.Ru

3
  1. if wall_from_up() and wall_from_left() and free_from_right():
  2.     move_right()
  3. elif wall_from_down() and wall_from_left() and free_from_up():
  4.     move_up()
  5.     move_right()
  6. elif wall_from_down() and wall_from_right() and wall_from_up():
  7.     move_left()
  8.     if free_from_down():
  9.         move_right()
  10.     else:
  11.         move_up()
  12.         move_right()

Share with your friends:

Print