Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = 1
- function forward()
- turtle.digDown()
- turtle.forward()
- local items = turtle.getItemCount(16)
- if items == 64 then
- reboot()
- end
- end
- function turn()
- if side == 1 then
- turtle.turnRight()
- else turtle.turnLeft()
- end
- end
- function row()
- forward()
- forward()
- forward()
- forward()
- forward()
- forward()
- forward()
- forward()
- forward()
- turn()
- turtle.forward()
- turn()
- if side == 1 then
- side = 0
- else side = 1
- end
- end
- function level()
- row()
- row()
- row()
- row()
- row()
- row()
- row()
- row()
- row()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.down()
- end
- function go()
- local times = read()
- if times ~= 0 then
- level()
- else reboot()
- end
- end
- go()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement