Head-On Targeting
Revision as of 07:22, 10 November 2007 by Voidious (talk | contribs) (HeadOnTargeting moved to Head-On Targeting)
Description
The simple strategy of aiming where you last saw the enemy. Works surprisingly well against surprisingly many bots, especially in Melee battles.
Example
In onScannedRobot
, add:
double absoluteBearing = getHeadingRadians() + e.getBearingRadians(); setTurnGunRightRadians(robocode.util.Utils.normalRelativeAngle(absoluteBearing - getGunHeadingRadians()));