def show_hit_points(self, character):
        current_hp = character.hit_points
        max_hp = character.max_hp
        for count, label in enumerate(self.hp):
            if count >= max_hp // 4:
                label.setPixmap(self.surface_manager.get_icon('transparent'))
            elif count == current_hp // 4:
                if current_hp % 4 == 1:
                    label.setPixmap(self.surface_manager.get_icon('heart_red_1'))
                elif current_hp % 4 == 2:
                    label.setPixmap(self.surface_manager.get_icon('heart_red_2'))
                elif current_hp % 4 == 3:
                    label.setPixmap(self.surface_manager.get_icon('heart_red_3'))
                elif current_hp % 4 == 0:
                    label.setPixmap(self.surface_manager.get_icon('heart_red_0'))
            elif count < current_hp // 4:
                label.setPixmap(self.surface_manager.get_icon('heart_red_4'))
            else:
                label.setPixmap(self.surface_manager.get_icon('heart_red_0'))
Show hit points of given character
dataset/ETHPy150Open tuturto/pyherc/src/herculeum/ui/gui/widgets.py/HitPointsWidget.show_hit_points