Compare commits
No commits in common. "124caff6203b502cf28d5a7d40069cabc9e88263" and "f574472a78fb136f818c33a593d4182a88d08282" have entirely different histories.
124caff620
...
f574472a78
|
@ -1,7 +1,7 @@
|
||||||
package ch.zhaw.ads;
|
package ch.zhaw.ads;
|
||||||
|
|
||||||
public class SnowflakeServer implements CommandExecutor {
|
public class SnowflakeServer implements CommandExecutor {
|
||||||
double distanz = 0.7;
|
double distanz = 1.0;
|
||||||
Turtle turtle;
|
Turtle turtle;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,11 +9,11 @@ public class SnowflakeServer implements CommandExecutor {
|
||||||
int steps = Integer.parseInt(command);
|
int steps = Integer.parseInt(command);
|
||||||
turtle = new Turtle();
|
turtle = new Turtle();
|
||||||
turtle.reset(0.5, 0.9);
|
turtle.reset(0.5, 0.9);
|
||||||
turtle.turn(240);
|
turtle.turn(60);
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++){
|
for(int i = 0; i > 3; i++){
|
||||||
drawSnowFlake(steps, distanz);
|
turtle.turn(-120);
|
||||||
turtle.turn(120);
|
drawSnowFlake(steps, 0.7 * distanz);
|
||||||
}
|
}
|
||||||
return turtle.getTrace();
|
return turtle.getTrace();
|
||||||
}
|
}
|
||||||
|
@ -25,11 +25,11 @@ public class SnowflakeServer implements CommandExecutor {
|
||||||
distanz = distanz / 3;
|
distanz = distanz / 3;
|
||||||
steps--;
|
steps--;
|
||||||
drawSnowFlake(steps, distanz);
|
drawSnowFlake(steps, distanz);
|
||||||
turtle.turn(-60);
|
turtle.turn(60);
|
||||||
drawSnowFlake(steps, distanz);
|
drawSnowFlake(steps, distanz);
|
||||||
turtle.turn(120);
|
turtle.turn(-120);
|
||||||
drawSnowFlake(steps, distanz);
|
drawSnowFlake(steps, distanz);
|
||||||
turtle.turn(-60);
|
turtle.turn(60);
|
||||||
drawSnowFlake(steps, distanz);
|
drawSnowFlake(steps, distanz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue