Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove specific cards from a deck #110

Open
ErickSenaGodinho opened this issue Jan 12, 2022 · 1 comment
Open

Remove specific cards from a deck #110

ErickSenaGodinho opened this issue Jan 12, 2022 · 1 comment

Comments

@ErickSenaGodinho
Copy link

Hi, I'm using your API and loving it.

How can I remove specific cards from a deck? I found a way to do this using partial deck, but if I have to remove a small number of cards, the code gets too big.

For example, if I need a deck without the 8, 9, and 10 cards, the code currently looks like this:
http://deckofcardsapi.com/api/deck/new/shuffle/cards=AS,2S,3S,4S,5S,6S,7S,JS,QS,KS,AD,2D,3D,4D,5D,6D,7D,JD,QD,KD,AC,2C,3C,4C,5C,6C,7C,JC,QC,KC,AH,2H,3H,4H,5H,6H,7H,JH,QH,KH

But if there was a way to remove the cards, it would be more friendly, like this:
http://deckofcardsapi.com/api/deck/new/shuffle/remove_cards=8S,9S,0S,8D,9D,0D,8C,9C,0C,8H,9H,0H

Thank you.

@ErickSenaGodinho
Copy link
Author

I was looking at dgarciah98's pull request and it seems that solves this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant