Skip to content

Commit 7bfbab0

Browse files
committed
Fix remove mark issue
1 parent 4a8d7f8 commit 7bfbab0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

battlecode25/engine/game/game.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ def mark_location(self, team: Team, loc: MapLocation, secondary: bool):
123123
markers = self.team_a_markers if team == Team.A else self.team_b_markers
124124
markers[loc.y * self.width + loc.x] = 2 if secondary else 1
125125

126+
def mark_location_int(self, team: Team, loc: MapLocation, val: int):
127+
markers = self.team_a_markers if team == Team.A else self.team_b_markers
128+
markers[loc.y * self.width + loc.x] = val
129+
126130
def get_num_towers(self, team: Team):
127131
return [robot.team == team and robot.type.is_tower_type() for robot in self.id_to_robot.values()].count(True)
128132

battlecode25/engine/game/robot_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def can_remove_mark(self, loc: MapLocation) -> bool:
525525

526526
def remove_mark(self, loc: MapLocation) -> None:
527527
self.assert_can_remove_mark(loc)
528-
self.game.mark_location(self.robot.team, loc, 0)
528+
self.game.mark_location_int(self.robot.team, loc, 0)
529529
self.game.game_fb.add_unmark_action(loc)
530530

531531
def assert_can_complete_tower_pattern(self, tower_type: UnitType, loc: MapLocation) -> None:

0 commit comments

Comments
 (0)