View difference between Paste ID: 5L7z3PqU and MFB0rXjn
SHOW: | | - or go back to the newest paste.
1
-- 1 - obsidian
2
-- 2 - quartz
3
4
art1={
5
    {1,2,2,1},
6
    {2,0,0,2},
7
    {2,0,0,2},
8
    {1,2,2,1}
9
}
10
11
art2={
12
    {2,0,0,2},
13
    {0,0,0,0},
14
    {0,0,0,0},
15
    {2,0,0,2}
16
}
17
18
function buildLine (colors)
19
	for i = 1,#colors do
20
		slot = colors[i]
21
        if slot~=0 then
22
 		  turtle.select(slot)
23
   	 	  turtle.placeDown()
24
        end
25
 		turtle.forward()
26
	end
27
	turtle.turnRight()
28
	turtle.forward()
29
	turtle.turnLeft()
30
	for e = 1,#colors do
31
		turtle.back()
32
	end
33
end
34
35
function buildLayer(image)
36
    for i=1,#image do
37
         line=image[i]
38
         buildLine(line)
39
    end
40
  turtle.turnLeft()
41
 for i=1,#image do
42
    turtle.forward()
43
  end
44
  turtle.turnRight()
45
  turtle.up()
46
end
47
48
49
buildLayer(art1)
50
buildLayer(art2)
51
buildLayer(art2)
52-
52+
buildLayer(art1)