I play Robocode (it is a java programming game). I want to change the method
public void onScannedRobot (ScannedRobotEvent e) {
}
to
public int onScannedRobot(ScannedRobotEvent e){
}
So I can adapt my robot more if it scanned is true or false.
I heard that it is possible with Overriding a method. So I tryed it:
I wrote:
public void onScannedRobot(ScannedRobotEvent e) {
public int onScannedRobot(ScannedRobotEvent e) {
return 1;
}
}
But it won't work