@@ -19,7 +19,7 @@ public class SearchAlgorithms {
1919
2020 private static final double cellCostMultiplicator = 1 ;
2121
22- public static Queue <AnimationInstruction > BFS (Grid grid , GridCell startCell , GridCell endCell ) {
22+ public static Queue <AnimationInstruction > bfs (Grid grid , GridCell startCell , GridCell endCell ) {
2323 int traversedCells = 0 ;
2424
2525 Queue <AnimationInstruction > animationQueue = new LinkedList <AnimationInstruction >();
@@ -56,7 +56,7 @@ public static Queue<AnimationInstruction> BFS(Grid grid, GridCell startCell, Gri
5656 return animationQueue ;
5757 }
5858
59- // getting adjacent cells which have been not visited yet
59+ // getting adjacent cells which have not been visited yet
6060 for (GridCell neighbor : grid .getNeighbors (current )) {
6161
6262 if (!(visited .contains (neighbor ))) {
@@ -77,7 +77,7 @@ public static Queue<AnimationInstruction> BFS(Grid grid, GridCell startCell, Gri
7777 return animationQueue ;
7878 }
7979
80- public static Queue <AnimationInstruction > DFS (Grid grid , GridCell startCell , GridCell endCell ) {
80+ public static Queue <AnimationInstruction > dfs (Grid grid , GridCell startCell , GridCell endCell ) {
8181 int traversedCells = 0 ;
8282
8383 Queue <AnimationInstruction > animationQueue = new LinkedList <AnimationInstruction >();
@@ -114,7 +114,7 @@ public static Queue<AnimationInstruction> DFS(Grid grid, GridCell startCell, Gri
114114 return animationQueue ;
115115 }
116116
117- // getting adjacent cells which have been not visited yet
117+ // getting adjacent cells which have not been visited yet
118118 for (GridCell neighbor : grid .getNeighbors (current )) {
119119
120120 if (!(visited .contains (neighbor ))) {
@@ -135,7 +135,7 @@ public static Queue<AnimationInstruction> DFS(Grid grid, GridCell startCell, Gri
135135 return animationQueue ;
136136 }
137137
138- public static Queue <AnimationInstruction > AStar (Grid grid , GridCell startCell , GridCell endCell ) {
138+ public static Queue <AnimationInstruction > aStar (Grid grid , GridCell startCell , GridCell endCell ) {
139139 int traversedCells = 0 ;
140140
141141 Queue <AnimationInstruction > animationQueue = new LinkedList <AnimationInstruction >();
@@ -172,7 +172,7 @@ public static Queue<AnimationInstruction> AStar(Grid grid, GridCell startCell, G
172172 return animationQueue ;
173173 }
174174
175- // getting adjacent cells which have been not visited yet
175+ // getting adjacent cells which have not been visited yet
176176 for (GridCell neighbor : grid .getNeighbors (current )) {
177177
178178 if (!(visited .contains (neighbor ))) {
@@ -197,7 +197,7 @@ public static Queue<AnimationInstruction> AStar(Grid grid, GridCell startCell, G
197197 return animationQueue ;
198198 }
199199
200- public static Queue <AnimationInstruction > BestFirstSearch (Grid grid , GridCell startCell , GridCell endCell ) {
200+ public static Queue <AnimationInstruction > bestFirstSearch (Grid grid , GridCell startCell , GridCell endCell ) {
201201 int traversedCells = 0 ;
202202 Queue <AnimationInstruction > animationQueue = new LinkedList <AnimationInstruction >();
203203 PriorityQueue <PQueueEntry > PQueue = new PriorityQueue <PQueueEntry >();
@@ -233,7 +233,7 @@ public static Queue<AnimationInstruction> BestFirstSearch(Grid grid, GridCell st
233233 return animationQueue ;
234234 }
235235
236- // getting adjacent cells which have been not visited yet
236+ // getting adjacent cells which have not been visited yet
237237 for (GridCell neighbor : grid .getNeighbors (current )) {
238238
239239 if (!(visited .contains (neighbor ))) {
@@ -257,7 +257,7 @@ public static Queue<AnimationInstruction> BestFirstSearch(Grid grid, GridCell st
257257 return animationQueue ;
258258 }
259259
260- public static Queue <AnimationInstruction > HeuristicDephthFirstSearch (Grid grid , GridCell startCell , GridCell endCell ) {
260+ public static Queue <AnimationInstruction > heuristicDepthFirstSearch (Grid grid , GridCell startCell , GridCell endCell ) {
261261 int traversedCells = 0 ;
262262
263263 Queue <AnimationInstruction > animationQueue = new LinkedList <AnimationInstruction >();
@@ -294,7 +294,7 @@ public static Queue<AnimationInstruction> HeuristicDephthFirstSearch(Grid grid,
294294 return animationQueue ;
295295 }
296296
297- // getting adjacent cells which have been not visited yet
297+ // getting adjacent cells which have not been visited yet
298298
299299 PriorityQueue <PQueueEntry > localMinHeuristic = new PriorityQueue <PQueueEntry >();
300300 for (GridCell neighbor : grid .getNeighbors (current )) {
0 commit comments