The Almighty Card Shuffling Algorithm
So this pops up from time to time, we spent a long time sorting out shuffle algorithms early on in the development process for Untap.in. The following is a basic explanation for whats happening when you shuffle your deck: We take the smallest number that doesn't divide into the amount of cards in a deck (IE 7 for a 60 card deck), and simulate a pile shuffle to break apart the cards from the initial deck order (starting from a pseudo random card). From there we have a new deck order, but it's not randomized (yet). This step might be redundant, but we do it since its a common shuffle for IRL play, and its handy to start in an order that isn't deck build order. Now, the actual shuffle algorithm.
Fisher Yates Shuffle
We use what is essentially known as the "knuth shuffle" or "fisher yates shuffle". More here:
https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
Now, how do we express that in code? The actual code that drives the shuffling on Untap.in is derived from an excellent article that visualizes shuffles using the knuth shuffle technique, see here: https://bost.ocks.org/mike/shuffle/
The only real modification we make is that we seed the knuth shuffle with a seed that we generate from the random.org API that generates true randoms numbers from atmospheric noise, see here: https://www.random.org/clients/http/
Every build we test the shuffle algorithm both known seed and simulate 50,000 shuffles and compare.
Hope that can ease your mind a little more on the topic.