SHARE
TWEET

ccc

a guest May 25th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function goAngle(str)
  2.     robot.forward()
  3.     if str == "r" then
  4.         robot.turnRight()
  5.     end
  6.     if str == "l" then
  7.         robot.turnLeft()
  8.     end
  9.     robot.forward()
  10. end
  11.  
  12. robot = require("robot")
  13.  
  14. robot.turnRight()
  15. robot.forward()
  16. robot.turnLeft()
  17. goAngle("r")
  18. robot.forward()
  19. robot.turnLeft()
  20. goAngle("r")
  21. robot.turnLeft()
  22. robot.forward()
  23. goAngle("r")
  24. robot.turnLeft()
  25. for i = 1, 6 do
  26.     robot.forward()
  27. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top