ok so here i got an error help please
So im in python's project called Shooting Game and my only error is that i cant undestand why my code instead of subtract a number of life and save it,just subtract it and then its like it erase the result,it would be easier to undestand if code it class Enemigo: nombre="" vidas=0 def __init__(self, nombre,vidas): self.nombre = nombre self.vidas = vidas def hit(self): self.vidas=self.vidas-1 if self.vidas<=0: print(self.nombre+" killed") else: print(self.nombre+" has "+ str(self.vidas)+" lives") class Monstruo(Enemigo): def __init__(self): super().__init__('Monster', 3) class Alien(Enemigo): def __init__(self): super().__init__('Alien', 5) while True: x = input() if x=='exit': break elif x=="gun": Monstruo().hit() elif x == 'laser': Alien().hit()