Card shuffles: Difference between revisions

m
m (→‎{{header|Raku}}: Undo bizarre single space indent that somebody found necessary to do. Remove obsolete use v6.0;)
Line 120:
 
while (lp < cutPoint && rp < size) {
/* Allow for an imperfect riffling so that more than one card can come from the same side in a row
biasedcan towardscome from the same side within morea cards.row Removebiased towards the IF statement for perfect riffling. */side
with more cards. Remove the IF statement for perfect riffling.
*/
bound = (cutPoint - lp) * 50 / (size - rp);
if (random(0, 50) >= bound) {
Line 162 ⟶ 164:
}
 
/* add them to the cards in the other hand, sometimes to the fron sometimes to the back */
sometimes to the front sometimes to the back */
if (random(0, 10) >= 1) {
/* front most of the time */
Line 248 ⟶ 251:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
[20, 17, 18, 19, 14, 15, 16, 10, 11, 12, 13, 9, 8, 7, 5, 6, 1, 2, 3, 4]</pre>
 
=={{header|C sharp|C#}}==
{{trans|Java}}
1

edit