From 2bb988f421a98edae2d935091b849a89386bb98c Mon Sep 17 00:00:00 2001 From: nyanyan <46193012+zentox@users.noreply.github.com> Date: Wed, 20 Sep 2023 13:04:16 +0200 Subject: [PATCH] Fix/feedback (#5) * Remove duplicate code * Remove unrelated comments to task * Add example solution for ungraded task --------- Co-authored-by: zentox --- src/main/java/h06/ui/MazeVisualizer.java | 2 -- src/main/java/h06/world/World.java | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/main/java/h06/ui/MazeVisualizer.java b/src/main/java/h06/ui/MazeVisualizer.java index babb4db..2cfbcdb 100644 --- a/src/main/java/h06/ui/MazeVisualizer.java +++ b/src/main/java/h06/ui/MazeVisualizer.java @@ -62,8 +62,6 @@ public void run(ProblemSolver solver, Point s, Point e, DirectionVector d) { fopbot.World.getGlobalWorld().setFieldColor(s.x, s.y, Color.BLUE); fopbot.World.getGlobalWorld().setFieldColor(e.x, e.y, Color.YELLOW); - fopbot.World.getGlobalWorld().setFieldColor(s.x, s.y, Color.BLUE); - fopbot.World.getGlobalWorld().setFieldColor(s.x, s.y, Color.YELLOW); for (int i = 1; i < path.length; i++) { Point p = path[i]; int x = robot.getX(); diff --git a/src/main/java/h06/world/World.java b/src/main/java/h06/world/World.java index 05aa32e..75c79ee 100644 --- a/src/main/java/h06/world/World.java +++ b/src/main/java/h06/world/World.java @@ -137,8 +137,6 @@ public boolean isBlocked(Point p, DirectionVector d) { int x; int y; boolean horizontal; - // 1 point for vertical - // 1 point for special case if (p.x > r.x) { // Right, vertical check x = r.x;