Skip to content

Commit

Permalink
Fix maplocation equals
Browse files Browse the repository at this point in the history
  • Loading branch information
hstennes committed Jan 6, 2025
1 parent 56f43af commit 1237175
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion battlecode25/engine/game/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def connected_by_paint(self, robot_loc: MapLocation, tower_loc: MapLocation, tea
cardinal_directions = [Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST]
while queue:
loc = queue.pop(0)
if loc.equals(tower_loc):
if loc == tower_loc:
return True

if loc in visited or self.team_from_paint(self.paint[self.loc_to_index(loc)]) != team:
Expand Down

0 comments on commit 1237175

Please sign in to comment.