Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s=1
- print("Enter length: ")
- length=read()
- print("Enter width: ")
- width=read()
- blocks=length*width
- print("Need ",blocks," blocks")
- print("Press any key to continue")
- key=read()
- function check()
- if turtle.getItemCount(s)==0 then
- s=s+1
- turtle.select(s)
- end
- end
- for a=1,width,1 do
- for x=1,length,1 do
- turtle.forward()
- turtle.placeDown()
- check()
- end
- if (a%2 == 0) then
- turtle.turnLeft()
- turtle.forward()
- turtle.placeDown()
- check()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown()
- check()
- turtle.turnRight()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement