Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Deck shuffling puzzle: C# tester boilerplate
public static class Shuffle
{
static Random r = new Random();
public static void swap(ref int a, ref int b)
{
if (a != b)
{
a ^= b;
b ^= a;
a ^= b;
}
}
public static int rand(int min, int max)
{
return r.Next(min, max + 1);
}
public static void shuffle(int[] deck)
{
//your code here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.