I am working on a simple video game program for school and I have created a method where the player gets 15 health points if that method is called. I have to keep the health at
private int health;
public void Heal()
{
if (health > 85)
health = 100;
else
health += 15;
}
public void Damage()
{
if (health < 15)
health = 0;
else
health -= 15;
}