Skip to content

Commit

Permalink
Fixed personal art
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Wang committed Sep 16, 2013
1 parent 8fd9251 commit 68d33da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/turtle/TurtleSoup.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,15 @@ public static List<Double> calculateHeadings(List<Integer> xCoords, List<Integer
* @param turtle the turtle context
*/

//draws random lines at random angles, terminates if the angle gets to be above 270
//draws random lines at random angles
public static void drawPersonalArt(Turtle turtle) {
int length = 100;
double angle = 90;
while (angle < 270) {
int length = (int)Math.random();
angle = Math.random() % 360;
while (angle < 180) {
turtle.forward(length);
turtle.turn(angle);
length++;
angle++;
}
}

Expand Down

0 comments on commit 68d33da

Please sign in to comment.