Avancement sur le tp. Implémentation (pas finie) des interfaces pour le
maze et Box.
This commit is contained in:
1 parent
0f7ef69441
commit
f7646c48f6
8 files changed
+75
-16
No files matched your search
@@ -1,14 +1,24 @@
|
||||
|
||||
public abstract class Box {
|
||||
public abstract class Box
|
||||
implements VertexInterface {
|
||||
|
||||
private int x ;
|
||||
private int y ;
|
||||
private String label ;
|
||||
private Maze maze ;
|
||||
|
||||
public Box (int x, int y) {
|
||||
|
||||
public Box (String label, int x, int y, Maze maze) {
|
||||
this.label = label ;
|
||||
this.x = x ;
|
||||
this.y = y ;
|
||||
|
||||
this.maze = maze ;
|
||||
}
|
||||
|
||||
public boolean compareTo(VertexInterface vertex) {
|
||||
if (this.getLabel() == vertex.getLabel()) {
|
||||
return true ;
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
@@ -26,5 +36,23 @@ public abstract class Box {
|
||||
public void setY(int y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public Maze getMaze() {
|
||||
return maze;
|
||||
}
|
||||
|
||||
public void setMaze(Maze maze) {
|
||||
this.maze = maze;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user