Skip to content

Commit f97bcec

Browse files
committed
Removed debug print lines
1 parent 3b91986 commit f97bcec

File tree

5 files changed

+0
-46
lines changed

5 files changed

+0
-46
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ private static void initInitialBodiesFromSchemaBodyTable(InitialBodyTable bodyTa
421421
Team bodyTeam = TeamMapping.team(curSpawnAction.team());
422422

423423
if (bodyType == UnitType.CAT){ // TODO: this is a temporary fix
424-
System.out.println("DEBUGGING: " + "switching cat from team " + bodyTeam + " to " + Team.NEUTRAL);
425424
bodyTeam = Team.NEUTRAL;
426425
}
427426

@@ -433,7 +432,6 @@ private static void initInitialBodiesFromSchemaBodyTable(InitialBodyTable bodyTa
433432
RobotInfo carryingRobot = null;
434433
initialBodies.add(new RobotInfo(curId, bodyTeam, bodyType, bodyType.health, new MapLocation(bodyX, bodyY), dir, chirality, initialCheese, carryingRobot));
435434

436-
System.out.println("DEBUGGING: " + "Unit type " + bodyType + " on team " + bodyTeam + " at location " + bodyX + ", " + bodyY + " with initial angle " + dirOrdinal + " with chirality " + chirality);
437435
}
438436
}
439437

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ public void spawnCheese(CheeseMine mine) {
502502
&& !this.getWall(new MapLocation(pairedX, pairedY))) {
503503
ogSpawnLoc = new MapLocation(cheeseX, cheeseY);
504504
pairedSpawnLoc = new MapLocation(pairedX, pairedY);
505-
System.out.println("Found a good cheese loc! " + ogSpawnLoc);
506505
break;
507506
}
508507

@@ -1065,15 +1064,12 @@ public void updateCatHealth(int id, int newHealth) {
10651064
}
10661065

10671066
public void destroyRobot(int id, boolean fromException, boolean fromDamage) {
1068-
// System.out.println("A ROBOT DIED!!");
1069-
// System.out.println(id);
10701067
InternalRobot robot = objectInfo.getRobotByID(id);
10711068
if (robot == null) {
10721069
// robot was already killed
10731070
return;
10741071
}
10751072

1076-
// System.out.println(robot);
10771073
Team robotTeam = robot.getTeam();
10781074
MapLocation loc = robot.getLocation();
10791075

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,6 @@ public void throwRobot() {
730730
}
731731

732732
private void getThrown(Direction dir) {
733-
// System.out.println("Robot got thrown: " + this.ID + " " + dir);
734733

735734
this.grabbedByRobot = null;
736735
this.remainingCarriedDuration = 0;
@@ -915,7 +914,6 @@ public int[] canPounce(MapLocation loc) {
915914
// check passability of all landing tiles (and no cat)
916915
for (MapLocation tile : this.getAllPartLocations()) {
917916
MapLocation landingTile = tile.translate(dx, dy);
918-
System.out.println("tested tile " + landingTile.x + ", " + landingTile.y);
919917
if (!this.gameWorld.getGameMap().onTheMap(landingTile)) {
920918
// will pounce to a tile off map
921919
validLandingTiles = false;
@@ -934,7 +932,6 @@ public int[] canPounce(MapLocation loc) {
934932
}
935933
if (validLandingTiles) {
936934
int[] pounceTraj = { dx, dy };
937-
System.out.println("pounceTraj=" + pounceTraj[0] + ", " + pounceTraj[1]);
938935
return pounceTraj;
939936
}
940937

@@ -945,7 +942,6 @@ public int[] canPounce(MapLocation loc) {
945942
public void pounce(int[] delta) {
946943
int dx = delta[0];
947944
int dy = delta[1];
948-
System.out.println("POUNCING");
949945

950946
MapLocation[] oldLocs = this.getAllPartLocations();
951947
for (MapLocation partLoc : oldLocs) {
@@ -1178,8 +1174,6 @@ public void processEndOfTurn() {
11781174

11791175
int[] pounceTraj = null;
11801176

1181-
// System.out.println("THIS IS ROUND " + this.gameWorld.getCurrentRound() + "
1182-
// and cat with ID " + this.ID + " is at location " + this.getLocation());
11831177
switch (this.catState) {
11841178
case EXPLORE:
11851179

@@ -1220,14 +1214,8 @@ public void processEndOfTurn() {
12201214
this.dir = this.location.directionTo(this.catTargetLoc);
12211215
}
12221216

1223-
System.out.println("IN EXPLORE MODE " + " Direction set to " + this.dir + " corner is " + getCatCornerByChirality() + " target is " + this.catTargetLoc);
1224-
System.out.println("HERE ARE MY WAYPOINTS: ");
1225-
for (MapLocation mp : this.catWaypoints){
1226-
System.out.println(mp);
1227-
}
12281217

12291218
if (this.controller.canMove(this.dir)) {
1230-
System.out.println("TRYING TO MOVE");
12311219
try {
12321220
this.controller.move(this.dir);
12331221
} catch (GameActionException e) {
@@ -1238,7 +1226,6 @@ public void processEndOfTurn() {
12381226
MapLocation nextLoc = partLoc.add(this.dir);
12391227

12401228
if (this.controller.canRemoveDirt(nextLoc)) {
1241-
System.out.println("stuck more here cuz of dirt " + this.gameWorld.currentRound);
12421229

12431230
try {
12441231
this.controller.removeDirt(nextLoc);
@@ -1256,10 +1243,6 @@ public void processEndOfTurn() {
12561243
continue;
12571244
}
12581245
}
1259-
else {
1260-
System.out.println("Cat " + this.ID + " is stuck on " + nextLoc + " cooldown "
1261-
+ this.getMovementCooldownTurns());
1262-
}
12631246
}
12641247

12651248
if (isStuck){
@@ -1276,7 +1259,6 @@ public void processEndOfTurn() {
12761259
break;
12771260

12781261
case CHASE:
1279-
System.out.println("CAT " + this.ID + "Entering Chase");
12801262

12811263
this.dir = this.gameWorld.getBfsDir(getCatCornerByChirality(), this.catTargetLoc, this.chirality);
12821264
if (this.dir == null){
@@ -1336,7 +1318,6 @@ else if (this.controller.canAttack(nextLoc)) {
13361318
break;
13371319

13381320
case SEARCH:
1339-
System.out.println("CAT " + this.ID + "Entering Search");
13401321

13411322
if (this.catTurns >= 4) {
13421323
this.catTurns = 0;
@@ -1368,10 +1349,7 @@ else if (this.controller.canAttack(nextLoc)) {
13681349
break;
13691350

13701351
case ATTACK:
1371-
System.out.println("CAT " + this.ID + "Entering Attack");
13721352

1373-
System.out.println(this.ID + " is at location " + this.getLocation() + " at start of round "
1374-
+ this.gameWorld.getCurrentRound());
13751353
// step 1: try to find the rat it was attacking, if cannot find it go back to
13761354
// explore
13771355
nearbyRobots = this.controller.senseNearbyRobots();
@@ -1464,8 +1442,6 @@ else if (this.controller.canAttack(nextLoc)) {
14641442
if (this.isCarryingRobot() && this.carryingRobot.getHealth() > 0)
14651443
this.gameWorld.getMatchMaker().endTurn(this.carryingRobot.ID, this.carryingRobot.health, this.carryingRobot.cheeseAmount, this.carryingRobot.movementCooldownTurns,
14661444
this.carryingRobot.actionCooldownTurns, this.carryingRobot.turningCooldownTurns, this.carryingRobot.bytecodesUsed, this.location, this.carryingRobot.dir, this.gameWorld.isCooperation);
1467-
if (this.isCarryingRobot() && this.carryingRobot.getHealth() <= 0)
1468-
System.out.println("THIS ROBOT IS ALREADY DEAD " + this.ID + ": " + this.health + ", " + this.carryingRobot.ID + ": " + this.carryingRobot.health);
14691445
this.roundsAlive++;
14701446
}
14711447

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ public void saveMap(String pathname) throws Exception {
193193
// validate
194194
LiveMap lm = this.build();
195195
lm.assertIsValid();
196-
System.out.println("Saving " + this.name + ".");
197196
GameMapIO.writeMap(lm, new File(pathname));
198197
}
199198

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ public void removeDirt(MapLocation loc) throws GameActionException {
414414
this.robot.addCheese(-1 * GameConstants.DIG_DIRT_CHEESE_COST);
415415

416416
this.robot.addActionCooldownTurns(GameConstants.DIG_COOLDOWN);
417-
System.out.println("DEBUGGING: " + "remove dirt at location" + loc);
418417
this.gameWorld.getMatchMaker().addRemoveDirtAction(loc);
419418
}
420419

@@ -732,13 +731,10 @@ private void assertCanMove(Direction d) throws GameActionException {
732731
for (int i = 0; i < newLocs.length; i++) {
733732

734733
newLocs[i] = curLocs[i].add(d);
735-
736-
// System.out.println("Moving " + d + " from " + curLocs[i] + " " + newLocs[i]);
737734
}
738735

739736
for (MapLocation loc : newLocs) {
740737
if (!onTheMap(loc)) {
741-
// System.out.println("DEBUGGING: " + loc + " not on map");
742738
throw new GameActionException(OUT_OF_RANGE,
743739
"Can only move to locations on the map; " + loc + " is not on the map. Currently at location "
744740
+ this.getLocation());
@@ -748,18 +744,8 @@ private void assertCanMove(Direction d) throws GameActionException {
748744
if ((occupyingRobot != null) && (occupyingRobot.getID() != this.robot.getID())) {
749745

750746
if (occupyingRobot.getType().isBabyRatType() && this.getType().isCatType()) {
751-
System.out.println("Cat killed a rat by stepping on it");
752747
} else {
753-
System.out.println("DEBUGGING: " + this.robot.getID() + " collision with robot of type "
754-
+ occupyingRobot.getType() + " with part locations at ");
755748
MapLocation[] partLocs = this.robot.getAllPartLocations();
756-
System.out.print("Part locations: [");
757-
for (int i = 0; i < partLocs.length; i++) {
758-
System.out.print("(" + partLocs[i].x + ", " + partLocs[i].y + ")");
759-
if (i < partLocs.length - 1)
760-
System.out.print(", ");
761-
}
762-
System.out.println("]");
763749
throw new GameActionException(CANT_MOVE_THERE,
764750
"Cannot move to an occupied location; " + loc + " is occupied by a different robot.");
765751
}
@@ -1085,7 +1071,6 @@ public void becomeRatKing() throws GameActionException {
10851071

10861072
robot.becomeRatKing(health);
10871073

1088-
// System.out.println("IM ALIVE (RATKING)");
10891074

10901075
for (Direction d : Direction.allDirections()) {
10911076
if (d != Direction.CENTER) {

0 commit comments

Comments
 (0)