Ejemplo n.º 1
0
 @Test
 public void testChief() {
   Chief jack = applicationContext.getBean(Chief.class);
   System.out.println(jack.getName());
   Fighter mike = applicationContext.getBean(Fighter.class);
   System.out.println(mike.getName());
 }
Ejemplo n.º 2
0
 public FighterManagerState(TeamManagingGameState tgs, Fighter f) {
   this.tgs = tgs;
   this.f = f;
   name = f.getName();
   traits[0] = "Remaining: " + f.getAvailiblePoints();
   traits[1] = "Health: " + String.valueOf(f.getMaxHealth()) + " >";
   traits[2] = "Attack: " + String.valueOf(f.getAttack()) + " >";
   traits[3] = "Magic: " + String.valueOf(f.getMagicPower()) + " >";
   traits[4] = "Speed:  " + String.valueOf(f.getSpeed()) + " >";
   for (int i = 0; i < abilities.length; i++) {
     if (f.getAbilities()[i] != null) {
       abilities[i] = f.getAbilities()[i].getName() + ": " + f.getAbilities()[i].getDescription();
     }
   }
   remainingPoints = f.getAvailiblePoints();
 }