Map generation fixed

This commit is contained in:
Simon Wilkening 2024-10-07 12:26:14 +02:00
parent 8f08e83358
commit 64834e8bf1

View File

@ -10,6 +10,7 @@ package pp.battleship.model;
import pp.battleship.notification.GameEvent; import pp.battleship.notification.GameEvent;
import pp.battleship.notification.GameEventBroker; import pp.battleship.notification.GameEventBroker;
import pp.battleship.notification.ItemAddedEvent; import pp.battleship.notification.ItemAddedEvent;
import pp.battleship.notification.ItemRemovedEvent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -97,7 +98,7 @@ public class ShipMap {
*/ */
public void remove(Item item) { public void remove(Item item) {
items.remove(item); items.remove(item);
notifyListeners(new ItemAddedEvent(item, this)); notifyListeners(new ItemRemovedEvent(item, this));
} }
/** /**