Difference between revisions of "Head-On Targeting"
Jump to navigation
Jump to search
m (removing "Targeting" category) |
m (marks as stub, too short really) |
||
Line 1: | Line 1: | ||
+ | {{stub}} | ||
+ | |||
The simple strategy of aiming where you last saw the enemy. Works surprisingly well against surprisingly many bots, especially in [[Melee]] battles. | The simple strategy of aiming where you last saw the enemy. Works surprisingly well against surprisingly many bots, especially in [[Melee]] battles. | ||
Revision as of 15:35, 23 May 2009
This article is a stub. You can help RoboWiki by expanding it. |
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()));