52 numbers are shuffled randomly. Once it is shuffled, that shuffled bunch of numbers are put on a list, then it is shuffled again. Then it checks if the previous bunch of numbers are the same as the new bunch of numbers.
There is a 1 in 52! chance, or 80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000 chance the same 2 shuffled bunch of numbers appears twice in a row.