Skip to content
Snippets Groups Projects
Commit 9b68af80 authored by AREZKI Celia's avatar AREZKI Celia
Browse files

correction of the BoardFirefighterProperties class

parent d1ce29ba
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -9,22 +9,18 @@ public class BoardFirefighterProperties implements BoardProperties{
private final int rowCount;
private final int columnCount;
private final Position[][] positions;
private final Map<Position, List<Position>> neighbors;
private final int initialFireCount;
private final int initialFirefighterCount;
public BoardFirefighterProperties(int rowCount, int columnCount, Map<Position, List<Position>> neighbors, int initialFireCount, int initialFirefighterCount) {
public BoardFirefighterProperties(int rowCount, int columnCount) {
this.rowCount = rowCount;
this.columnCount = columnCount;
this.neighbors = neighbors;
this.initialFireCount = initialFireCount;
this.initialFirefighterCount = initialFirefighterCount;
this.positions = new Position[rowCount][columnCount];
initializePositions();
}
private void initializePositions() {
for (int row = 0; row < rowCount; row++) {
for (int column = 0; column < columnCount; column++) {
......@@ -35,10 +31,6 @@ public class BoardFirefighterProperties implements BoardProperties{
public Map<Position, List<Position>> getNeighbors() {
return neighbors;
}
public Position getPosition(int row, int column) {
return positions[row][column];
}
......@@ -52,11 +44,6 @@ public class BoardFirefighterProperties implements BoardProperties{
return columnCount;
}
public int getInitialFireCount() {
return initialFireCount;
}
public int getInitialFirefighterCount() {
return initialFirefighterCount;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment