-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathx.cpp
More file actions
23 lines (21 loc) · 683 Bytes
/
Copy pathx.cpp
File metadata and controls
23 lines (21 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "turtle.h"
#include "draw.h"
/* credit goes to cs103 usc */
int main() {
draw::setpenwidth(10); // thick lines
draw::setrange(-100, 100);
// get in position
Turtle michaelangelo(80, 80, 0);
Turtle leonardo(80, -80, 135);
michaelangelo.turn(-135);
michaelangelo.setColor(draw::ORANGE);
leonardo.setColor(draw::BLUE);
leonardo.move(100); // blue, from bottom right to below center
leonardo.off();
michaelangelo.move(226); // orange, from top right to bottom left
leonardo.move(26); // invisible, from below to above center
leonardo.on();
leonardo.move(100); // blue, from above center to top left
leonardo.off();
return 0;
}