Ejemplo n.º 1
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="stack">The unit stack to clone</param>
 public UnitStack(UnitStack stack)
 {
     _baseUnit              = new Unit(stack.GetBaseUnit());
     _provinceToRetreat     = stack.GetProvinceToRetreat();
     _hitPointsDistribution = new int[_baseUnit.GetUnitType().GetHitPoints()];
     for (int i = 0; i < _hitPointsDistribution.Length; i++)
     {
         _hitPointsDistribution[i] = stack._hitPointsDistribution[i];
     }
     _affectingSpells = new List <Spell>();
 }