Adding Map class
Signed-off-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
This commit is contained in:
parent
498529f29a
commit
e983c5aa13
20
app/src/main/java/school_project/Map.java
Normal file
20
app/src/main/java/school_project/Map.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package school_project;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class Map extends Shape{
|
||||||
|
private ArrayList<Piece> pieces;
|
||||||
|
|
||||||
|
public Map(boolean[][] matrix) {
|
||||||
|
super(matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: 2/27/23 Tests for Map
|
||||||
|
public void AddShape(Piece piece){
|
||||||
|
pieces.add(piece);
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ package school_project;
|
|||||||
|
|
||||||
public class Piece extends Shape{
|
public class Piece extends Shape{
|
||||||
|
|
||||||
|
private int x,y; // Position in the Map Object
|
||||||
public Piece() {
|
public Piece() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
2
app/src/main/java/school_project/Position.java
Normal file
2
app/src/main/java/school_project/Position.java
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
package school_project;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user