blob: 7e5a762de2bafdd4485dfeafcfb4073d2bd37de2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package bug;
import bug.action.Action;
import java.util.List;
import java.util.LinkedList;
public class Global {
public int items() {
return 0;
}
public int items(int i) {
return i + ls.size();
}
private List<Action> ls = new LinkedList<Action>();
public void putAction(Action a) {
a.setGlobal(this);
ls.add(a);
}
public void runActions() {
for (Action action: ls) {
System.out.println("RUNNING ACTION");
action.run(0);
}
}
}
|