public void setFellow(Troop fellow) { myFellow = fellow; }
public void manageArrival(Troop troop) { underAttack = false; if (troop.getOwner() != type) { if (troop.getElements() > numTroops) { numTroops = troop.getElements() - numTroops; numTroops = Math.Min(numTroops, troopsCap); type = troop.getOwner(); loadImages(); } else { numTroops -= troop.getElements(); } } else { numTroops += troop.getElements(); numTroops = Math.Min(numTroops, troopsCap); } }