Thread history

Fragment of a discussion from User talk:Gertjan1996
Viewing a history listing
Jump to navigation Jump to search
Time User Activity Comment
No results

give me the source code And Ill Try To fix it

Tmservo (talk)20:14, 21 May 2014

package MyRobots;

import robocode.AdvancedRobot; import robocode.ScannedRobotEvent; import robocode.util.Utils;

public class Yeah extends AdvancedRobot {

public void run() {

   turnRadarRightRadians(Double.POSITIVE_INFINITY);
   do {
       scan();
   } while (true);

}

public void onScannedRobot(ScannedRobotEvent e) {

   double radarTurn =
       // Absolute bearing to target
       getHeadingRadians() + e.getBearingRadians()
       // Subtract current radar heading to get turn required
       - getRadarHeadingRadians();

   setTurnRadarRightRadians(Utils.normalRelativeAngle(radarTurn));

}

}

Gertjan1996 (talk)20:21, 21 May 2014

Nevermind, i fixed it already. Still thanks for your help

Gertjan1996 (talk)20:23, 21 May 2014

now show everyone the robot

Tmservo (talk)20:26, 21 May 2014

It now only has a radar :P

Still have to add the movement and targeting haha

Gertjan1996 (talk)20:28, 21 May 2014