import pygame 

class obraz(pygame.sprite.Sprite): 
    def _init_(self,sciezka):
        super()._init_() 
        self.obraz = pygame.image.load(sciezka) 

class Element(): 
    def __init__(self, typ):
        self.wybrany = 0
        self.lista_obrazow = []

        for i in range(1, 4): 
            sciezka = f'images/{typ}{i}.png'
            wczytany_obraz = obraz(sciezka) 
            self.lista_obrazow.append(wczytany_obraz) 
    def wybierzNastepny(self): 
        self.wybrany += 1 
        if self.wybrany > 2: 
            self.wybrany = 0 

    def wybranyOBRAZ(self): 
        return self.lista_obrazow[self.wybrany].obraz 
       
class NakryciaGlowy(Element): 
    def _init_(self): 
        super()._init_('head')