def place_object(map, item, x, y): class_name = type(item).__name__ blocks = True if class_name == 'Creature' else False map_object = Object(item.character, blocks=blocks) map_object.set_position(x, y) map_object.add_component(item) map_object.level_map = map map.objects.append(map_object) return map_object