Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 逆ピラミッド
- local num = 10
- local lnum=0
- turtle.select(1)
- for i = 1,10 do
- turtle.up()
- end
- -- ここから
- for j =-1*num ,num do
- for i = -1*num,num do
- if (num)^2 >= j^2 + i^2 then
- if (num)^2 <= (j+1)^2 + (i+1)^2 then
- turtle.placeDown()
- end
- end
- turtle.forward()
- end
- for i = -1*num,num do
- turtle.back()
- end
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement