2015-02-10 16:51:44 +00:00
|
|
|
import ch.aplu.turtle.Turtle;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by Christian on 10.02.2015.
|
|
|
|
*/
|
|
|
|
public class DrawingTools {
|
|
|
|
public static void drawSquare(Turtle turtle, double size) {
|
2015-02-11 10:45:39 +00:00
|
|
|
int width = (int) size / 10;
|
|
|
|
turtle.penWidth(width);
|
2015-02-10 16:51:44 +00:00
|
|
|
for (int i = 0; i < 4; i++) {
|
|
|
|
turtle.forward(size).left(90);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|