Exemplo n.º 1
0
        public string GetDiscColor(char playerInitialLetter)
        {
            var    key = playerInitialLetter.ToString(CultureInfo.InvariantCulture);
            string color;

            PlayerAndColor.TryGetValue(key, out color);

            if (string.IsNullOrEmpty(color))
            {
                color = GetRandomRgbColor();
                PlayerAndColor.Add(key, color); //Will probably cause issues when running several threads, but ok for now.
            }

            return(color);
        }
Exemplo n.º 2
0
 public void ClearDiscColors()
 {
     PlayerAndColor.Clear();
 }