projects
/
fleet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
added support for copying moves
[fleet.git]
/
src
/
edu
/
berkeley
/
fleet
/
FetchShip.java
1
package edu.berkeley.fleet;
2
3
import java.util.*;
4
import java.io.*;
5
6
public class FetchShip extends Ship {
7
8
Inbox in = new Inbox("in");
9
Outbox done = new Outbox("done");
10
11
public FetchShip(Fleet fleet, String name) {
12
super(fleet, name);
13
}
14
15
public void service() {
16
while (!in.empty()) {
17
fleet.dispatchCodeBag(in.remove());
18
done.add(0);
19
}
20
}
21
22
}