Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public string InfectionUnitAmount()
 {
     return(UnitGroups.Where(c => !c.GameOver() && c.UnitType == UnitType.Infection).Sum(c => c.AmountUnits()).ToString());
 }
Ejemplo n.º 3
0
 public string ImmuneUnitsAmount()
 {
     return(UnitGroups.Where(c => !c.GameOver() && c.UnitType == UnitType.Immune_System).Sum(c => c.AmountUnits()).ToString());
 }