Merge branch 'javadoc' into lastDijsktraClasses
This commit was merged in pull request #6.
This commit is contained in:
commit
5d75a82103
15 files changed
+158
-20
No files matched your search
+17
-1
@@ -8,6 +8,14 @@ import java.util.ArrayList;
|
||||
import dijkstra.GraphInterface;
|
||||
import dijkstra.VertexInterface;
|
||||
|
||||
/** <h1> Maze class </h1>
|
||||
* <p>
|
||||
* This class describes the maze as a matrix of Boxes ({@link maze.Box}).
|
||||
*
|
||||
* @author Antonin Godard
|
||||
* @author Sylvain Rager
|
||||
*
|
||||
*/
|
||||
public class Maze
|
||||
implements GraphInterface {
|
||||
|
||||
@@ -21,6 +29,9 @@ public class Maze
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int getCost(VertexInterface start, VertexInterface end) {
|
||||
|
||||
Box startBox = (Box) start ;
|
||||
@@ -81,12 +92,17 @@ public class Maze
|
||||
|
||||
}
|
||||
|
||||
/**Constructs the maze from a text file, according to each single character on each line.
|
||||
* @param filename
|
||||
* The path to the file containing the representation of the maze.
|
||||
*/
|
||||
|
||||
public final void initFromTextFile(String filename) {
|
||||
|
||||
FileReader fr = null ;
|
||||
BufferedReader br = null ;
|
||||
|
||||
try { //Determines the height of the maze and stores it into lineCount
|
||||
try {
|
||||
fr = new FileReader(filename) ;
|
||||
br = new BufferedReader(fr) ;
|
||||
while (br.readLine() != null) dimensionY++;
|
||||
|
||||
Reference in new issue
Block a user