SHOW:
|
|
- or go back to the newest paste.
1 | -- 0 - air | |
2 | -- 1 - black | |
3 | -- 2 - red | |
4 | ||
5 | -- | |
6 | ||
7 | ||
8 | function buildLine(line) | |
9 | for element = 1,#line do | |
10 | slot = line[element] | |
11 | if slot ~= 0 then | |
12 | turtle.select(slot) | |
13 | turtle.placeDown() | |
14 | end | |
15 | turtle.forward() | |
16 | end | |
17 | ||
18 | for w = 1,#line do | |
19 | turtle.back() | |
20 | end | |
21 | end | |
22 | ||
23 | function buildImage(image) | |
24 | for stroka = 1,#image do | |
25 | buildLine(image[stroka]) | |
26 | turtle.turnRight() | |
27 | turtle.forward() | |
28 | turtle.turnLeft() | |
29 | end | |
30 | turtle.up() | |
31 | end | |
32 | art = { | |
33 | {1,2,2,1}, | |
34 | {2,0,0,2}, | |
35 | {2,0,0,2}, | |
36 | {1,2,2,1}, | |
37 | } | |
38 | ||
39 | buildImage(art) | |
40 | art2 = { | |
41 | {2,0,0,2}, | |
42 | {0,0,0,0}, | |
43 | {0,0,0,0}, | |
44 | {2,0,0,2}, | |
45 | } | |
46 | ||
47 | ||
48 |