Advertisement
Guest User

Untitled

a guest
May 25th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. function doTimes(times)
  2. for i = 1, times do
  3. robot.forward()
  4. end
  5.  
  6. end
  7.  
  8. function circle()
  9. doTimes(2)
  10. robot.turnRight()
  11. doTimes(2)
  12. robot.turnRight()
  13. doTimes(2)
  14. robot.turnRight()
  15. doTimes(2)
  16. robot.turnRight()
  17. end
  18.  
  19. robot = require("robot")
  20.  
  21. while true do
  22. circle()
  23. doTimes(3)
  24.  
  25. circle()
  26. doTimes(3)
  27.  
  28. circle()
  29. doTimes(3)
  30.  
  31. robot.turnAround()
  32. doTimes(5)
  33.  
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement