crobertsbmw / deckofcards

An API to simulate a deck of cards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shuffling existing deck loses jokers if not re-specified

AvianAnalyst opened this issue · comments

Hey! This is great and I plan on using this to implement a game my work place plays over lunch so we can keep going through this quarantine period.

I noticed if I create a deck including jokers for the game, I can use "https://deckofcardsapi.com/api/deck/new/shuffle/?deck_count=4&jokers_enabled=true" and so far that seems to work great. The documentation states I can do "https://deckofcardsapi.com/api/deck/9njxoqfbo6h4/shuffle/" and I don't have to worry about re-specifying how many decks. When I call that, I get 208 instead of 216 cards back, so it seems like it's losing the jokers. If I append "?jokers_enabled=true" then I get the full 216 back again, is this expected behavior, or a bug?

I'd be happy to work on this and submit a PR but I wanted to make sure this wasn't expected behavior before I started work.

Awesome! I'll start working on that tonight.

I just put in a PR for this. Let me know if I need to tweak anything.