View difference between Paste ID: C3tmbhaM and Rj8p4PGq
SHOW: | | - or go back to the newest paste.
1-
-- 1 - red
1+
-- 0 - air
2-
-- 2 - orange 
2+
-- 1 - black
3-
-- 3 - yellow
3+
-- 2 - red
4-
-- 4 - green
4+
5-
-- 5 - light blue
5+
6-
-- 6 - blue 
6+
art1 = { 
7-
-- 7 - purple
7+
     {1, 2, 2, 1},
8
     {2, 0, 0, 2},
9-
art = {}
9+
     {2, 0, 0, 2},
10
     {1, 2, 2, 1},
11-
for I = 1,7 do 
11+
}
12-
 turtle.select(I)
12+
13-
 turtle.placeDown()
13+
14-
 turtle.forward()
14+
art2 = {
15-
end
15+
       {2, 0, 0, 2}, 
16
       {0, 0, 0, 0,},
17
       {0, 0, 0, 0,},
18
       {2, 0, 0, 2}, 
19
20
}
21
22
23
24
25
26
function buildline(line)
27
      for element = 1,#line do 
28
       slot = line[element]
29
       if slot  ~= 0 then
30
         turtle.select(slot)
31
         turtle.placeDown()
32
       end
33
       turtle.forward()
34
    end 
35
     for w = 1,#line do 
36
       turtle.back() 
37
    end 
38
  end
39
40
41
42
 function buildImage(image)
43
    for stroka = 1,#image do
44
          buildline(image[stroka])
45
          turtle.turnRight() 
46
          turtle.forward()
47
          turtle.turnLeft() 
48
    end 
49
    turtle.turnLeft() 
50
    for stroka = 1,#image do 
51
        turtle.forward() 
52
    end 
53
    turtle.turnRight() 
54
    turtle.up()
55
56
  end
57
buildImage(art1)
58
buildImage(art2)
59
buildImage(art2)
60
buildImage(art1)