diff --git a/aimmo-game/simulation/action.py b/aimmo-game/simulation/action.py index 6a5b45854..e7b28f220 100644 --- a/aimmo-game/simulation/action.py +++ b/aimmo-game/simulation/action.py @@ -132,7 +132,6 @@ def _apply(self, world_map): # Move responsibility for this to avatar.die() ? respawn_location = world_map.get_random_spawn_location() attacked_avatar.die(respawn_location) - # TODO this logic shouldn't be here world_map.get_cell(self.target_location).avatar = None world_map.get_cell(respawn_location).avatar = attacked_avatar diff --git a/aimmo-game/simulation/world_map.py b/aimmo-game/simulation/world_map.py index 687fca995..710168e29 100644 --- a/aimmo-game/simulation/world_map.py +++ b/aimmo-game/simulation/world_map.py @@ -51,11 +51,9 @@ def generate_empty_map(cls, height, width, settings): def all_cells(self): return self.grid.values() - # TODO this is game logic def score_cells(self): return (c for c in self.all_cells() if c.generates_score) - # TODO this is game logic def pickup_cells(self): return (c for c in self.all_cells() if c.pickup) @@ -111,18 +109,15 @@ def update(self, num_avatars): self._update_avatars() self._update_map(num_avatars) - # TODO this is game logic def _update_avatars(self): self._apply_score() self._apply_pickups() - # TODO this is game logic def _apply_pickups(self): for cell in self.pickup_cells(): if cell.avatar is not None: cell.pickup.apply(cell.avatar) - # TODO this is game logic def _apply_score(self): for cell in self.score_cells(): try: @@ -130,14 +125,12 @@ def _apply_score(self): except AttributeError: pass - # TODO this is game logic def _update_map(self, num_avatars): context = MapContext(num_avatars=num_avatars) MapExpander().update(self, context=context) ScoreLocationUpdater().update(self, context=context) PickupUpdater().update(self, context=context) - # TODO this is game logic def can_move_to(self, target_location): if not self.is_on_map(target_location): return False @@ -147,7 +140,6 @@ def can_move_to(self, target_location): and (not cell.is_occupied or cell.avatar.is_moving) and len(cell.moves) <= 1) - # TODO this is game logic def attackable_avatar(self, target_location): """ Return a boolean if the avatar is attackable at the given location (or will be @@ -166,11 +158,9 @@ def attackable_avatar(self, target_location): return None - # TODO this is game logic def get_no_fog_distance(self): return self.settings['NO_FOG_OF_WAR_DISTANCE'] - # TODO this is game logic def get_partial_fog_distance(self): return self.settings['PARTIAL_FOG_OF_WAR_DISTANCE']