Hi John and welcome to Robocode. :)
The best source to get tips about Robocode is the RoboWiki here:
https://robowiki.net/wiki/Main_PageThe getTurn() method returns the current turn number, which is the same as the "time" or "tick" in Robocode.
If you want to do something every 100 ticks then you can use the
modulo operator.
So you could e.g. do something like:
If (getTime() % 100 == 0) { // every 100th tick
// do something else with radar
}
I guess your radar strategy depends on how many enemy bots are (left) on the battlefield (using the
getOthers() method).
E.g. if there is only one robot left, you might as well "lock" the radar on this last robot (1-to-1 battle).
If there are two robots left, then a better strategy might be to sweep the shortest distance for the radar between the two robots.
Make sure to have a look at some of the well-known radar strategies here at the RoboWiki:
https://robowiki.net/wiki/Radar
Best regards,
- Flemming