Fix ShipMap.remove
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
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 void add(Shot shot) {
|
|||||||
*/
|
*/
|
||||||
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user