Skip to content

Commit 82f5ed3

Browse files
authored
Merge pull request #39 from stefangimmillaro/master
Alias getChips for getMoney
2 parents c82375c + b3c05d7 commit 82f5ed3

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ public interface RobotController {
123123
*/
124124
int getMoney();
125125

126+
/**
127+
* Alias for getMoney
128+
*
129+
* @return the amount of money this robot's team has
130+
*
131+
* @battlecode.doc.costlymethod
132+
*/
133+
int getChips();
134+
126135
/**
127136
* Returns what UnitType this robot is.
128137
*

engine/src/main/battlecode/instrumenter/bytecode/resources/MethodCosts.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ battlecode/common/RobotController/getAllLocationsWithinRadiusSquared 100 tru
4343
battlecode/common/RobotController/getHealth 1 true
4444
battlecode/common/RobotController/getID 1 true
4545
battlecode/common/RobotController/getPaint 1 true
46+
battlecode/common/RobotController/getChips 1 true
4647
battlecode/common/RobotController/getMoney 1 true
4748
battlecode/common/RobotController/getType 1 true
4849
battlecode/common/RobotController/getLocation 1 true

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ public int getMoney() {
151151
return this.gameWorld.getTeamInfo().getMoney(getTeam());
152152
}
153153

154+
@Override
155+
public int getChips() {
156+
return this.getMoney();
157+
}
158+
154159
@Override
155160
public UnitType getType(){
156161
return this.robot.getType();

0 commit comments

Comments
 (0)