projects
/
fleet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix demos to work with new assertAllocated() lines in writeMem
[fleet.git]
/
src
/
edu
/
berkeley
/
fleet
/
loops
/
ShipPool.java
diff --git
a/src/edu/berkeley/fleet/loops/ShipPool.java
b/src/edu/berkeley/fleet/loops/ShipPool.java
index
27dbff1
..
60bd121
100644
(file)
--- a/
src/edu/berkeley/fleet/loops/ShipPool.java
+++ b/
src/edu/berkeley/fleet/loops/ShipPool.java
@@
-26,7
+26,7
@@
public class ShipPool implements Iterable<Ship> {
public void allocateShip(Ship ship) {
if (allocatedShips.contains(ship))
public void allocateShip(Ship ship) {
if (allocatedShips.contains(ship))
- throw new RuntimeException("already allocated!");
+ throw new RuntimeException("ship " + ship + " is already allocated!");
if (parent != null)
parent.allocateShip(ship);
allocatedShips.add(ship);
if (parent != null)
parent.allocateShip(ship);
allocatedShips.add(ship);