The walls are defined by two points. That is point (0,0) and and point (battleFieldWidth, battleFieldHeight).
You can use the two methods getBattleFieldWidth() and getBattleFieldHeight() to get the battle field size.
Actually it is possible to create your own Condition for firing a Custom Event in Robocode. This way you are able to create your own event for detection the wall, and also tell which walls that have been detected.
Here I give you a complete robot showing how to do that:
Why do you want such an event?
The walls are defined by two points. That is point (0,0) and and point (battleFieldWidth, battleFieldHeight).
You can use the two methods getBattleFieldWidth() and getBattleFieldHeight() to get the battle field size.
Actually it is possible to create your own Condition for firing a Custom Event in Robocode. This way you are able to create your own event for detection the wall, and also tell which walls that have been detected.
Here I give you a complete robot showing how to do that: