DEV Community

Himanshu Bhatnagar
Himanshu Bhatnagar

Posted on

BLACK-JACK with Python

Hey guys... Recently I learned about Object-oriented Programming (with python) and It was really cool experience, so I put all that I learned from OOP's theories and Classes and objects into a project of card game (named BlackJack)...
So here's the link of my project - https://github.com/Himan10/Black-Jack

Hope you like it... also project is still in progress,
So if you have any suggestions or issues then please let me know
Thankyou.

Top comments (4)

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

I recommend setting up a proper project structure, instead of the one-file approach which tends to get cluttered and hard to maintain. Then, organize your classes and functions into modules (files) and subpackages based on functionality.

Collapse
 
himan10 profile image
Himanshu Bhatnagar

Thanks for the suggestion, Yeah that's right, handling one-file approach for large piece of code looks hard to maintain. And sometimes hard to debug. Also, I checked yesterday Pylint gives some warnings about " Too many statements (51/50) (too-many-statements)" this seems I've written something more than 50lines in a function. well, that needs to be split...
Anyway thanks again and Happy new year.

Collapse
 
iceorfiresite profile image
Ice or Fire

You shouldn't use variable names like "a" because they aren't descriptive and they aren't pythonic. It's a good start in OOP. Keep at it!

Collapse
 
himan10 profile image
Himanshu Bhatnagar

Thanks for the suggestion man, yeah I checked with pylint too it showed me the same warning which you mentioned above.
I edited my code and changed every variable which looks like "a" or "b" to snake_case.