Skip to content
Snippets Groups Projects
Commit 4adfc661 authored by plojolo's avatar plojolo
Browse files

Rocaille se supprime au bout de 4 tours après contact avec feu

parent bd5cf2bb
No related branches found
No related tags found
No related merge requests found
Pipeline #25915 passed
......@@ -30,6 +30,7 @@ public class Fire extends AbstractElements {
if (!rockery.getElementsPositions().contains(firePosition)) {
List<Position> neighborPositions = neighborsWithoutSelectedElements(firePosition, mountain, road);
newElementsPositions.addAll(neighborPositions);
canMoveOnRockery(firePosition);
} else {
if (canMoveOnRockery(firePosition)) {
List<Position> neighborPositions = neighborsWithoutSelectedElements(firePosition, mountain, road);
......@@ -48,6 +49,7 @@ public class Fire extends AbstractElements {
if (rockeryCountStep.containsKey(position)) {
if (rockeryCountStep.get(position) == 0) {
rockeryCountStep.remove(position);
rockery.removeElement(position);
return true;
} else {
rockeryCountStep.put(position, rockeryCountStep.get(position) - 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment