class pc {public: void defend(int dmg) { ... if((health -= dmg) =< 0) { gameover(); } ... }protected: // same as private but you can inherit these (in public and protected inheritence) int strength; int helth; ...};
If you have a very good understanding of programming, this should be _very_ obvious.
"Paranoia is the belief in a hidden order behind the visible." - Anonymous