shuffle - pcaston2/tupo GitHub Wiki

#Shuffle

The shuffle occurs at the start of the game in order to randomize the deck, unless a strict order has been specified (It is possible to do a partial shuffle if required, for example for a vector). A map is initialized with the units field column index, and a random value from the randomizer. It is then sorted by the random value, with a bitonic sort or an odd-even sort if a partial shuffle is required. After the shuffle, usually the emulate draw re-sorts the units.

⚠️ **GitHub.com Fallback** ⚠️