Exemple #1
0
        public FactionControl FindHighestControl()
        {
            if (factions == null)
            {
                factions = new List <FactionControl>();
            }
            FactionControl result = factions.OrderByDescending(x => x.control).First();

            return(result);
        }
Exemple #2
0
        public FactionControl FindFactionControlByFaction(string faction)
        {
            if (factions == null)
            {
                factions = new List <FactionControl>();
            }
            FactionControl result = factions.Find(x => x.Name == faction);

            if (result == null)
            {
                result         = new FactionControl();
                result.Name    = faction;
                result.control = 0;
                factions.Add(result);
            }
            return(result);
        }