次のコードがあります。angle 関数には、呼び出し元のクラスからの情報が必要です。これを行う最善の方法は何ですか?
class MyScannedRobotEvent extends robocode.ScannedRobotEvent {
public int angle(robocode.Robot myRobot) {
return (int) Math.toRadians((myRobot.getHeading() + getBearing()) % 360);
}
}
public class MyRobot extends robocode.Robot {
int a = MyScannedRobotEvent.angle(*WHATDOIPUTHERE?*);
}