There are possible head-to-head match ups in Hold 'em. Assuming I have an array with each card, how can I enumerate all these match ups?
For example, to enumerate all possible starting hands is:
for (int a = 0; a < 51; ++a) {
for (int b = a + 1; b < 52; ++b) {
println(cards[a] + "," + cards[b]);
}
}
I worked out can have all match ups twice with (get both As,Ah vs Kc,Kd and Kc,Kd vs As,Ah):
long total = 0;
for (int a = 0; a < 51; ++a) {
for (int b = a + 1; b < 52; ++b) {
for (int c = 0; c < 51; ++c) {
for (int d = c + 1; d < 52; ++d) {
total++;
}
}
}
}