Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Refactoring and PEP8 fixes. #239

Merged
merged 3 commits into from
Sep 19, 2017

Conversation

OlafSzmidt
Copy link
Contributor

Some code PEP8 fixes as well as refactoring when I was reading the codebase trying to get hang of it ;)

@@ -36,6 +36,7 @@ def apply_fog_of_war(world_map, avatar_wrapper):


def should_partially_fog(no_fog_distance, partial_fog_distance, x_dist, y_dist):
# TODO: partial_fog_distance implemented in this method somehow.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we tend not to commit todo comments

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather we open an issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#240 opened.

@@ -61,15 +62,16 @@ def _register_action(self, avatar):
with state_provider as game_state:
avatar.action.register(game_state.world_map)

def _update_environment(self, game_state):
@staticmethod
def _update_environment(game_state):
num_avatars = len(game_state.avatar_manager.active_avatars)
game_state.world_map.reconstruct_interactive_state(num_avatars)

def _mark_complete(self):
pass
# TODO: Make completion request work. For now, we assume games don't finish.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#241 opened.

@OlafSzmidt
Copy link
Contributor Author

@CelineBoudier Do you want me to recommit the files without the comments, or leave them with the issues?

@CelineBoudier
Copy link
Contributor

@OlafSzmidt please recommit without the comments :) thanks

#from world_state import WorldState
#requests.post(self._completion_url, json=world_state.get_update())
# from world_state import WorldState
# requests.post(self._completion_url, json=world_state.get_update())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't commit commented code either :)

@@ -208,7 +209,7 @@ def _update_map(self, num_avatars):
self._add_pickups(num_avatars)

def _expand(self, num_avatars):
#LOGGER.info('Expanding map')
# LOGGER.info('Expanding map')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@CelineBoudier CelineBoudier merged commit f237f58 into ocadotechnology:master Sep 19, 2017
@OlafSzmidt OlafSzmidt deleted the refactor branch September 29, 2017 13:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants