Created
September 26, 2010 01:20
-
-
Save mrkschan/597470 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onStatus(StatusEvent e) { | |
final RobotStatus s = e.getStatus(); | |
others = peer.getOthers(); | |
energy = Math.max(1, (int) (s.getEnergy() + 0.5)); | |
robotX = (int) (s.getX() + 0.5); | |
robotY = (int) (s.getY() + 0.5); | |
heading = (int) (s.getHeading() + 0.5); | |
gunHeading = (int) (s.getGunHeading() + 0.5); | |
gunBearing = (int) (Utils.normalRelativeAngle(s.getGunHeading() - s.getHeading()) + 0.5); | |
//~ heading = (int) (toDegrees(s.getHeading()) + 0.5); | |
//~ gunHeading = (int) (toDegrees(s.getGunHeading()) + 0.5); | |
//~ gunBearing = (int) (toDegrees(Utils.normalRelativeAngle(s.getGunHeading() - s.getHeading())) + 0.5); | |
gunReady = (s.getGunHeat() <= 0); | |
currentTurn = e.getTime(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment