Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------Tunneling Automaton - V2------
- ----Variables----
- t = turtle
- ----Basic Controls----
- function digForward()
- t.digForward()
- end
- function moveForward()
- t.forward()
- end
- function goForward()
- if t.detect() then
- digForward()
- moveForward()
- else
- moveForward()
- end
- end
- function length()
- num = t.getItemCount(2)
- return num
- end
- function refuel()
- t.select(1)
- t.refuel(1)
- end
- ----Bridge----
- function bridge()
- t.select(2)
- num = length()
- while num > 0 do
- goForward()
- t.placeDown()
- num = num - 1
- end
- end
- ----Main----
- function main()
- refuel()
- bridge()
- end
- --Run--
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement