crobertsbmw / deckofcards

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

piles -- "add" is really "create"? #30

Closed mansilladev closed 8 years ago

mansilladev commented 8 years ago

Lets say I've added 3 cards to a pile earlier, and now call /deck/{deckid}/pile/{pilename}/add again, but with a single freshly drawn card from the deck -- {pilename} really just gets overwritten with that single new card, correct?

crobertsbmw commented 8 years ago

I don't think so. If you call /add/ again, then it should just add to the pile, not overwrite it.

mansilladev commented 8 years ago

Hmm. Give it a whirl and let me see if you're experiencing the same thing. On a new deck, I discard a couple cards. Add a single one to new pile "foo" and there's one in the pile. Add another single one to pile, and there's just that one in the pile.

crobertsbmw commented 8 years ago

You're right. Good catch. Give me a few minutes and it'll be fixed.

crobertsbmw commented 8 years ago

Try it now. It should be fixed. Thanks for bringing this up. I'm surprised that no one has reported it until now.

mansilladev commented 8 years ago

Thanks Chase. I'm using DeckOfCards in a Skillshare course for API testing, so I'm diving in a bit deeper than most, most likely. :)

crobertsbmw commented 8 years ago

No, thank you. If you have a link or a write up or some way to share what you are using it for, I would love to feature it on the main page.

On Tue, Jan 26, 2016 at 2:37 PM, Neil Mansilla notifications@github.com wrote:

Thanks Chase. I'm using DeckOfCards in a Skillshare course for API testing, so I'm diving in a bit deeper than most, most likely. :)

— Reply to this email directly or view it on GitHub https://github.com/crobertsbmw/deckofcards/issues/30#issuecomment-175243033 .