Platon777

Untitled

Sep 7th, 2024
159
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. -- 3 - grey
  5. -- 4 - white
  6.  
  7. --
  8.  
  9. function buildLine(line)
  10.     for element = 1,#line do
  11.         slot = line[element]
  12.         if slot ~= 0 then
  13.         turtle.select(slot)
  14.         turtle.placeDown()
  15.        end
  16.         turtle.forward()
  17.     end
  18.  
  19.     for w = 1,#line do
  20.         turtle.back()
  21.     end
  22. end
  23.  
  24. function buildImage(image)
  25.     for stroka = 1,#image do
  26.         buildLine(image[stroka])
  27.         turtle.turnRight()
  28.         turtle.forward()
  29.         turtle.turnLeft()
  30.     end
  31.     turtle.turnLeft()
  32.     for stroka = 1,#image do
  33.         turtle.forward()
  34.        end
  35.     turtle.turnRight()
  36.     turtle.up()
  37. end
  38. art = {
  39.      {0,0,0,0,1,1,1,1,0,0,0,0},
  40.      {0,0,1,1,2,2,2,2,1,1,0,0},
  41.      {0,1,2,2,4,2,2,2,2,2,1,0},
  42.      {0,1,2,4,4,4,2,2,2,2,1,0},
  43.      {1,2,2,2,4,2,2,2,2,2,2,1},
  44.      {1,2,2,2,2,1,1,2,2,2,2,1},
  45.      {1,1,2,2,1,4,3,1,2,2,1,1},
  46.      {1,4,1,1,1,3,3,1,1,1,3,1},
  47.      {0,1,4,4,4,1,1,3,3,3,1,0},
  48.      {0,1,3,4,4,4,3,3,3,3,1,0},
  49.      {0,0,1,1,3,3,3,3,1,1,0,0},
  50.      {0,0,0,0,1,1,1,1,0,0,0,0},
  51. }
Advertisement
Add Comment
Please, Sign In to add comment