Preventing health from underflowing using a new takeDamage function
Properly detecting that a player has died in the process of defending (using a new isDead function)
If the second point is undesirable then I can make a new PR that includes the fix for underflow but still makes the player effectively 'immortal' when defending, though I presume that behaviour would be undesirable.
Fixes #28.
This PR fixes the problem by:
takeDamage
functionisDead
function)If the second point is undesirable then I can make a new PR that includes the fix for underflow but still makes the player effectively 'immortal' when defending, though I presume that behaviour would be undesirable.