/* * BadPele.java */ import EDU.gatech.cc.is.util.Vec2; import EDU.gatech.cc.is.abstractrobot.*; //Clay not used /** * A bad attacker - run slowly to the ball, don't do anything else. * @author Jim Hendler */ public class BadPele extends ControlSystemSS { /** Configure the Avoid control system. This method is called once at initialization time. You can use it to do whatever you like. */ public void Configure() { } /** Called every timestep to allow the control system to run. */ public int TakeStep() { Vec2 result,ball; long curr_time = abstract_robot.getTime(); // get vector to the ball ball = abstract_robot.getBall(curr_time); // set heading towards it abstract_robot.setSteerHeading(curr_time, ball.t); // set speed at maximum abstract_robot.setSpeed(curr_time, .5); // tell the parent we're OK return(CSSTAT_OK); } }