Fields and methods should not have conflicting names like isFinished. While this is technically legal it can lead to misunderstandings and problems with serialization.
Loading history...
9
long runTime;
10
long startTime;
11
12
public CyborgCommandSpit(long runTime) {
13
isFinished = false;
14
requires(Robot.SUB_MANIPULATOR);
15
this.runTime = runTime;
16
}
17
18
protected void initialize() {
19
startTime = System.currentTimeMillis();
20
}
21
22
protected void execute() {
23
if (startTime + runTime >= System.currentTimeMillis()){