Quote:
Originally Posted by pkdk
Ok, then please convince me otherwise. If you have a shuffle server that ''spits'' out decks into a queue , how has this not unintentionally created an array of the queued decks?
Each value in the deck is an independent coding in a partition space?
Each value in each deck is independent and the deck is a self contained object.
The code to create a deck of cards shuffled would be along these lines:
public IEnumerator<int> GetShuffledDeck(){
int[52] cardList = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2 0,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36, 37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52);
int[52] shuffledDeck;
for(i=0;i<52;i++){
int nextCardIndex = SuperRandomNumberGenerator(52-i);
shuffledDeck[i] = cardList[i];
cardList.RemoveAtPosition(i);
}
return shuffledDeck.GetEnumerator();
}
The above pseudo code shows a very crude method of creating an array of 52 values that is completely isolated all by itself. A new empty array is also created. Based on the number of cards left, the super magic shuffler which uses all kinds of crazy logic to be 100% random (including current wind speed and velocity in a random airport picked differently each time) a NEW array is built until all 52 slots are filled. Each picked value is taken out of the source array as it's put into the target array.
An enumerator (that is - a device for going thru a list of elements) is created for that array and given back to the table which asked for a deck.
Next table coming along will create brand new arrays, using different memory spaces, allocated by the operating system, which has no link to the prior created arrays.
In short - it works exactly like having a crate of 1 billion decks of cards sitting behind the table. Each deal means you take a brand new deck with exactly 52 values that are uniquely owned by THAT DECK, shuffling them, giving you a unique instance of 52 randomly sorted values, and then dealing.
There is no interaction between the decks. There is no quantum interference. There is no magic array across the decks.
There is no need to pre-shuffle the decks - the deck is shuffled only upon request.