Deck of Cards Question...
- Posted by Ck Lester <cklester at YAHOO.COM> Nov 19, 2000
- 433 views
Guys 'n' gals, When "using a deck of cards," what's the best way to manipulate the deck? For instance, is it best to let the functions operate on a global deck? shuffle(deck) I would think not... Should the deck sequence be passed to the function, then have the function return the new deck? deck = shuffle(deck) I don't mind this approach. Should I go OOP? deck.shuffle Any hints, tips, suggestions are appreciated! -ck P.S. I've got all the functionality ready... the shuffle algorithm itself is written. I just need to know how to best implement it for maintenance. Speed issues are of no concern to me, as most processors these days can handle what I'm going to be dishing out.