View difference between Paste ID: qjARnEcc and G0RkaBgi
SHOW: | | - or go back to the newest paste.
1
-- 1 - white
2
-- 2 - blue
3
4-
art = { 
4+
5
my_awesome_art = {
6
    { 
7
     {1,2,2,2,1},
8
     {2,0,0,0,2}, 
9
     {2,0,0,0,2}, 
10
     {2,0,0,0,2}, 
11
     {1,2,2,2,1},
12-
art2 = { 
12+
    }, 
13
    {
14
     {1,0,0,0,1},
15
     {0,0,0,0,0}, 
16
     {0,0,0,0,0}, 
17
     {0,0,0,0,0}, 
18
     {1,0,0,0,1},
19
    },
20
    {
21
     {1,0,0,0,1},
22
     {0,0,0,0,0}, 
23
     {0,0,1,0,0}, 
24
     {0,0,0,0,0}, 
25
     {1,0,0,0,1},
26
    },
27
   {
28
     {2,1,1,1,2},
29
     {1,0,0,0,1}, 
30
     {1,0,0,0,1}, 
31
     {1,0,0,0,1}, 
32
     {2,1,1,1,2},
33
    }
34
}
35
36
function buildLine(line)
37
    for element = 1,#line do 
38
        slot = line[element]
39
		if slot ~= 0 then 
40
          turtle.select(slot)
41
       	  turtle.placeDown()
42
        end
43
        turtle.forward()
44
    end
45
46
    for w = 1,#line do 
47
        turtle.back() 
48
    end 
49-
buildImage(art)
49+
50-
50+
51
function buildImage(image)
52
    for stroka = 1,#image do
53
        buildLine(image[stroka])
54
        turtle.turnRight() 
55
        turtle.forward()
56
        turtle.turnLeft() 
57
    end
58
    turtle.turnLeft()
59
    for storka = 1,#image do
60
        turtle.forward()
61
    end
62
    turtle.turnRight()
63
end
64
65
function buildArt(art)
66
   for image = 1, #art do
67
    buildImage(art[image])
68
        turtle.up()
69
   end
70
end
71
72
buildArt(my_awesome_art)