Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function goAngle(str)
- robot.forward()
- if str == "r" then
- robot.turnRight()
- end
- if str == "l" then
- robot.turnLeft()
- end
- robot.forward()
- end
- local robot = require("robot")
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- goAngle("r")
- robot.forward()
- robot.turnLeft()
- goAngle("r")
- robot.turnLeft()
- robot.forward()
- goAngle("r")
- robot.turnLeft()
- for i = 1, 6 do
- robot.forward()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement