Browse Source

ajout init

master
corentin.bollet 1 year ago
parent
commit
4d4e20a3f4
  1. 16
      main.py

16
main.py

@ -0,0 +1,16 @@
class Personnage:
def __init__(self, nom, cat):
self.nom = nom
self.pdv = 20
self.exp = 1
self.cat = cat
match self.cat:
case "guerrier":
self.inventaire = ["epee"]
case "magicien":
self.inventaire = ["baton"]
case "voleur":
self.inventaire = ["dague"]
case "elfe":
self.inventaire = ["arc"]
self.inventaire.append("potion")
Loading…
Cancel
Save