diff --git a/src/Map.java b/src/Map.java index 3a96ab4..c047d10 100644 --- a/src/Map.java +++ b/src/Map.java @@ -9,6 +9,20 @@ public class Map public Map(Circuit[][] map) { this.map = map; + this.buildPath(); + } + + private boolean buildPath() + { + Point[] p = bindPath(); + + if (p == null) + return false; + + Point start = p[0]; + Point end = p[0]; + + return followPath(start, end); } private Point[] bindPath()