Skip to content
This repository was archived by the owner on May 8, 2023. It is now read-only.

Commit 44e5289

Browse files
authored
Merge pull request #46 from NineNineFive/FinalBranch
commit small comment line deletions
2 parents 752867d + 325fce7 commit 44e5289

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

src/files/controllers/Input.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ private void addEventListeners(ArrayList<Node> nodes){
103103
selectPathfinding.setValue("A*");
104104
model.setPathfinding((String) selectPathfinding.getValue());
105105
selectPathfinding.setOnAction(event -> {
106-
model.setPathfinding((String) selectPathfinding.getValue());
107-
108-
109106

110107
model.getGraph().getVertices().forEach(vertex -> {
111108
// Iterator necessary because we need to remove from ArrayList
@@ -127,6 +124,7 @@ private void addEventListeners(ArrayList<Node> nodes){
127124
model.getGraph().setEnd(null, model.getEnvironment());
128125
model.getPathfinding().state = "unset";
129126

127+
model.setPathfinding((String) selectPathfinding.getValue());
130128

131129
controller.updatePath();
132130
});

src/files/models/Graph.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,6 @@ public void setStart(Vertex start,Environment environment){
163163
double distance = Math.sqrt(Math.pow(other.getX() - start.getX(), 2) + Math.pow(other.getY() - start.getY(), 2));
164164
newEdge(start, other, distance, distance); // from, to, distance, time
165165
}
166-
/*
167-
// Make the other direction also
168-
if (creatableRelation) {
169-
double distance = Math.sqrt(Math.pow(other.getX() - start.getX(), 2) + Math.pow(other.getY() - start.getY(), 2));
170-
newEdge(other, start, distance, distance); // from, to, distance, time
171-
}
172-
*/
173166
}
174167

175168
}
@@ -205,11 +198,6 @@ public void setEnd(Vertex end,Environment environment){
205198
double distance = Math.sqrt(Math.pow(end.getX() - other.getX(), 2) + Math.pow(end.getY() - other.getY(), 2));
206199
newEdge(other, end, distance, distance); // from, to, distance, time
207200
}
208-
// Make the other way also
209-
if (creatableRelation) {
210-
double distance = Math.sqrt(Math.pow(end.getX() - other.getX(), 2) + Math.pow(end.getY() - other.getY(), 2));
211-
newEdge(end, other, distance, distance); // from, to, distance, time
212-
}
213201
}
214202

215203
}

0 commit comments

Comments
 (0)