Ejemplo n.º 1
0
 public void CreateHero(string newHero, string name, char[,] body)
 {
     switch (newHero.ToLower())
     {
         case "assassin": hero = new HeroAssassin(name, body);
             break;
         case "barbarian": hero = new HeroBarbarian(name, body);
             break;
         case "ranger": hero = new HeroRanger(name, body);
             break;
         default: throw new InvalidOperationException("Can't create a hero of unknown type!");
     }
 }
Ejemplo n.º 2
0
 public void Attack(Hero hero, Ennemy ennemy)
 {
 }
 //public void Attack(Hero hero, Ennemy ennemy)
 public void Attack(Hero hero, Unit ennemy)
 {
 }