Dec-11-2018, 02:38 PM
at least you can refactor the __init__ as
def __init__(self, classIndex): player_classes = {1:archerClass, 2:kingClass, 3:mageClass} player_class = playerClasses.get(classIndex) self.HitPoints = player_class.hP self.Dmg = player_class.Dmg self.BlockChance = player_class.bChance self.BlockAmount =player_class.DmgbPercent
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs