Advertisement
RTS_Dmitriy

Untitled

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