Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function digRow(a)
- for x=1,a,1 do
- turtle.dig()
- turtle.forward()
- end
- end
- print("Enter length")
- l=io.read()
- print("Enter width")
- w=io.read()
- turtle.digDown()
- turtle.down()
- for y=1,w,1 do
- for x=1,l,1 do
- digRow(1)
- end
- if (y % 2 == 1) then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement