So nobody has any idea how to settle ties between pairs which is going to be a problem. Not as bad as spouse beating but there are better forums for that, I hope.
There are probably better forums to explain why Fisher Yates is best shuffle algo, no one here is going to tolerate sitting through the math.
Pardon my Columbian but this is crap!
WTH? 2 loops structures yikesl What's wrong with keeping a card right where it is, on occasion? If you demand that it be moved you wreck the random distribution. You should allow a card not to be swapped or swapped with itself. It is explained in the Wiki article why, but like I said it's a mathematical argument that even Steve couldn't sit through, so what can I say. I go Columbian, sure!
There are probably better forums to explain why Fisher Yates is best shuffle algo, no one here is going to tolerate sitting through the math.
Pardon my Columbian but this is crap!
Code: (Select All)
for a=1 to 52
do
swop=int (rnd*52)+1
loop while swop=a
swap deck$(a),deck$(swop)
next
WTH? 2 loops structures yikesl What's wrong with keeping a card right where it is, on occasion? If you demand that it be moved you wreck the random distribution. You should allow a card not to be swapped or swapped with itself. It is explained in the Wiki article why, but like I said it's a mathematical argument that even Steve couldn't sit through, so what can I say. I go Columbian, sure!
b = b + ...