forked from itscodenation/tinyTurtleUnit10Starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
46 lines (37 loc) · 604 Bytes
/
script.js
File metadata and controls
46 lines (37 loc) · 604 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
TinyTurtle.apply(window, [undefined, 400, 400]);
function square(length){
forward(length);
right(90);
forward(length);
right(90);
forward(length);
right(90);
forward(length);
right(90);
forward(length);
}
function rectangle(length, height){
forward(length);
right(90);
forward(height);
right(90);
forward(length);
right(90);
forward(height);
right(90);
}
// Type your function call below
function triangle(length){
forward(length);
right(120);
forward(length);
right(120);
forward(length);
right(120);
}
//triangle(20);
//triangle(80);
//square(40);
//square(60);
rectangle(90, 70);
stamp();