Exemplo n.º 1
0
 @Override
 public void onStop(SimState ss, RobotState properties, Match m) {
   properties.decrement("discs");
   super.onStop(ss, properties, m);
 }
Exemplo n.º 2
0
 @Override
 public boolean canPerform(RobotState properties, Match m) {
   // We can't do this action if there's not time enough left in match
   // Or, I guess, if the robot doesn't have discs...
   return this.secondsRemaining <= m.getSecondsRemaining() && properties.get("discs") > 0;
 }