internal static IEnumerable<int> RandomValues (Random r, int max) { while (true) yield return r.Next (max); } #endregion