From 320baf27eea7cc8842daae0a4c4ca1298f68ab8f Mon Sep 17 00:00:00 2001 From: Filip Szepielewicz Date: Sun, 6 Oct 2024 20:12:43 +0000 Subject: [PATCH] Update ShipMap.java --- .../model/src/main/java/pp/battleship/model/ShipMap.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Projekte/battleship/model/src/main/java/pp/battleship/model/ShipMap.java b/Projekte/battleship/model/src/main/java/pp/battleship/model/ShipMap.java index bb73d6b..3fe0538 100644 --- a/Projekte/battleship/model/src/main/java/pp/battleship/model/ShipMap.java +++ b/Projekte/battleship/model/src/main/java/pp/battleship/model/ShipMap.java @@ -10,6 +10,7 @@ package pp.battleship.model; import pp.battleship.notification.GameEvent; import pp.battleship.notification.GameEventBroker; import pp.battleship.notification.ItemAddedEvent; +import pp.battleship.notification.ItemRemovedEvent; import java.util.ArrayList; import java.util.Collections; @@ -97,7 +98,7 @@ public class ShipMap { */ public void remove(Item item) { items.remove(item); - notifyListeners(new ItemAddedEvent(item, this)); + notifyListeners(new ItemRemovedEvent(item, this)); } /** @@ -249,3 +250,5 @@ public class ShipMap { eventBroker.notifyListeners(event); } } + +