View difference between Paste ID: hj3PHztc and VtPSGxPy
SHOW: | | - or go back to the newest paste.
1
-- 1 - black
2
-- 2 - red
3
-- 3 - glass
4
5
art = {
6
    {3, 3, 3, 3, 3, 3, 3},
7
    {3, 3, 3, 1, 1, 3, 3},
8
    {3, 3, 1, 2, 2, 1, 3},
9
    {3, 1, 2, 2, 1, 3, 3},
10
    {3, 3, 1, 2, 2, 1, 3},
11
    {3, 3, 3, 1, 1, 3, 3},
12
    {3, 3, 3, 3, 3, 3, 3},
13
    }
14
    
15
    
16
-- Данные
17
art1 = {3, 3, 3, 3, 3, 3, 3}
18
art2 = {3, 3, 3, 1, 1, 3, 3}
19
art3 = {3, 3, 1, 2, 2, 1, 3}
20
art4 = {3, 1, 2, 2, 1, 3, 3}
21
art5 = {3, 3, 1, 2, 2, 1, 3}
22
art6 = {3, 3, 3, 1, 1, 3, 3}
23
art7 = {3, 3, 3, 3, 3, 3, 3}
24
25
-- Функции
26
function buildLine(line)
27
    for i = 1, #line do
28
        x = line[i]
29
        turtle.select(x)
30
        turtle.placeDown()
31
        turtle.forward()
32
	end
33
    for o = 1, #line do
34
       turtle.back()
35
    end
36
    turtle.turnRight()
37
    turtle.forward()
38
    turtle.turnLeft()
39
end
40
    
41
42
-- Программа
43
buildLine(art1)
44
buildLine(art2)
45
buildLine(art3)