From bb7b48e6e60d746d196f8f7c2c81383479381c24 Mon Sep 17 00:00:00 2001 From: Oshgnacknak Date: Sun, 5 Sep 2021 21:30:31 +0200 Subject: [PATCH] Don't randomize weight whilst generating a maze --- src/main/java/de/oshgnacknak/gruphi/MazeGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/oshgnacknak/gruphi/MazeGenerator.java b/src/main/java/de/oshgnacknak/gruphi/MazeGenerator.java index 8fd7276..6786429 100644 --- a/src/main/java/de/oshgnacknak/gruphi/MazeGenerator.java +++ b/src/main/java/de/oshgnacknak/gruphi/MazeGenerator.java @@ -40,8 +40,8 @@ public class MazeGenerator { stack.push(current); var neighbour = unvisited.get(random.nextInt(unvisited.size())); - graph.connectNodes(current, random.nextDouble(), neighbour); - graph.connectNodes(neighbour, random.nextDouble(), current); + graph.connectNodes(current, 1.0, neighbour); + graph.connectNodes(neighbour, 1.0, current); visited.add(neighbour); stack.push(neighbour);