/// <summary> /// GetNext /// </summary> /// <returns></returns> private int GetNext() { int id = Poche.FirstOrDefault(); Poche.Remove(id); return(id); }
/// <summary> /// SetPoche /// </summary> private void SetPoche() { Random r = new Random(); if (Poche == null || !Poche.Any()) { Poche = new List <int>(); while (Poche.Count < 7) { int i = r.Next(0, 7); if (!Poche.Any(p => p.Equals(i))) { Poche.Add(i); } } } }