projects
/
fleet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4165a81
)
ShipPool.allocateShip() needs to invoke ancestor/parent allocateShip()
author
Adam Megacz
<adam@megacz.com>
Mon, 27 Jul 2009 03:22:28 +0000
(20:22 -0700)
committer
Adam Megacz
<adam@megacz.com>
Mon, 27 Jul 2009 03:22:28 +0000
(20:22 -0700)
src/edu/berkeley/fleet/loops/ShipPool.java
patch
|
blob
|
history
diff --git
a/src/edu/berkeley/fleet/loops/ShipPool.java
b/src/edu/berkeley/fleet/loops/ShipPool.java
index
23b9a04
..
82a5296
100644
(file)
--- a/
src/edu/berkeley/fleet/loops/ShipPool.java
+++ b/
src/edu/berkeley/fleet/loops/ShipPool.java
@@
-27,6
+27,8
@@
public class ShipPool implements Iterable<Ship> {
public void allocateShip(Ship ship) {
if (allocatedShips.contains(ship))
throw new RuntimeException("already allocated!");
+ if (parent != null)
+ parent.allocateShip(ship);
allocatedShips.add(ship);
}