Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lenght = 3
- rows = 3
- height = 3
- yAlt = 1
- function clearLine()
- for i=1, lenght - 1 do
- turtle.dig()
- turtle.forward()
- end
- end
- function clearLayer()
- for i=1, rows do
- clearLine()
- if rows%2 == 0 and yAlt%2 == 0 then
- if i%2 == 1 and i < rows then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- elseif i < rows then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- end
- else
- if i%2 == 1 and i < rows then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- elseif i < rows then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- end
- end
- function clearPlatformArea()
- while height > 0 do
- clearLayer()
- height = height - 1
- yAlt = yAlt + 1
- if height > 0 then
- turtle.digUp()
- turtle.up()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- end
- turtle.dig()
- turtle.forward()
- clearPlatformArea()
Advertisement
Add Comment
Please, Sign In to add comment