I implemented my favorite card game, FreeCell, for Android. It was the natural thing to do since I feel that most existing implementations are incorrect or annoying. Most of the existing apps are packed with ads, implement the rules incorrectly, and perform annoying auto-moves that disrupt concentration. The features of my implementation are listed below:
The standard 52-card deck is shuffled using C++'s std::shuffle implementation, paired with the Xoofff generator. The generator is initialized with a random 256-bit key generated at application startup. Note that no proprietary seed value is used to index the deals due to the fact that such an identifier would be neither portable nor meaningful to other users. Instead of iterating through an arbitrary seed space, simply generate a uniformly random deal each time instead. Encountering a duplicate deal would require observing approximately
sqrt(52!) uniformly random deals. Even if you were able to play
216 = 65536 games per second, it would take approximately
271 years to encounter a duplicate shuffle. Additionally, I have implemented a deal encoding that allows importing/exporting an arbitrary deal. The identifier is universal and independent of the random number generator.