3 == Ports ===========================================================
7 == Constants ========================================================
8 == TeX ==============================================================
9 == Fleeterpreter ====================================================
10 private Queue<Long> fifo = new LinkedList<Long>();
11 public void service() {
12 if (box_in.dataReadyForShip()) {
13 fifo.add(box_in.removeDataForShip());
15 if (box_out.readyForDataFromShip() && fifo.size() > 0) {
16 box_out.addDataFromShip(fifo.remove());
20 == FleetSim ==============================================================
22 == Test =================================================================
26 // ships required in order to run this code
30 debug.in: [*] take, deliver;
35 [99] take, sendto fifo.in;
36 [1] take, sendto debug.in;
40 == Contributors =========================================================
41 Adam Megacz <megacz@cs.berkeley.edu>