List<T> shuffle([Random? random]) { random ??= _r; List<T> list = []; while (isNotEmpty) { list.add(popRandom(random)); } return list; }