Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- temp = true
- while temp do
- print "input size"
- size = read("*n")
- build(size)
- temp = false
- end
- function build(x)
- for i=0,x,1 do
- buildCol(x)
- turtle.forward()
- end
- end
- function buildCol(x)
- turtle.placeDown()
- turtle.turnLeft()
- y= (x-1)/2
- for i=0,y,1 do
- turtle.forward()
- turtle.placeDown()
- end
- turnAround()
- forward(y)
- for i=0,y,1 do
- turtle.forward()
- turtle.placeDown()
- end
- turnAround()
- forward(y)
- turtle.turnRight()
- end
- function forward(x)
- for i=0,x,1 do
- turtle.forward()
- end
- end
- function turnAround()
- turtle.turnLeft()
- turtle.turnLeft()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement