public Unit SelectNextUnitGroup() { var ret = UnitGroups .Where(p => !p.HasMoved) .Where(p => p.IsAnyAlive) .Where(p => p.IsBattle) .OrderBy(p => p.Weight) .FirstOrDefault(); if (ret != null) { ret.HasMoved = true; } return(ret); }
public string InfectionUnitAmount() { return(UnitGroups.Where(c => !c.GameOver() && c.UnitType == UnitType.Infection).Sum(c => c.AmountUnits()).ToString()); }
public string ImmuneUnitsAmount() { return(UnitGroups.Where(c => !c.GameOver() && c.UnitType == UnitType.Immune_System).Sum(c => c.AmountUnits()).ToString()); }