I'm trying to pass a method to class Fighter. The method requires me to pass the instance of a the fighter class where I would normally just be able to use self. Is there any way to use self in a function that I'm passing to a class.
The constructor looks like this def melee_attack(fighter, target)
and I would rather it look like this def melee_attack(self, target):
so that when I call it I can just call fighter.attack(target)
instead of fighter.attack(fighter, target)