#ifndef _ENEMY_H_ #define _ENEMY_H_ #include "character.h" #include "hero.h" #include class Enemy : public Character { public: Enemy(); bool is_dead; void die(); }; Enemy enemy; void die() { if(enemy.is_dead) { hero.experience += enemy.experience; hero.money += enemy.money; hero.potion += enemy.potion; hero.full_potion += enemy.potion; hero.elixir += enemy.elixir; hero.full_elixir += enemy.full_elixir; hero.panacea += enemy.panacea; } } #endif