The simple strategy of Targeting where you last saw the enemy. Works surprisingly well against surprisingly many bots. Especially in Melee battle. -- PEZ |
setTurnGunRightRadians?(robocode.util.Utils.normalRelativeAngle(absoluteBearing - getGunHeadingRadians?()); |
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 |
* NanoStalker |
* NanoStalker * DaRula * GrubbmOgre |
To shoot using HeadOnTargeting:
In onScannedRobot
, add:
double absoluteBearing = getHeadingRadians() + e.getBearingRadians(); setTurnGunRightRadians(robocode.util.Utils.normalRelativeAngle(absoluteBearing - getGunHeadingRadians()));
Bots using this technique: