Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1.     public class Hero : Creature {
  2.  
  3.         private int foesDefeated;
  4.  
  5.         public Hero (string name, int combatPower, int weaponDamage, int maxHealth, int foesDefeated)
  6.             : base (name, combatPower, weaponDamage, maxHealth)
  7.         {
  8.             this.foesDefeated = 0;
  9.         }
  10.  
  11.         public void addDefeatedFoe ()
  12.         {
  13.             foesDefeated++;
  14.         }
  15.  
  16.         public int getFoesDefeated ()
  17.         {
  18.             return foesDefeated;
  19.         }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement