diff --git a/main.py b/main.py index 1a96fb2..f2980f3 100644 --- a/main.py +++ b/main.py @@ -1,32 +1,17 @@ -class Personne: - def __init__(self, poids, taille, age): - self.poids = poids - self.age = age - self.taille = taille - def imc(self): - return self.poids / (self.taille / 100) ** 2 - def interpretation(self): - imc = self.imc() - if imc <= 18.5: - print("Insuffisance pondérale") - elif imc >= 30: - print("obésité") - - -class Eleve: - def __init__(self, nom, age, notes=[]): +class Personnage: + def __init__(self, nom, cat): self.nom = nom - self.age = age - self.notes = notes - - def _moyenne_(self): - try: - return sum(self.notes) / len(self.notes) - except (ZeroDivisionError): - return False - - def au_dessus(self, m_classe): - return self.moyenne() >= m_classe - + self.categories = { + "guerrier" : ["sword", "potion"], + "magicien" : ["stick", "potion"], + "thief" : ["dagger", "potion"], + "elfe" : ["bow", "potion"] + } + self.pdv = 20 + self.xp = 1 + self.cat = cat + self.inv = self.categories[self.cat] + def jet_attaque(self): + pass \ No newline at end of file