public static CardRank randomRank(Random rand) { CardRank[] values = CardRank.values(); return values[rand.nextInt(values.length)]; }