Skip to content

Commit

Permalink
Remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrniket committed Apr 25, 2018
1 parent dd4b1cc commit 71bd043
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion aimmo-game/simulation/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 0 additions & 10 deletions aimmo-game/simulation/world_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -111,33 +109,28 @@ 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:
cell.avatar.score += 1
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
Expand All @@ -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
Expand All @@ -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']

Expand Down

0 comments on commit 71bd043

Please sign in to comment.