Platon777

Untitled

Aug 17th, 2024
129
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. art = {
  7.      {1,2,2,1},
  8.      {2,0,0,2},
  9.      {2,0,0,2},
  10.      {1,2,2,1},
  11. }
  12.  
  13.  
  14. function buildLine(line)
  15.     for element = 1,#line do
  16.         slot = line[element]
  17.         if slot ~= 0 Then
  18.         turtle.select(slot)
  19.         turtle.placeDown()
  20.         turtle.forward()
  21.     end
  22.  
  23.     for w = 1,#line do
  24.         turtle.back()
  25.     end
  26. end
  27.  
  28. function buildImage(image)
  29.     for stroka = 1,#image do
  30.         buildLine(image[stroka])
  31.         turtle.turnRight()
  32.         turtle.forward()
  33.         turtle.turnLeft()
  34.     end
  35. end
  36.  
  37. buildImage(art)
  38.  
Advertisement
Add Comment
Please, Sign In to add comment