more cleanup
[fleet.git] / src / edu / berkeley / fleet / dataflow / DataFlowGraph.java
index 1510a7b..7131e87 100644 (file)
@@ -27,7 +27,6 @@ public class DataFlowGraph {
     public final ShipPool pool;
     private HashSet<Node> nodes = new HashSet<Node>();
 
-    public static int reset_count = 0;
     public static HashSet<Dock> torpedoes = new HashSet<Dock>();
 
     public DataFlowGraph(Fleet fleet) {
@@ -44,11 +43,12 @@ public class DataFlowGraph {
         for(Node mod : nodes)
             mod.build(ctx);
     }
-    public void reset(Context ctx, int phase, Destination ackDestination) {
-        reset_count = 0;
+    public int reset(Context ctx, int phase, Destination ackDestination) {
+        int ret = 0;
         torpedoes.clear();
         for(Node mod : nodes)
-            mod.reset(ctx, phase, ackDestination);
+            ret += mod.reset(ctx, phase, ackDestination);
+        return ret;
     }
 }