Do you know, how can I get a RobotState of my robot in Robocode? I would like to get an information for example, if my robot is active, alive, dead etc. In debug mode is it possible to see that information, but how can I get this in my code?

Do you know, how can I get a RobotState of my robot in Robocode? I would like to get an information for example, if my robot is active, alive, dead etc. In debug mode is it possible to see that information, but how can I get this in my code?

The enum RobotState is only used in the core of RoboCode. There is no
getState()method for your robot. (i digged through the source code)However: you can get all theses state in other ways:
If your robot is hitting a wall, a HitWall event is fired. you can handle those events by overriding a method in your robot class:
same with hitting a robot:
if your robot dies:
and if it's alive it should still loop in your runs method:
You can look at even more event methods in this interfaces: