prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Minimum Product: Irrelevant MapFeature enum elements and their uses
  Remove the irrelevant `MapFeature` elements in `world_state.py` and their uses throughout the codebase.
  
  </issue>
  <code>
  [start of aimmo-game/simulation/state/world_state.py]
  1 from enum import Enum
  2 from collections import defaultdict
  3 
  4 class MapFeature(Enum):
  5     HEALTH_POINT = 'health_point'
  6     SCORE_POINT = 'score_point'
  7     PICKUP = 'pickup'
  8     OBSTACLE = 'obstacle'
  9 
  10 class WorldState():
  11     """
  12     The world updates class serves as a buffer between the updates generated
  13     in different parts of the back-end and the data emitted by the socket.
  14 
  15     It contains all the parameters that need to be sent to the client every
  16     time the world is updated. These are:
  17         - Player (aka avatars) creation, deletion and update.
  18         - Changes in map features, i.e. creation and deletion of:
  19             * Health points.
  20             * Score points.
  21             * Pickups.
  22             * Obstacles.
  23     """
  24 
  25     def __init__(self, game_state):
  26         self.game_state = game_state
  27         self.players = defaultdict(dict)
  28         self.map_features = defaultdict(dict)
  29         self.clear_updates()
  30 
  31     def get_updates(self):
  32         self.refresh()
  33 
  34         updates = {
  35             'players'      : dict(self.players),
  36             'map_features' : dict(self.map_features)
  37         }
  38         self.clear_updates()
  39 
  40         return updates
  41 
  42     def clear_updates(self):
  43         self.players = {
  44             'update': [],
  45             'create': [],
  46             'delete': []
  47         }
  48         for map_feature in MapFeature:
  49             self.map_features[map_feature.value] = {
  50                 'create': [],
  51                 'delete': []
  52             }
  53 
  54     # Player updates.
  55     def create_player(self, player_data):
  56         # Player data: {id, x, y, rotation, health, score, appearance?}
  57         self.players["create"].append(player_data)
  58 
  59     def delete_player(self, player_id):
  60         # Player id: {id}
  61         self.players["delete"].append(player_id)
  62 
  63     def update_player(self, player_update):
  64         # Player_update: {id, x, y, rotation, health, score}
  65         self.players["update"].append(player_update)
  66 
  67     # Map features updates.
  68     def create_map_feature(self, map_feature, map_feature_data):
  69         self.map_features[map_feature]["create"].append(map_feature_data)
  70 
  71     def delete_map_feature(self, map_feature, map_feature_id):
  72         self.map_features[map_feature]["delete"].append(map_feature_id)
  73 
  74     # Refresh the world state. Basically gather information from the avatar manager
  75     # and the world map and organise it.
  76     def refresh(self):
  77         def player_dict(avatar):
  78             return {
  79                 'id'    : avatar.player_id,
  80                 'x'     : avatar.location.x,
  81                 'y'     : avatar.location.y,
  82                 'score' : avatar.score,
  83                 'health': avatar.health,
  84                 # This is temporary, appearance will be more complex later on.
  85                 'colour': "#%06x" % (avatar.player_id * 4999)
  86             }
  87 
  88         def map_feature_dict(map_feature):
  89             return {
  90                 'id' : str(hash(map_feature)),
  91                 'x'  : map_feature.location.x,
  92                 'y'  : map_feature.location.y
  93             }
  94 
  95         with self.game_state as game_state:
  96             # Update active avatars.
  97             for player in game_state.avatar_manager.avatars:
  98                 self.update_player(player_dict(player))
  99 
  100             main_avatar_id = 1
  101             avatar_view = game_state.avatar_manager.get_avatar(main_avatar_id).view
  102             if avatar_view is None:
  103                 return
  104 
  105             if avatar_view.is_empty:
  106                 avatar_view.reveal_all_cells(game_state.world_map)
  107                 avatar_view.is_empty = False
  108 
  109             # Creation.
  110             for cell in avatar_view.cells_to_reveal:
  111                 # There is an avatar.
  112                 if cell.avatar is not None:
  113                     self.create_player(player_dict(cell.avatar))
  114                 # Cell is an obstacle.
  115                 if not cell.habitable:
  116                     self.create_map_feature(MapFeature.OBSTACLE.value, map_feature_dict(cell))
  117                 # Cell is a score point.
  118                 if cell.generates_score:
  119                     self.create_map_feature(MapFeature.SCORE_POINT.value, map_feature_dict(cell))
  120 
  121             # Updates.
  122             for cell in avatar_view.cells_in_view:
  123                 if cell.add_to_scene is not None:
  124                     self.create_map_feature(cell.add_to_scene.value, map_feature_dict(cell))
  125                 if cell.remove_from_scene is not None:
  126                     self.delete_map_feature(cell.remove_from_scene.value, map_feature_dict(cell))
  127 
  128             # Deletion.
  129             for cell in avatar_view.cells_to_clear:
  130                 # There is an avatar.
  131                 if cell.avatar is not None:
  132                     self.delete_player(player_dict(cell.avatar))
  133                 # Cell is an obstacle.
  134                 if not cell.habitable:
  135                     self.delete_map_feature(MapFeature.OBSTACLE.value, map_feature_dict(cell))
  136                 # Cell is a score point.
  137                 if cell.generates_score:
  138                     self.delete_map_feature(MapFeature.SCORE_POINT.value, map_feature_dict(cell))
  139
  [end of aimmo-game/simulation/state/world_state.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/aimmo-game/simulation/state/world_state.py b/aimmo-game/simulation/state/world_state.py
  --- a/aimmo-game/simulation/state/world_state.py
  +++ b/aimmo-game/simulation/state/world_state.py
  @@ -1,12 +1,12 @@
   from enum import Enum
   from collections import defaultdict
   
  +
   class MapFeature(Enum):
  -    HEALTH_POINT = 'health_point'
  -    SCORE_POINT = 'score_point'
       PICKUP = 'pickup'
       OBSTACLE = 'obstacle'
   
  +
   class WorldState():
       """
       The world updates class serves as a buffer between the updates generated
  @@ -114,9 +114,6 @@
                   # Cell is an obstacle.
                   if not cell.habitable:
                       self.create_map_feature(MapFeature.OBSTACLE.value, map_feature_dict(cell))
  -                # Cell is a score point.
  -                if cell.generates_score:
  -                    self.create_map_feature(MapFeature.SCORE_POINT.value, map_feature_dict(cell))
   
               # Updates.
               for cell in avatar_view.cells_in_view:
  @@ -133,6 +130,3 @@
                   # Cell is an obstacle.
                   if not cell.habitable:
                       self.delete_map_feature(MapFeature.OBSTACLE.value, map_feature_dict(cell))
  -                # Cell is a score point.
  -                if cell.generates_score:
  -                    self.delete_map_feature(MapFeature.SCORE_POINT.value, map_feature_dict(cell))
  
verification_info: {"golden_diff": "diff --git a/aimmo-game/simulation/state/world_state.py b/aimmo-game/simulation/state/world_state.py\n--- a/aimmo-game/simulation/state/world_state.py\n+++ b/aimmo-game/simulation/state/world_state.py\n@@ -1,12 +1,12 @@\n from enum import Enum\n from collections import defaultdict\n \n+\n class MapFeature(Enum):\n-    HEALTH_POINT = 'health_point'\n-    SCORE_POINT = 'score_point'\n     PICKUP = 'pickup'\n     OBSTACLE = 'obstacle'\n \n+\n class WorldState():\n     \"\"\"\n     The world updates class serves as a buffer between the updates generated\n@@ -114,9 +114,6 @@\n                 # Cell is an obstacle.\n                 if not cell.habitable:\n                     self.create_map_feature(MapFeature.OBSTACLE.value, map_feature_dict(cell))\n-                # Cell is a score point.\n-                if cell.generates_score:\n-                    self.create_map_feature(MapFeature.SCORE_POINT.value, map_feature_dict(cell))\n \n             # Updates.\n             for cell in avatar_view.cells_in_view:\n@@ -133,6 +130,3 @@\n                 # Cell is an obstacle.\n                 if not cell.habitable:\n                     self.delete_map_feature(MapFeature.OBSTACLE.value, map_feature_dict(cell))\n-                # Cell is a score point.\n-                if cell.generates_score:\n-                    self.delete_map_feature(MapFeature.SCORE_POINT.value, map_feature_dict(cell))\n", "issue": "Minimum Product: Irrelevant MapFeature enum elements and their uses\nRemove the irrelevant `MapFeature` elements in `world_state.py` and their uses throughout the codebase.\n", "before_files": [{"content": "from enum import Enum\nfrom collections import defaultdict\n\nclass MapFeature(Enum):\n    HEALTH_POINT = 'health_point'\n    SCORE_POINT = 'score_point'\n    PICKUP = 'pickup'\n    OBSTACLE = 'obstacle'\n\nclass WorldState():\n    \"\"\"\n    The world updates class serves as a buffer between the updates generated\n    in different parts of the back-end and the data emitted by the socket.\n\n    It contains all the parameters that need to be sent to the client every\n    time the world is updated. These are:\n        - Player (aka avatars) creation, deletion and update.\n        - Changes in map features, i.e. creation and deletion of:\n            * Health points.\n            * Score points.\n            * Pickups.\n            * Obstacles.\n    \"\"\"\n\n    def __init__(self, game_state):\n        self.game_state = game_state\n        self.players = defaultdict(dict)\n        self.map_features = defaultdict(dict)\n        self.clear_updates()\n\n    def get_updates(self):\n        self.refresh()\n\n        updates = {\n            'players'      : dict(self.players),\n            'map_features' : dict(self.map_features)\n        }\n        self.clear_updates()\n\n        return updates\n\n    def clear_updates(self):\n        self.players = {\n            'update': [],\n            'create': [],\n            'delete': []\n        }\n        for map_feature in MapFeature:\n            self.map_features[map_feature.value] = {\n                'create': [],\n                'delete': []\n            }\n\n    # Player updates.\n    def create_player(self, player_data):\n        # Player data: {id, x, y, rotation, health, score, appearance?}\n        self.players[\"create\"].append(player_data)\n\n    def delete_player(self, player_id):\n        # Player id: {id}\n        self.players[\"delete\"].append(player_id)\n\n    def update_player(self, player_update):\n        # Player_update: {id, x, y, rotation, health, score}\n        self.players[\"update\"].append(player_update)\n\n    # Map features updates.\n    def create_map_feature(self, map_feature, map_feature_data):\n        self.map_features[map_feature][\"create\"].append(map_feature_data)\n\n    def delete_map_feature(self, map_feature, map_feature_id):\n        self.map_features[map_feature][\"delete\"].append(map_feature_id)\n\n    # Refresh the world state. Basically gather information from the avatar manager\n    # and the world map and organise it.\n    def refresh(self):\n        def player_dict(avatar):\n            return {\n                'id'    : avatar.player_id,\n                'x'     : avatar.location.x,\n                'y'     : avatar.location.y,\n                'score' : avatar.score,\n                'health': avatar.health,\n                # This is temporary, appearance will be more complex later on.\n                'colour': \"#%06x\" % (avatar.player_id * 4999)\n            }\n\n        def map_feature_dict(map_feature):\n            return {\n                'id' : str(hash(map_feature)),\n                'x'  : map_feature.location.x,\n                'y'  : map_feature.location.y\n            }\n\n        with self.game_state as game_state:\n            # Update active avatars.\n            for player in game_state.avatar_manager.avatars:\n                self.update_player(player_dict(player))\n\n            main_avatar_id = 1\n            avatar_view = game_state.avatar_manager.get_avatar(main_avatar_id).view\n            if avatar_view is None:\n                return\n\n            if avatar_view.is_empty:\n                avatar_view.reveal_all_cells(game_state.world_map)\n                avatar_view.is_empty = False\n\n            # Creation.\n            for cell in avatar_view.cells_to_reveal:\n                # There is an avatar.\n                if cell.avatar is not None:\n                    self.create_player(player_dict(cell.avatar))\n                # Cell is an obstacle.\n                if not cell.habitable:\n                    self.create_map_feature(MapFeature.OBSTACLE.value, map_feature_dict(cell))\n                # Cell is a score point.\n                if cell.generates_score:\n                    self.create_map_feature(MapFeature.SCORE_POINT.value, map_feature_dict(cell))\n\n            # Updates.\n            for cell in avatar_view.cells_in_view:\n                if cell.add_to_scene is not None:\n                    self.create_map_feature(cell.add_to_scene.value, map_feature_dict(cell))\n                if cell.remove_from_scene is not None:\n                    self.delete_map_feature(cell.remove_from_scene.value, map_feature_dict(cell))\n\n            # Deletion.\n            for cell in avatar_view.cells_to_clear:\n                # There is an avatar.\n                if cell.avatar is not None:\n                    self.delete_player(player_dict(cell.avatar))\n                # Cell is an obstacle.\n                if not cell.habitable:\n                    self.delete_map_feature(MapFeature.OBSTACLE.value, map_feature_dict(cell))\n                # Cell is a score point.\n                if cell.generates_score:\n                    self.delete_map_feature(MapFeature.SCORE_POINT.value, map_feature_dict(cell))\n", "path": "aimmo-game/simulation/state/world_state.py"}]}