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