forked from itscodenation/tiny-turtle-directions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
52 lines (48 loc) · 625 Bytes
/
script.js
File metadata and controls
52 lines (48 loc) · 625 Bytes
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
/*global TinyTurtle */
TinyTurtle.apply(window);
/*forward(40);
right(90);
forward(50);
right(90);
forward(40);
right(90);
forward(50);
left(140);
forward(37);
left(90);
forward(29);
stamp(5);*/
/*forward(50);
right(180);
forward(25);
left(90);
forward(35);
left(90);
forward(25);
right(180);
forward(50);
stamp(5);*/
/*right(45);
forward(25);
right(45);
forward(40);
right(45);
forward(25);
right(45);
forward(25);
right(45);
forward(25);
right(45);
forward(40);
right(45);
forward(25);
right(45);
forward(25);
*/
function box(length) {
for (var i = 0; i < 6; i++) {
forward(length);
right(60);
}
}
box(40);