SaveText.Ru

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

Share with your friends:

Print