From f574472a78fb136f818c33a593d4182a88d08282 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Mon, 17 Oct 2022 20:03:35 +0200 Subject: [PATCH] Solved Task 2 --- src/ch/zhaw/ads/SnowflakeServer.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ch/zhaw/ads/SnowflakeServer.java b/src/ch/zhaw/ads/SnowflakeServer.java index 9e8a4cb..5393401 100644 --- a/src/ch/zhaw/ads/SnowflakeServer.java +++ b/src/ch/zhaw/ads/SnowflakeServer.java @@ -6,9 +6,15 @@ public class SnowflakeServer implements CommandExecutor { @Override public String execute(String command) { - turtle = new Turtle(); int steps = Integer.parseInt(command); - drawSnowFlake(steps, distanz); + turtle = new Turtle(); + turtle.reset(0.5, 0.9); + turtle.turn(60); + + for(int i = 0; i > 3; i++){ + turtle.turn(-120); + drawSnowFlake(steps, 0.7 * distanz); + } return turtle.getTrace(); }