Make InterpreterProcess public, add step() methods
authormegacz <adam@megacz.com>
Sat, 13 Dec 2008 05:36:15 +0000 (21:36 -0800)
committermegacz <adam@megacz.com>
Sat, 13 Dec 2008 05:36:15 +0000 (21:36 -0800)
src/edu/berkeley/fleet/interpreter/Interpreter.java

index 670897b..1964f05 100644 (file)
@@ -135,7 +135,7 @@ public class Interpreter extends FleetTwoFleet implements Parser.FleetWithDynami
         return ip;
     }
 
-    private class InterpreterProcess extends FleetProcess implements Runnable {
+    public class InterpreterProcess extends FleetProcess implements Runnable {
         private Instruction[] instructions;
         public void flush() { }
         public void sendWord(Destination d, BitVector word) {
@@ -170,5 +170,14 @@ public class Interpreter extends FleetTwoFleet implements Parser.FleetWithDynami
                 throw new RuntimeException(e);
             }
         }
+
+        public void step(Dock d) {
+            ((InterpreterDock)d).service();
+        }
+        
+        public void step(Ship s) {
+            ((InterpreterShip)s).service();
+        }
+
     }
 }
\ No newline at end of file