Difference between revisions of "RoboRumble Gun Challenge/RaikoNMT"
Jump to navigation
Jump to search
m (adding navbox) |
RednaxelaBot (talk | contribs) m (Using <syntaxhighlight>.) |
||
Line 12: | Line 12: | ||
http://www.robocoderepository.com/BotDetail.jsp?id=2310 | http://www.robocoderepository.com/BotDetail.jsp?id=2310 | ||
− | < | + | <syntaxhighlight> |
package wiki.rrgc; | package wiki.rrgc; | ||
import pez.rumble.pgun.*; | import pez.rumble.pgun.*; | ||
Line 47: | Line 47: | ||
} | } | ||
} | } | ||
− | </ | + | </syntaxhighlight> |
[[Category:Movement Implementations]] | [[Category:Movement Implementations]] |
Latest revision as of 09:30, 1 July 2010
- RoboRumble Gun Challenge Sub-pages:
- RoboRumble Gun Challenge - Results - RaikoNMT - Archived Talk 20090505
Raiko movement without the Musashi Trick applied. For use in the RR Gun Challenge.
Download BeeRRGC to get the source code and see it in use: http://www.robocoderepository.com/BotDetail.jsp?id=2310
package wiki.rrgc;
import pez.rumble.pgun.*;
import wiki.rmove.*;
import robocode.*;
import robocode.util.Utils;
import java.awt.Color;
// BeeRRGC - Bee gun by PEZ - Raiko Movement by Jamougha
// For the RoboRumble Gun Challenge - http://robowiki.net/?RRGunChallange
//
// Released under the RWPCL - RoboWiki Public Code Licence - http://robowiki.net/?RWPCL
public class BeeRRGC extends AdvancedRobot {
Bee gun;
RaikoNMT movement;
public void run() {
gun = new Bee(this);
movement = new RaikoNMT(this);
setColors(Color.magenta, Color.magenta, Color.magenta);
setAdjustGunForRobotTurn(true);
setAdjustRadarForGunTurn(true);
do {
turnRadarRightRadians(Double.POSITIVE_INFINITY);
} while (true);
}
public void onScannedRobot(ScannedRobotEvent e) {
gun.onScannedRobot(e);
movement.onScannedRobot(e);
setTurnRadarRightRadians(Utils.normalRelativeAngle(getHeadingRadians()
+ e.getBearingRadians() - getRadarHeadingRadians()) * 2);
}
}