yzrhnd

Untitled

Oct 31st, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. -- 逆ピラミッド
  2.  
  3. local num = 10
  4.  
  5. local lnum=0
  6.  
  7. turtle.select(1)
  8.  
  9. for i = 1,10 do
  10. turtle.up()
  11. end
  12.  
  13. -- ここから
  14.  
  15. for j =-1*num ,num do
  16. for i = -1*num,num do
  17.  
  18. if (num)^2 >= (j-0.5)^2 + (i-0.5)^2 then
  19. if (num)^2 <= (j+0.5)^2 + (i+0.5)^2 then
  20. turtle.placeDown()
  21. end
  22. end
  23.  
  24. turtle.forward()
  25. end
  26.  
  27. for i = -1*num,num do
  28. turtle.back()
  29. end
  30.  
  31. turtle.turnRight()
  32. turtle.forward()
  33. turtle.turnLeft()
  34.  
  35. end
Advertisement
Add Comment
Please, Sign In to add comment