最後活躍 1733204469

group-etch-a-sketch.nv 原始檔案 Playground
1|#| new buttons row
2|#| button, ⇐, left
3|#| button, ⇑, up
4|#| button, ⇓, down
5|#| button, ⇒, right
6|#| new buttons row
7|#| button, Pen Down, pen down
8|#| button, Pen Up, pen up
9|#| new buttons row
10|#| button, <h2 style="color:red">██</h2>, set red
11|#| button, <h2 style="color:green">██</h2>, set green
12|#| button, <h2 style="color:blue">██</h2>, set blue
13|#| button, <h2 style="color:white">██</h2>, set white
14|#| button, <h2>██</h2>, set black
15
16|#| variables, x, y, @pixel-x, @pixel-y
17|#| variables, r, g, b, @pixel-r, @pixel-g, @pixel-b
18
19|x, -x| |-x|
20|y, -y| |-y|
21
22|r, -r| |-r| |g, -g| |-g| |b, -b| |-b|
23
24|pen up, pen down|
25
26|set red, green| red
27|set red, blue| red
28|set red, white| red
29|set red| red
30
31|set green, red| green
32|set green, blue| green
33|set green, white| green
34|set green| green
35
36|set blue, red| blue
37|set blue, green| blue
38|set blue, white| blue
39|set blue| blue
40
41|set white, red| white
42|set white, green| white
43|set white, blue| white
44|set white| white
45
46|set black, red|
47|set black, green|
48|set black, blue|
49|set black, white|
50
51|set color, red| red, @pixel-r:255
52|set color, green| green, @pixel-g:255
53|set color, blue| blue, @pixel-b:255
54|set color, white| white, @pixel-r:255, @pixel-g:255, @pixel-b:255
55|set color|
56
57|set pixel|
58 , @set-pixel
59
60|draw pixel|
61 , set color
62 , set pixel
63
64|draw pixel|
65
66|cell #01|
67 , @pixel-x = x, @pixel-y = y
68 , draw pixel
69
70|cell #02|
71 , @pixel-x = x, @pixel-y = y
72 , @pixel-x
73 , draw pixel
74
75|cell #03|
76 , @pixel-x = x, @pixel-y = y
77 , @pixel-y
78 , draw pixel
79
80|cell #04|
81 , @pixel-x = x
82 , @pixel-y = y
83 , @pixel-x, @pixel-y
84 , draw pixel
85
86|display|
87 , @display
88
89|draw square, pen down|
90 , cell #01, cell #02
91 , cell #03, cell #04
92 , pen down
93 , display
94
95|draw square|
96
97|move left|
98 , -x:10, draw square
99
100|move up|
101 , -y:10, draw square
102
103|move down|
104 , y:10, draw square
105
106|move right|
107 , x:10, draw square
108
109|left|
110 , move left
111
112|up|
113 , move up
114
115|down|
116 , move down
117
118
119|right|
120 , move right
121
122|| x:10, y:10, draw square