-
Notifications
You must be signed in to change notification settings - Fork 0
/
lumberjack.pde
30 lines (24 loc) · 1.19 KB
/
lumberjack.pde
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
30
class Lumberjack extends Citizen {
Lumberjack(Cell initialLocation, Building buildingAssignment, PlayerState ownerState) {
super(initialLocation, buildingAssignment, ownerState);
this.type = HumanCode.LUMBERJACK;
this.c = new int[]{69,44,0};
Task[] gatherSelector = new Task[2];
gatherSelector[0] = new Gather(this.blackboard, 2);
gatherSelector[1] = new Move(this.blackboard);
Selector gatherSelectors = new Selector(this.blackboard, gatherSelector);
Task[] processSelector = new Task[2];
processSelector[0] = new Process(this.blackboard);
processSelector[1] = new Move(this.blackboard);
Selector processSelectors = new Selector(this.blackboard, processSelector);
Task[] dropoffSelector = new Task[2];
dropoffSelector[0] = new DropOff(this.blackboard, "Lumber");
dropoffSelector[1] = new Move(this.blackboard);
Selector dropoffSelectors = new Selector(this.blackboard, dropoffSelector);
Task[] gatherSequenceItems = new Task[3];
gatherSequenceItems[0] = gatherSelectors;
gatherSequenceItems[1] = processSelectors;
gatherSequenceItems[2] = dropoffSelectors;
this.btree = new Sequence(this.blackboard, gatherSequenceItems);
}
}