Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: What I am missing here

by heatblazer (Scribe)
on Mar 21, 2012 at 05:45 UTC ( #960723=note: print w/replies, xml ) Need Help??

in reply to Re: What I am missing here
in thread What I am missing here

Well, I may not agree here. "Buggy" if it messes some elements in the deck by either copy them in the swap process. However I`ve tested it, and it`s OK, yes I am missing the srand(seed) but my algorithm is working since it never goes out of range and in worst case it can just swap two similar elements like card2 with card2 but it`s no error at all and it`s quite possible in real life shuffle too.

The awkward moment you shuffle and you get 3 times the same cards to piss everybody out on the table... well it`s no algorithm for a lame shuffler, better never gave him/her to pass cards again!

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://960723]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2023-12-05 21:02 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (28 votes). Check out past polls.