Advertisement
DraMic

Кактус 4 ряда

Feb 22nd, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. n=32
  2. t=turtle
  3. for c=0,3 do
  4. for s=1,4 do
  5. if t.getItemCount(s+(c*4))<=0 then
  6. print ("1 - steklo")
  7. print ("2 - osnova")
  8. print ("3 - pesok")
  9. print ("4 - kaktus")
  10. return
  11. end
  12. end
  13. t.forward()
  14. for i=1,n do
  15. for j=2,3 do
  16. t.select(j+(c*4))
  17. t.turnLeft()
  18. t.place()
  19. t.turnRight()
  20. t.turnRight()
  21. t.place()
  22. t.turnLeft()
  23. t.up()
  24. end
  25. t.up()
  26. t.select(4+(c*4))
  27. t.turnLeft()
  28. t.forward()
  29. t.placeDown()
  30. t.back()
  31. t.back()
  32. t.placeDown()
  33. t.forward()
  34. t.up()
  35. t.turnRight()
  36. t.select(1+(c*4))
  37. t.placeDown()
  38. t.forward()
  39. t.forward()
  40. for i=1,4 do
  41. t.down()
  42. end
  43. end
  44. for i=1,4 do
  45. t.up()
  46. end
  47. for i=1,65 do
  48. t.back()
  49. end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement