public FleetDamages Add(FleetDamages value) { return(Parse(new[] { this.Ships[0] + value.Ships[0], this.Ships[1] + value.Ships[1], this.Ships[2] + value.Ships[2], this.Ships[3] + value.Ships[3], this.Ships[4] + value.Ships[4], this.Ships[5] + value.Ships[5], })); }
public FleetDamages Add(FleetDamages value) { return(Parse(new[] { this.Ship1 + value.Ship1, this.Ship2 + value.Ship2, this.Ship3 + value.Ship3, this.Ship4 + value.Ship4, this.Ship5 + value.Ship5, this.Ship6 + value.Ship6, })); }
public static FleetDamages ToFleetDamages(this IEnumerable <int> damages) { return(FleetDamages.Parse(damages)); }