Skip to content

Commit bc23d5d

Browse files
committed
fix ratking naming and examplefuncsplayer
1 parent 727da7e commit bc23d5d

6 files changed

Lines changed: 14 additions & 895 deletions

File tree

engine/src/main/battlecode/common/GameConstants.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ public class GameConstants {
8888
*/
8989
public static final double CHEESE_COOLDOWN_PENALTY = 0.01;
9090

91-
/** The amount of cheese the ratking consumes each round. */
92-
public static final int RATKING_CHEESE_CONSUMPTION = 3;
91+
/** The amount of cheese the rat king consumes each round. */
92+
public static final int RAT_KING_CHEESE_CONSUMPTION = 3;
9393

94-
/** The amount of health the ratking loses by not eating cheese. */
95-
public static final int RATKING_HEALTH_LOSS = 10;
94+
/** The amount of health the rat king loses by not eating cheese. */
95+
public static final int RAT_KING_HEALTH_LOSS = 10;
9696

9797
/** Probability parameter for cheese spawn at a mine. **/
9898
public static final float CHEESE_MINE_SPAWN_PROBABILITY = 0.01f;

engine/src/main/battlecode/world/InternalRobot.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,13 +1153,13 @@ public void processBeginningOfTurn() {
11531153
}
11541154

11551155
public void processEndOfTurn() {
1156-
// eat cheese if ratking
1156+
// eat cheese if rat king
11571157
if (this.type.isRatKingType() && this.gameWorld.getTeamInfo().getNumRatKings(this.getTeam()) > 0) {
1158-
// ratking starves
1159-
if (this.gameWorld.getTeamInfo().getCheese(team) < GameConstants.RATKING_CHEESE_CONSUMPTION) {
1160-
this.addHealth(-GameConstants.RATKING_HEALTH_LOSS);
1158+
// rat king starves
1159+
if (this.gameWorld.getTeamInfo().getCheese(team) < GameConstants.RAT_KING_CHEESE_CONSUMPTION) {
1160+
this.addHealth(-GameConstants.RAT_KING_HEALTH_LOSS);
11611161
} else {
1162-
this.addCheese(-GameConstants.RATKING_CHEESE_CONSUMPTION);
1162+
this.addCheese(-GameConstants.RAT_KING_CHEESE_CONSUMPTION);
11631163
}
11641164
}
11651165

0 commit comments

Comments
 (0)