Total Complexity | 4 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | class Map: |
||
2 | |||
3 | def __init__(self): |
||
4 | self._map = { |
||
5 | 'objects': {} |
||
6 | } |
||
7 | |||
8 | def get_object(self, object_id): |
||
9 | return self._map['objects'][object_id] |
||
10 | |||
11 | def add_object(self, obj): |
||
12 | self._map['objects'][obj.get_id()] = obj |
||
13 | |||
14 | def remove_object(self, obj): |
||
15 | del(self._map['objects'][obj.get_id()]) |