Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int i = (int)(Math.Random() * n); public static int randIndex(int size) { return (int)(Math.random() * limit); } static void shuffle(int[] deck) { for (int n=deck.length; n>1; --n) { int p = randIndex(n); int temp = deck[n-1]; deck[n-1] = deck[p]; deck[p] = temp; } } String[] faceNames = { "A", "K", "Q", "J", "10", ..., "2" };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement