5 errors, who can help me?

Jump to navigation Jump to search

I am sure this is not good, but where am i going wrong?

import robocode.AdvancedRobot; import robocode.ScannedRobotEvent; import java.awt.geom.*; import robocode.util.Utils;

public class WaveBullet { private double startX, startY, startBearing, power; private long fireTime; private int direction; private int[] returnSegment;

public WaveBullet(double x, double y, double bearing, double power, int direction, long time, int[] segment) { startX = x; startY = y; startBearing = bearing; this.power = power; this.direction = direction; fireTime = time; returnSegment = segment; }

public class Yeah extends AdvancedRobot { public void run() {

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

} static double prevEnergy = 100.0; 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));

{ //energy monitoring

	if(prevEnergy > (prevEnergy = e.getEnergy()) && getDistanceRemaining() == 0.0);

} } }

Gertjan1996 (talk)22:27, 21 May 2014

Just compile it and see what happens

Tmservo (talk)22:31, 21 May 2014

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:User talk:Gertjan1996/5 errors, who can help me?/reply (21).

You need To make a Robot That Uses Multiple Java files

Tmservo (talk)22:39, 21 May 2014