Adding Map class

Signed-off-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
This commit is contained in:
Debucquoy Anthony 2023-02-27 11:22:07 +01:00
parent 498529f29a
commit e983c5aa13
Signed by: tonitch
GPG Key ID: A78D6421F083D42E
3 changed files with 23 additions and 0 deletions

View 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);
}
}

View File

@ -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();
} }

View File

@ -0,0 +1,2 @@
package school_project;