RedPanda-CPP/linux/templates/CL_Turtle_cpp.txt

25 lines
340 B
Plaintext
Raw Normal View History

2022-06-04 18:25:58 +08:00
#include <rturtle.h>
int main() {
int n;
initWorld(800,600);
// Press F2 toggle display of grids
// Press F3 toggle display of the turtle
setSpeed(500);
// setRewind(true);
// setImmediate(true);
n=50;
for (int i=0;i<n;i++) {
for (int j=0;j<4;j++) {
fd(200);
lt(90);
}
lt(360.0/n);
}
waitClick();
return 0;
}