Shuffling cards (proof of concept)

Discussion in 'Share Your Creations' started by LineCutter, Jul 27, 2007.

  1. LineCutter

    LineCutter Active Member Licensed User

    This cropped up in discussion a week or two ago, & I had some quiet time while I was on holiday.
    The code is really just a proof of concept, but should be worth a look if anyone is planning a card game.
    There are no docs!
    The 1-13 are the card values, with H/C/D/S appended to represent suit. Reset recreates an unshuffled deck. Sort... well it sorts the contents of the listbox. Shuffle shouldn't be a challenge!
    Filter is the slightly strange option (I need it for something else - not to do with cards). It takes the value of the NumUpDown control & uses that to remove that % of the cards, with positive values removing cards from the low half of the values & negative ones from the high end.
     

    Attached Files:

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice