Skip to content

Commit 6552b2e

Browse files
committed
allow cat feed action to be processed with endTurn
1 parent 4f1965d commit 6552b2e

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,14 +1129,11 @@ public void processEndOfTurn() {
11291129
}
11301130

11311131
// cat algo
1132-
1133-
if (this.type == UnitType.CAT) {
1134-
if (this.sleepTimeRemaining > 0) {
1135-
this.gameWorld.getMatchMaker().addCatFeedAction(this.getID());
1136-
this.sleepTimeRemaining -= 1;
1137-
return;
1138-
}
1139-
1132+
if (this.type == UnitType.CAT && this.sleepTimeRemaining > 0){
1133+
this.gameWorld.getMatchMaker().addCatFeedAction(this.getID());
1134+
this.sleepTimeRemaining -= 1;
1135+
}
1136+
else if (this.type == UnitType.CAT) {
11401137
int[] pounceTraj = null;
11411138

11421139
switch (this.catState) {

0 commit comments

Comments
 (0)