Jump to content

Card shuffles: Difference between revisions

Line 1,142:
def iterations: 10;
 
"Starting deck:",
| "Starting deck:",
"Riffle shuffle with \(iterations) iterations:",
riffle(deck; "Riffle shuffle with \(iterations) iterations:",
"\nOverhand shuffle with \riffle(iterations) iterations:",
"Riffle\nOverhand shuffle with \(iterations) iterations:",
overhand(deck; iterations),
"\nStandard library shuffle with 1 iteration:",
(deck | knuthShuffle) # shuffles deck in place
knuthShuffle
</syntaxhighlight>
{{output}}
2,459

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.