def getEnergy(self):
    increment = 10
    maxEnergy = 100
    if ((self.energy <= (maxEnergy - increment)) and self.isAttack):
        self.energy += increment
        if (self.energy >= Character.maxEnergy):
            self.energy = Character.maxEnergy
def getEnergy(self):
    increment = 10
    maxEnergy = 100
    if ((self.energy <= (maxEnergy - increment)) and self.isAttack):
        self.energy += increment
        if (self.energy >= Character.maxEnergy):
            self.energy = Character.maxEnergy