Talk:Card shuffles

From Rosetta Code
Revision as of 16:40, 28 April 2015 by rosettacode>Mwn3d (Algorithm defs for the ones I did so we can maybe pick one?)

Task needs more definition so we can know whether an implementation is suitable or not. --Rdm (talk) 04:31, 28 April 2015 (UTC)

It's a draft so OK. What do you want to see? --Mwn3d (talk) 16:21, 28 April 2015 (UTC)
+1 to Rdm. It Could do with the algorithm being on the page. Remember we want to be able to compare language examples which can be better done if the algorithm is shown, and maybe restricted to just the one method? --Paddy3118 (talk) 16:24, 28 April 2015 (UTC)
So the two I did in Java are the riffle and the overhand. I can explain them both on the page but if you think it'd be better to just require one and leave the rest for bonus then I'll explain them both here to make it easier to decide. The riffle is where you cut the deck in half and "flip" the two halves together in an alternating fashion (sort of like the merge in a merge sort). The "human imperfections" that I thought of with this are an imperfect initial cut and accidentally "flipping" more than one card from one half at a time. The overhand is where you hold the deck in one hand and cut part of the deck (I guessed around 20%) from the top of the deck and move it to your other hand (the top of the pile in that hand if there are already cards there). Repeat until the whole deck has been moved to the other hand. The "human imperfections" I thought of for that one are randomly varying cut sizes and occasionally choosing to add the next cut to the bottom of the deck in the "other hand". Does either one of those sound like a better main method to implement? --Mwn3d (talk) 16:40, 28 April 2015 (UTC)