Skip to content

Instantly share code, notes, and snippets.

@hasyimibhar
Created April 25, 2013 04:26
Show Gist options
  • Save hasyimibhar/5457498 to your computer and use it in GitHub Desktop.
Save hasyimibhar/5457498 to your computer and use it in GitHub Desktop.
void take_damage(
const Enemy *enemy,
int damage) {
enemy->health -= damage;
if (enemy->health <= 0) {
// Do whatever a dead enemy should be doing
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment