示例#1
0
        internal bool IsCountryOwnsControlPacket()
        {
            Value ownedByAnyCountry = new Value(0f);
            Value total             = new Value(0f);

            foreach (var item in GetAll())
            {
                var value = item.Value.GetShare();
                if (item.Key is Country)
                {
                    ownedByAnyCountry.Add(value);
                }
                total.Add(value);
            }

            var res = new Procent(ownedByAnyCountry, total, false); // to avoid console spam with ghost factories

            if (res.isBiggerOrEqual(Procent._50Procent))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }