Map.__init__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
c 2
b 0
f 0
dl 0
loc 3
rs 10
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()])