crobertsbmw / deckofcards

An API to simulate a deck of cards
MIT License
1.34k stars 335 forks source link

Shuffle an Existing Deck #83

Open psibal opened 4 years ago

psibal commented 4 years ago

Is there a way to shuffle the existing deck with remaining cards?

crobertsbmw commented 4 years ago

What's the scenario you are trying to do? You can shuffle an existing deck, but it will shuffle all the cards.

On Thu, May 21, 2020 at 7:12 AM Pavan Sibal notifications@github.com wrote:

Is there a way to shuffle the existing deck with remaining cards?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/crobertsbmw/deckofcards/issues/83, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMQLHUFHYBXT5LZ3FKILBLRSUSFHANCNFSM4NG2QOLA .

psibal commented 4 years ago

I am building a game where I would need to shuffle only the remaining cards. Plus do you have image of back of a card. So a gamer can choose to keep his cards closed. They can choose to see or not.

Thanks

crobertsbmw commented 4 years ago

Can you shuffle the cards, deal out however many, then not shuffle the remaining, but because the cards were shuffled initially, they are still in a randomized order? Or is it the kind of thing where you open a new deck, and deal from the top without shuffling?

The images were stolen from here: https://commons.wikimedia.org/wiki/Category:SVG_playing_cards

There's a few different images that you can use for the back of the cards.

Best, Chase

On Sat, May 23, 2020 at 12:41 PM Pavan Sibal notifications@github.com wrote:

I am building a game where I would need to shuffle only the remaining cards. Plus do you have image of back of a card. So a gamer can choose to keep his cards closed. They can choose to see or not.

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/crobertsbmw/deckofcards/issues/83#issuecomment-633114644, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMQLHXALEAQJOFB3GDLMFLRTAKERANCNFSM4NG2QOLA .

psibal commented 4 years ago

Thanks so much.