Ejemplo n.º 1
0
        string GetNamePart(RaceId race, int index)
        {
            var path      = $"country_{race}_{index}";
            var nameParts = Content.ResourceManager.GetString(path).Split(";");

            return(RandUtils.GetItem(nameParts));
        }
Ejemplo n.º 2
0
        ConsoleColor GetNewCountryColor(ICollection <ConsoleColor> exceptions)
        {
            var values = new List <ConsoleColor>((ConsoleColor[])Enum.GetValues(typeof(ConsoleColor)));

            values.Remove(ConsoleColor.Black);
            values.Remove(ConsoleColor.White);
            values.Remove(ConsoleColor.Green);
            foreach (var exc in exceptions)
            {
                if (values.Count > 0)
                {
                    values.Remove(exc);
                }
            }
            return(RandUtils.GetItem(values));
        }