Skip to content

Commit

Permalink
Drop extraneous methods
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mao committed Jan 2, 2022
1 parent 8328d1d commit 4515250
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
14 changes: 0 additions & 14 deletions engine/src/main/battlecode/common/RobotType.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,6 @@ public enum RobotType {
*/
public final int bytecodeLimit;

/**
* @return the squared action radius
*/
public int getActionRadiusSquared(int level) {
return this.actionRadiusSquared;
}

/**
* @return the squared vision radius
*/
public int getVisionRadiusSquared(int level) {
return this.visionRadiusSquared;
}

/**
* Returns whether this type can build a robot of another given type.
*
Expand Down
2 changes: 1 addition & 1 deletion engine/src/main/battlecode/world/GameWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ public void setProfilerCollection(Team team, ProfilerCollection profilerCollecti
private MapLocation[] getSageActionLocations(InternalRobot robot) {
assert robot.getType() == RobotType.SAGE;
MapLocation center = robot.getLocation();
return getAllLocationsWithinRadiusSquared(center, robot.getType().getActionRadiusSquared(robot.getLevel()));
return getAllLocationsWithinRadiusSquared(center, robot.getType().actionRadiusSquared);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion engine/src/main/battlecode/world/MapBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public void assertIsValid() {
this.width,
this.height,
r.getLocation(),
r.getType().getVisionRadiusSquared(1)
r.getType().visionRadiusSquared
);

for (MapLocation location : visibleLocations)
Expand Down

0 comments on commit 4515250

Please sign in to comment.