orngix

Maze Solver

Feb 20th, 2013
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. function finish()
  2. if turtle.compareDown() == true then
  3. computer.shutdown(1)
  4. end
  5. end
  6.  
  7. function test()
  8. finish()
  9. if turtle.detect() == false then
  10. turtle.forward()
  11. shell.run('maze')
  12. end
  13. end
  14.  
  15.  
  16. turtle.turnLeft()
  17. test()
  18. turtle.turnRight()
  19. test()
  20. turtle.turnRight()
  21. test()
  22. turtle.turnRight()
  23. test()
  24. print("ERROR")
Advertisement
Add Comment
Please, Sign In to add comment