Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- until tostring(mines) == answer2
- print ("doneee!!!")
- end
- function intro()
- print ("hello, how long would you like the tunnel to be?")
- answer = read()
- print ("how many strips?")
- answer2 = read()
- print ("starting...")
- end
- function strips()
- repeat
- dig()
- distance = distance + 1
- until tostring(distance) == answer
- turnBack()
- next()
- end
- function dig()
- if turtle.detect == true then
- turtle.dig()
- else
- turtle.forward()
- if turtle.detectUp == true then
- turtle.digUp()
- else
- turtle.forward
- end
- end
- function next()
- turtle.turnRight()
- if turtle.detect() == true then
- turtle.dig()
- else
- turtle.forward()
- end
- if turtle.detectUp() == true then
- turtle.digUp()
- else
- turtle.forward()
- turtle.turnRight()
- end
- end
- function turnBack()
- turtle.turnRight()
- turtle.turnRight()
- repeat
- turtle.forward()
- until tostring(distance) == distance - answer
- end
- intro()
- mine()
Advertisement
Add Comment
Please, Sign In to add comment