Platon777

Untitled

Aug 24th, 2024
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- 0 - air
  2. -- 1 - black
  3. -- 2 - red
  4.  
  5. --
  6.  
  7.  
  8. function buildLine(line)
  9.     for element = 1,#line do
  10.         slot = line[element]
  11.         if slot ~= 0 then
  12.         turtle.select(slot)
  13.         turtle.placeDown()
  14.        end
  15.         turtle.forward()
  16.     end
  17.  
  18.     for w = 1,#line do
  19.         turtle.back()
  20.     end
  21. end
  22.  
  23. function buildImage(image)
  24.     for stroka = 1,#image do
  25.         buildLine(image[stroka])
  26.         turtle.turnRight()
  27.         turtle.forward()
  28.         turtle.turnLeft()
  29.     end
  30.    turtle.turnRigt
  31.    turtle.up()
  32. end
  33. art = {
  34.      {1,2,2,1},
  35.      {2,0,0,2},
  36.      {2,0,0,2},
  37.      {1,2,2,1},
  38. }
  39.  
  40. buildImage(art)
  41. art2 = {
  42.      {2,0,0,2},
  43.      {0,0,0,0},
  44.      {0,0,0,0},
  45.      {2,0,0,2},
  46. }
  47.  
  48.  
  49.  
Advertisement
Add Comment
Please, Sign In to add comment