How do I let enemies damage the player?
The Python course here has a "simple game" project at the end of object oriented programming. I decided to iterate on it further by adding more enemies as well as data for player character in a class called Player(GameObject). I figured out how to heal the player and allow us to hit ourselves. I need help writing code so that when "Hit" is used to attack the enemy, player also takes some damage. Player's health is stored self.health in Player(GameObject). How do I go about doing this? Also, I want to make it so that the program only runs while player's health is above zero. Thanks in advance!