[Home]HeadOnTargeting

Robo Home | Changes | Preferences | AllPages

Showing revision 6
To shoot using HeadOnTargeting:

In onScannedRobot, add:

double absoluteBearing = getHeadingRadians() + e.getBearingRadians();
setTurnGunRightRadians(robocode.util.Utils.normalRelativeAngle(absoluteBearing - getGunHeadingRadians());


The simple strategy of Targeting where you last saw the enemy. Works surprisingly well against surprisingly many bots. Especially in Melee battle. -- PEZ

Please post bots on robocode rumble that use head on targeting in HeadOnTargetingBots? --andrew


Robo Home | Changes | Preferences | AllPages
Edit revision 6 of this page | View other revisions | View current revision
Edited November 9, 2004 0:11 EST by PEZ (diff)
Search: