forked from hackclub/sprig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ch_3_trellis.js
87 lines (77 loc) · 1.42 KB
/
ch_3_trellis.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
@title: Ch 3 trellis
@author: hackclub
Go get your movement code from the last challenge and add it to this one.
hint: go to your shed to get the code from the last stage!
After doing that try these things:
What happens if you getFirst(trellis) rather than getFirst(bean)? :O
What happens if you make vines solid? :3
*/
const bean = 'a';
const vine = 'b';
const trellis = 'c';
setLegend(
[bean, bitmap`
................
......000.......
.....0.220......
.....002020.....
..0..022..0.....
...0..0...0.....
...0000...20....
....2.0...20....
.....0....200...
....0...220.0...
....0...220.0...
....02.220...2..
.....0000.......
....0....0......
....0....0......
...00...00......`],
[vine, bitmap`
........44......
.......44.......
......44.......4
......4........4
.....44........4
.44..4........44
.44.44........4.
..444........44.
..44......44.4..
.44.......4444..
44.........444..
44..........42..
4...........4...
4..........44...
4.........44....
4........44.....`],
[trellis, bitmap`
.L...L.....L..L.
.L...L.....L..L.
..L.L.L...LL.L..
..L.L.L...L.LL..
..L.L.L..L..LL..
..LL...L.L..LL..
...L...L.L..L...
...L...LL...L...
..LL....L...LL..
..LL...LL...LL..
..L.L..LL..L.L..
.L..L..L.L.L.L..
.L..L.L..L.L.L..
.L..L.L..L.L..L.
L....L....L...L.
L....L....L...L.`]
);
setMap(map`
..cccccc.
.cccbbccc
cccbbbbcc
ccbbbbbcc
cbbbcbbbc
ccbccbabc
cccccbbcc
cccccbcc.
..cccccc.`);
// PASTE MOVEMENT CODE BELOW THIS
setSolids( [bean, trellis] )