Skip to content
Snippets Groups Projects
Commit 4bf0e377 authored by Sarah CHERCHEM's avatar Sarah CHERCHEM
Browse files

FirefighterBoard : modify the methode addElementToBoard

parent f77fdb87
Branches
No related tags found
No related merge requests found
Showing
with 6 additions and 0 deletions
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -59,6 +59,10 @@ public class FirefighterBoard implements Board<List<ModelElement>> {
behavior.getCloudPositions().stream()
.filter(pos -> pos.isAtPosition(position))
.forEach(pos -> result.add(new Cloud(pos)));
// Filtrage des éléments Motorized
behavior.getMotorizedFighters().stream()
.filter(pos -> pos.isAtPosition(position))
.forEach(pos -> result.add(new MotorizedFireFighter(pos)));
return result;
}
......@@ -80,6 +84,8 @@ public class FirefighterBoard implements Board<List<ModelElement>> {
behavior.getFirefighterPositions().add(position); // Ajouter un Firefighter
} else if (element instanceof Cloud) {
behavior.getCloudPositions().add(position);
} else if (element instanceof MotorizedFireFighter) {
behavior.getMotorizedFighters().add(position);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment