crobertsbmw / deckofcards

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

DRY, KISS, SOLID rules #45

Closed iwko closed 6 years ago

iwko commented 6 years ago

Hi!

I am fan of poker and I think your work is great. IMO we can do some work to improve this app. This app contains a lot of duplicated lines of code like https://github.com/crobertsbmw/deckofcards/blob/1531edec43642b7d1cbe1f8815725521d26aff45/deck/views.py#L57 if/else if/ combinations like https://github.com/crobertsbmw/deckofcards/blob/1531edec43642b7d1cbe1f8815725521d26aff45/deck/models.py#L64 or try / except blocks in not necessary places. What do You think about refactoring these methods? We can move duplicated code to separate methods, create new modules for helpers, move constants to separate file. I can do this job.

crobertsbmw commented 6 years ago

I would love to have the code cleaned up. I am totally open to pull requests and would love to see improvements.

iwko commented 6 years ago

@crobertsbmw

Cool! So I will do this. Pleae assign this to me.