« Return to Thread: extend robot.... overwrite fire()?

extend robot.... overwrite fire()?

by pepijndevos :: Rate this Message:

Reply to Author | View in Thread

hi,

i'm relatively new to both java and robocode.
when i build a robot i extend one of JuniorRobot, Robot or
AdvancedRobot.
then i overwrite the run() method to run my own code.

but can i write a robot with some basic behavior and extend that
instead of robot?
and can i overwrite methods like fire() or ahead()?
if so, can i copy the source code from the robot class and edit it?
imagin a fire() method that does not check for gun heat and does not
decreas my life... rapidfire robot!

bye!
pepijn

 « Return to Thread: extend robot.... overwrite fire()?