Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fw()
- turtle.digDown()
- turtle.forward()
- end
- function turn(x)
- if x % 2 == 0 then
- right = true
- left = false
- else
- right = false
- left = true
- end
- turtle.digDown()
- if right then
- turtle.turnRight()
- else if left then
- thurtle.turnLeft()
- end
- end
- while true do
- if turtle.detect() then
- turn()
- else
- fw()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement