The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Card Shuffling

Posted by Matt Gerrans on December 11, 2001 at 6:19 PM


> Can any body tell me how to write a small program to shuffle and cut 52 cards in a GUI window?

Could you be more specific? Do you actually want to show the animation of the cards being shuffled? Are you looking for a simple shuffling algorithm (this was discussed a few months back, here, so try the search at the top of the forum)? Do you want it to work with any number of cards or just 52? Do you really need to cut, or just shuffle (a cut algorithm would be pretty trivial in any case)?

If this for your solitaire project, you are probably attending the same university as Hiran in Canada; he's a pretty smart guy so maybe you can get him to help you out on the project...

- mfg




Replies:
  • hey Chin Loong December 12, 2001 at 8:45 AM (1)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us