Added some documentation for classes and methods of modified files.

This commit is contained in:
antograb committed 2017-12-07 14:29:04 +01:00
1 parent 9d34134943
commit 8a8eac7ac1
3 files changed
+29 -2

No files matched your search

+12
View File
@@ -4,6 +4,18 @@ import java.util.List;
import dijkstra.VertexInterface; 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 public abstract class Box
implements VertexInterface { implements VertexInterface {
+10 -2
View File
@@ -10,8 +10,7 @@ import dijkstra.VertexInterface;
/** <h1> Maze class </h1> /** <h1> Maze class </h1>
* <p> * <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 Antonin Godard
* @author Sylvain Rager * @author Sylvain Rager
@@ -30,6 +29,9 @@ public class Maze
} }
/**
*
*/
public int getCost(VertexInterface start, VertexInterface end) { public int getCost(VertexInterface start, VertexInterface end) {
Box startBox = (Box) start ; Box startBox = (Box) start ;
@@ -51,6 +53,9 @@ public class Maze
return dimensionX*dimensionY ; return dimensionX*dimensionY ;
} }
/**
* @param ArrayList<VertexInterface>
*/
public ArrayList<VertexInterface> getVertexes() { public ArrayList<VertexInterface> getVertexes() {
ArrayList<VertexInterface> vertexList = new ArrayList<VertexInterface>() ; ArrayList<VertexInterface> vertexList = new ArrayList<VertexInterface>() ;
for (int i = 0 ; i < dimensionX ; i++) { for (int i = 0 ; i < dimensionX ; i++) {
@@ -63,6 +68,9 @@ public class Maze
return vertexList ; return vertexList ;
} }
/**
*
*/
public ArrayList<VertexInterface> generateNeighbours(VertexInterface vertex) { public ArrayList<VertexInterface> generateNeighbours(VertexInterface vertex) {
Box box = (Box)vertex ; Box box = (Box)vertex ;
+7
View File
@@ -1,5 +1,12 @@
package maze; 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 public class MazeReadingException
extends Exception { extends Exception {