周浩 解决部分质量分析中严重问题
This commit is contained in:
parent
2e7d5f9fdb
commit
d5c0f102d7
|
@ -103,38 +103,38 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
*
|
||||
* @see #fieldWidth
|
||||
*/
|
||||
public int fieldWidth;
|
||||
public static final int fieldWidth;
|
||||
|
||||
/**
|
||||
* Contains the height of the battlefield.
|
||||
*
|
||||
* @see #fieldWidth
|
||||
*/
|
||||
public int fieldHeight;
|
||||
public static final int fieldHeight;
|
||||
|
||||
/**
|
||||
* Current number of other robots on the battle field.
|
||||
*/
|
||||
public int others;
|
||||
public static final int others;
|
||||
|
||||
/**
|
||||
* Current energy of this robot, where 100 means full energy and 0 means no energy (dead).
|
||||
*/
|
||||
public int energy;
|
||||
public static final int energy;
|
||||
|
||||
/**
|
||||
* Current horizontal location of this robot (in pixels).
|
||||
*
|
||||
* @see #robotY
|
||||
*/
|
||||
public int robotX;
|
||||
public static final int robotX;
|
||||
|
||||
/**
|
||||
* Current vertical location of this robot (in pixels).
|
||||
*
|
||||
* @see #robotX
|
||||
*/
|
||||
public int robotY;
|
||||
public static final int robotY;
|
||||
|
||||
/**
|
||||
* Current heading angle of this robot (in degrees).
|
||||
|
@ -147,7 +147,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #turnBackLeft(int, int)
|
||||
* @see #turnBackRight(int, int)
|
||||
*/
|
||||
public int heading;
|
||||
public static final int heading;
|
||||
|
||||
/**
|
||||
* Current gun heading angle of this robot (in degrees).
|
||||
|
@ -158,7 +158,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #turnGunTo(int)
|
||||
* @see #bearGunTo(int)
|
||||
*/
|
||||
public int gunHeading;
|
||||
public static final int gunHeading;
|
||||
|
||||
/**
|
||||
* Current gun heading angle of this robot compared to its body (in degrees).
|
||||
|
@ -169,7 +169,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #turnGunTo(int)
|
||||
* @see #bearGunTo(int)
|
||||
*/
|
||||
public int gunBearing;
|
||||
public static final int gunBearing;
|
||||
|
||||
/**
|
||||
* Flag specifying if the gun is ready to fire, i.e. gun heat <= 0.
|
||||
|
@ -179,7 +179,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #fire()
|
||||
* @see #fire(double)
|
||||
*/
|
||||
public boolean gunReady;
|
||||
public static final boolean gunReady;
|
||||
|
||||
/**
|
||||
* Current distance to the scanned nearest other robot (in pixels).
|
||||
|
@ -193,7 +193,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #scannedVelocity
|
||||
* @see #scannedHeading
|
||||
*/
|
||||
public int scannedDistance = -1;
|
||||
public static final int scannedDistance = -1;
|
||||
|
||||
/**
|
||||
* Current angle to the scanned nearest other robot (in degrees).
|
||||
|
@ -207,7 +207,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #scannedVelocity
|
||||
* @see #scannedHeading
|
||||
*/
|
||||
public int scannedAngle = -1;
|
||||
public static final int scannedAngle = -1;
|
||||
|
||||
/**
|
||||
* Current angle to the scanned nearest other robot (in degrees) compared to
|
||||
|
@ -222,7 +222,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #scannedVelocity
|
||||
* @see #scannedHeading
|
||||
*/
|
||||
public int scannedBearing = -1;
|
||||
public static final int scannedBearing = -1;
|
||||
|
||||
/**
|
||||
* Current velocity of the scanned nearest other robot.
|
||||
|
@ -239,7 +239,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #scannedEnergy
|
||||
* @see #scannedHeading
|
||||
*/
|
||||
public int scannedVelocity = -99;
|
||||
public static final int scannedVelocity = -99;
|
||||
|
||||
/**
|
||||
* Current heading of the scanned nearest other robot (in degrees).
|
||||
|
@ -253,7 +253,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #scannedEnergy
|
||||
* @see #scannedVelocity
|
||||
*/
|
||||
public int scannedHeading = -1;
|
||||
public static final int scannedHeading = -1;
|
||||
|
||||
/**
|
||||
* Current energy of scanned nearest other robot.
|
||||
|
@ -266,7 +266,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #scannedBearing
|
||||
* @see #scannedVelocity
|
||||
*/
|
||||
public int scannedEnergy = -1;
|
||||
public static final int scannedEnergy = -1;
|
||||
|
||||
/**
|
||||
* Latest angle from where this robot was hit by a bullet (in degrees).
|
||||
|
@ -276,7 +276,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #onHitByBullet()
|
||||
* @see #hitByBulletBearing
|
||||
*/
|
||||
public int hitByBulletAngle = -1;
|
||||
public static final int hitByBulletAngle = -1;
|
||||
|
||||
/**
|
||||
* Latest angle from where this robot was hit by a bullet (in degrees)
|
||||
|
@ -287,7 +287,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #onHitByBullet()
|
||||
* @see #hitByBulletAngle
|
||||
*/
|
||||
public int hitByBulletBearing = -1;
|
||||
public static final int hitByBulletBearing = -1;
|
||||
|
||||
/**
|
||||
* Latest angle where this robot has hit another robot (in degrees).
|
||||
|
@ -297,7 +297,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #onHitRobot()
|
||||
* @see #hitRobotBearing
|
||||
*/
|
||||
public int hitRobotAngle = -1;
|
||||
public static final int hitRobotAngle = -1;
|
||||
|
||||
/**
|
||||
* Latest angle where this robot has hit another robot (in degrees)
|
||||
|
@ -308,7 +308,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #onHitRobot()
|
||||
* @see #hitRobotAngle
|
||||
*/
|
||||
public int hitRobotBearing = -1;
|
||||
public static final int hitRobotBearing = -1;
|
||||
|
||||
/**
|
||||
* Latest angle where this robot has hit a wall (in degrees).
|
||||
|
@ -318,7 +318,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #onHitWall()
|
||||
* @see #hitWallBearing
|
||||
*/
|
||||
public int hitWallAngle = -1;
|
||||
public static final int hitWallAngle = -1;
|
||||
|
||||
/**
|
||||
* Latest angle where this robot has hit a wall (in degrees)
|
||||
|
@ -329,7 +329,7 @@ public class JuniorRobot extends _RobotBase implements IJuniorRobot {
|
|||
* @see #onHitWall()
|
||||
* @see #hitWallAngle
|
||||
*/
|
||||
public int hitWallBearing = -1;
|
||||
public static final int hitWallBearing = -1;
|
||||
|
||||
/**
|
||||
* The robot event handler for this robot.
|
||||
|
|
Loading…
Reference in New Issue