public Badge(string title, string description, StarNumbers stars, bool earned, DateTime earneddatetime, string hexcolor, string icon, string iconfontfamily = "Segoe MDL2 Assets") { Title = title; Description = description; Stars = stars; Earned = earned; EarnedDateTime = earneddatetime; HexColor = hexcolor; Icon = icon; IconFontFamily = iconfontfamily; }
public void CalculateStarNumbers() { Random random = new Random(); int amountOfBaseNumbers = 2; int count = 0; while (count < amountOfBaseNumbers) { int number = random.Next(1, 12); if (!StarNumbers.Contains(number)) { StarNumbers.Add(number); count++; } } }