re-arrange defunct ships
[fleet.git] / contrib / defunct-ships / Mux.java
diff --git a/contrib/defunct-ships/Mux.java b/contrib/defunct-ships/Mux.java
deleted file mode 100644 (file)
index 86a2822..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-package edu.berkeley.fleet.interpreter.ships;
-import edu.berkeley.fleet.interpreter.*;
-import edu.berkeley.fleet.*;
-
-import java.util.*;
-import java.io.*;
-
-public class Mux extends InterpreterShip {
-
-    DataInbox   ap      = new DataInbox(this,  "a");
-    DataInbox   bp      = new DataInbox(this,  "b");
-    DataInbox   choicep = new DataInbox(this, "select");
-    DataOutbox  out     = new DataOutbox(this, "out");
-
-    public Mux(Interpreter fleet, String name) { super(fleet, name); }
-
-    public String getBalsaName() { return "mux"; }
-
-    public void service() {
-        if (ap.dataReadyForShip() && bp.dataReadyForShip() && choicep.dataReadyForShip()) {
-            int a      = ap.removeDataForShip();
-            int b      = bp.removeDataForShip();
-            int choice = choicep.removeDataForShip();
-            out.addDataFromShip(choice==0 ? a : b);
-        }
-    }
-
-}