diff options
Diffstat (limited to 'structure/Grid.java')
| -rw-r--r-- | structure/Grid.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/structure/Grid.java b/structure/Grid.java index 20f2a4f..0255909 100644 --- a/structure/Grid.java +++ b/structure/Grid.java @@ -23,6 +23,14 @@ public class Grid { this.grid.add(new Router()); } + this.buildRandomLink(); + + this.buildLinks(); + } + + + + public void buildRandomLink(){ // First line this.buildLinkWithRandomWeight(grid.get(0), grid.get(1)); this.buildLinkWithRandomWeight(grid.get(1), grid.get(2)); @@ -47,10 +55,8 @@ public class Grid { this.buildLinkWithRandomWeight(grid.get(2), grid.get(5)); this.buildLinkWithRandomWeight(grid.get(5), grid.get(8)); - this.buildLinks(); } - private void buildLinks(){ // Link1 |
