2023-02-27 11:22:07 +01:00
|
|
|
package school_project;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
2023-03-21 09:56:13 +01:00
|
|
|
/**
|
|
|
|
* Represent the map with its pieces.
|
|
|
|
* Every piece has a position element that represent its position on the map
|
|
|
|
*/
|
2023-02-27 11:22:07 +01:00
|
|
|
public class Map extends Shape{
|
|
|
|
private ArrayList<Piece> pieces;
|
|
|
|
|
|
|
|
public Map(boolean[][] matrix) {
|
|
|
|
super(matrix);
|
|
|
|
}
|
|
|
|
|
2023-03-20 23:57:10 +01:00
|
|
|
public void addPiece(Piece piece){
|
2023-02-27 11:22:07 +01:00
|
|
|
pieces.add(piece);
|
|
|
|
}
|
|
|
|
}
|