One of the Poetss, and a Droid. |
One of the Poetss, and a Droid. In fact: A Haiku, Perceptual, ExtendsRobot, Droid bot. Follows walls and shoots against the center of the battle field. Download: http://www.robocoderepository.com/BotDetail.jsp?id=1748 Here's the source for version 2.0
And any old versions goes here: /OldVersions |
Download: http://www.robocoderepository.com/BotDetail.jsp?id=1748
Here's the source for version 2.0
package pez.femto; import robocode.*; // DroidPoet - Blind and strong - http://robowiki.net?Poet#DroidPoet // By Peter Strömberg, http://robowiki.net/?PEZ public class DroidPoet extends Robot implements Droid { public void run() { while (true) { ahead(1000); fire(getEnergy() > 3 ? 3 : 0); } } public void onHitWall(HitWallEvent e) { turnRight(90 - getHeading() % 90); turnGunRight(Math.toDegrees(Math.atan2(getBattleFieldWidth() / 2 - getX(), getBattleFieldHeight() / 2 - getY())) - getGunHeading()); } }
And any old versions goes here: /OldVersions