Terminal Game Project: Noob Blackjack

There is still a lot more I want to do with this, but I’ve been on it for a while and want to move on to other stuff for now.

If anyone happens to check it out, let me know if you have any feedback or criticism!

Noob Blackjack!

Hey there,
I really enjoyed checking out your program. I too wrote a Blackjack game so I wanted to see how someone else’s stacked up. My only critique would be to make sure you describe what you are doing with some comments. I would just like to understand your code better because the sum_cards function does alot of things but it definitely feels inefficient. Overall, really great program and I hope to see more!

Hi there,
I was writing a blackjack game as well.
I had a hard time trying to figure out hot to use classes, and was strugling with it a lot.
So i ended up making a game without the use of classes.
So i was just curious to see how you have done it, and learn something to a future project. I think your code looks nice.

Hey thanks for the response! That is good feedback, and I know I definitely need to get in the habit of including more comments…as for the function I am SURE it’s inefficient…this was a struggle to get error free and I had some trouble handling the Aces so there is likely some repetition. My intention was to go back and clean this up once I get more proficient and learn more.

This comment has inspired me to bring this back up and work on it some more. I’ll be sure to reply here again once I update it. Thanks again!

Thanks for the reply! Classes can certainly be a little tough to wrap your head around, but once it clicks, they are super useful! I think the best example in the Blackjack game of this is the Deck class. If you look at how that works and try to imagine how doing some of those things (both creating the deck and some of the methods within) would be much more difficult if you coded it in as you went, it might help.

I recommend Corey Schafer on youtube, he has a ton of great Python content for beginners. Here’s a video on classes: Python OOP Tutorial 1: Classes and Instances - YouTube

Thanks for taking the time to look and reply!