Deck of Cards Question...

new topic     » topic index » view thread      » older message » newer message

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.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu