Advertisement
horozov86

players_and_monsters_task_3

Jun 30th, 2023
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. class Hero:
  2.     def __init__(self, username, level)
  3.     self.username = username
  4.     self.level = level
  5.    
  6.     def __str__(self):
  7.         return f"{self.username} of type {self.__class__.__name__} has level {self.level}"
  8.    
  9. class Elf(Hero):
  10.     pass
  11.  
  12. class MuseElf(Elf):
  13.     pass
  14.  
  15. class Wizard(Hero):
  16.     pass
  17.  
  18. class DarkWizard(Wizard):
  19.     pass
  20.  
  21. class SoulMaster(DarkWizard):
  22.     pass
  23.  
  24. class Knight(Hero):
  25.     pass
  26.  
  27. class DarkKnight(Knight):
  28.     pass
  29.  
  30. class BladeKnight(DarkKnight):
  31.     pass
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement