SaveText.Ru

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

Share with your friends:

Print