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); }
public void ClearDiscColors() { PlayerAndColor.Clear(); }