Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = { ... }
- turn = "right";
- function dig(x, y)
- for xt = 1,x do
- for yt = 1,y do
- turtle.placeDown()
- turtle.forward()
- end
- if(turn == "right")then
- turn = "left"
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turn = "right"
- end
- end
- end
- if(#args < 2)then
- error("Size reequired")
- else
- dig(args[2], args[1])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement