Added some documentation for classes and methods of modified files.
This commit is contained in:
1 parent
9d34134943
commit
8a8eac7ac1
3 files changed
+29
-2
No files matched your search
@@ -4,6 +4,18 @@ import java.util.List;
|
||||
|
||||
import dijkstra.VertexInterface;
|
||||
|
||||
/** <h1> Box class </h1>
|
||||
* <p>
|
||||
*
|
||||
* This class describes a Box and implements {@link dijkstra.VertexInterface}.
|
||||
* <p>
|
||||
* A Box is represented with its coordinates, its label, and its neighbourList. It also has a reference on the Maze.
|
||||
*
|
||||
* @author Antonin Godard
|
||||
* @author Sylvain Rager
|
||||
*
|
||||
*/
|
||||
|
||||
public abstract class Box
|
||||
implements VertexInterface {
|
||||
|
||||
|
||||
+10
-2
@@ -10,8 +10,7 @@ import dijkstra.VertexInterface;
|
||||
|
||||
/** <h1> Maze class </h1>
|
||||
* <p>
|
||||
* This class describes the maze as a matrix of Boxes ({@link maze.Box}).
|
||||
*
|
||||
* This class describes the maze as a matrix of Boxes ({@link maze.Box}).
|
||||
*
|
||||
* @author Antonin Godard
|
||||
* @author Sylvain Rager
|
||||
@@ -30,6 +29,9 @@ public class Maze
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int getCost(VertexInterface start, VertexInterface end) {
|
||||
|
||||
Box startBox = (Box) start ;
|
||||
@@ -51,6 +53,9 @@ public class Maze
|
||||
return dimensionX*dimensionY ;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ArrayList<VertexInterface>
|
||||
*/
|
||||
public ArrayList<VertexInterface> getVertexes() {
|
||||
ArrayList<VertexInterface> vertexList = new ArrayList<VertexInterface>() ;
|
||||
for (int i = 0 ; i < dimensionX ; i++) {
|
||||
@@ -63,6 +68,9 @@ public class Maze
|
||||
return vertexList ;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public ArrayList<VertexInterface> generateNeighbours(VertexInterface vertex) {
|
||||
|
||||
Box box = (Box)vertex ;
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
package maze;
|
||||
|
||||
/**<h1> MazeReadingException exception </h1>
|
||||
* <p>
|
||||
* This class is used to throw exception when reading and initiating the maze from a text file.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
public class MazeReadingException
|
||||
extends Exception {
|
||||
|
||||
|
||||
Reference in new issue
Block a user