Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- steps = {}
- while (#steps <= 10) do
- movement = nil
- if not turtle.detectDown() then
- movement = turtle.down()
- end
- if movement == nil then
- if not turtle.detect() then
- movement = turtle.forward()
- elseif not turtle.detectUp() then
- movement = turtle.up()
- elseif not turtle.detectRight() then
- movement = turtle.turnRight()
- end
- end
- print(movement)
- table.insert(steps, movement)
- movement()
- end
- for (i = #steps, 1, -1) do
- steps[i]()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement