Skip to content

Commit

Permalink
Remove irrelevant function, result of bad git history
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafSzmidt committed Jul 30, 2018
1 parent 694cc96 commit 2a549a9
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions aimmo/game_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,3 @@ def _add_game_port_to_game_base(game_id):

def _connection_on_k8s_mode(game_port):
return game_port == 0


def get_avatar_id_from_user_id(django_user_id, game_id):
"""
A helper function which will return an avatar ID that is assigned to a
particular django user owner in a game.
:param django_user_id: A django user ID taken from the request.
:param game_id: The game ID in which the avatar is being requested from.
:return: An integer containing the avatar_ID.
"""
game = get_object_or_404(Game, id=game_id)

if not game.can_user_play(django_user_id):
raise exceptions.UserCannotPlayGameException

avatar = game.avatar_set.get(owner=django_user_id)

return avatar.id

0 comments on commit 2a549a9

Please sign in to comment.