Début TP. Pas encore implémenté la référence des Box concrètes sur le Maze
This commit is contained in:
commit
ca8048efc5
6 files changed
+111
No files matched your search
@@ -0,0 +1,9 @@
|
||||
|
||||
public class ABox extends Box{
|
||||
|
||||
public ABox (int x, int y) {
|
||||
|
||||
super(x,y) ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
public class Box {
|
||||
|
||||
private int x ;
|
||||
private int y ;
|
||||
|
||||
public Box (int x, int y) {
|
||||
|
||||
this.x = x ;
|
||||
this.y = y ;
|
||||
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX(int x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setY(int y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
public class DBox extends Box{
|
||||
|
||||
public DBox (int x, int y) {
|
||||
|
||||
super(x,y) ;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
public class EBox extends Box{
|
||||
|
||||
public EBox (int x, int y) {
|
||||
|
||||
super(x,y) ;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
public class Maze {
|
||||
|
||||
int dimensionX ;
|
||||
int dimensionY ;
|
||||
int[][] maze ;
|
||||
|
||||
public Maze(int x, int y) {
|
||||
|
||||
this.dimensionX = x ;
|
||||
this.dimensionY = y ;
|
||||
this.maze = new int[dimensionX][dimensionY] ;
|
||||
|
||||
}
|
||||
|
||||
public int getDimensionX() {
|
||||
return dimensionX;
|
||||
}
|
||||
|
||||
public void setDimensionX(int dimensionX) {
|
||||
this.dimensionX = dimensionX;
|
||||
}
|
||||
|
||||
public int getDimensionY() {
|
||||
return dimensionY;
|
||||
}
|
||||
|
||||
public void setDimensionY(int dimensionY) {
|
||||
this.dimensionY = dimensionY;
|
||||
}
|
||||
|
||||
public int[][] getMaze() {
|
||||
return maze;
|
||||
}
|
||||
|
||||
public void setMaze(int[][] maze) {
|
||||
this.maze = maze;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user