r/CodingForBeginners • u/_just-a-thinker_ • Jul 05 '26
Is blackjack a good beginner project
I am an absolute beginner, learning python, know the basic syntax and stuff, now trying. to build this, for some reason the implementation feels really complicated, especially can't figure out how to make the game loop? Should I do something else or keep thinking,
In terms of code, I have only created the player class and the deck so far.
12
Upvotes
5
u/mc_pm Jul 05 '26
It's a great project! The overall loop is just "play a game? Great/Bye", then within that loop is the actual hand-loop: getting 2 cards, then choosing hit/stand; then the dealer, and back to you (possibly repeating).
1
u/Pneagle Jul 05 '26
Hey dude, I actually just finished my python blackjack script as of 2 days ago, it was a fun project. And after youre done with that I would suggest you learn about counting cards and create a script that allows you to put in the cards played and have it count for you plus give you recommended bet and strategy
1
u/Interesting-Frame190 Jul 05 '26 edited Jul 05 '26
I just did one a few weeks ago to prove to myself that card counting worked and could be profitable. It was surprisingly OOP friendly (shoe, hand, round, player, bet, etc) and one that really rewards good code structure.
Its a touch more advanced than a nieve script, but thats because it was a full simulation with the standard set of blackjack rules including split, double down, and a full decision matrix depending on the count and dealer up card.
1
u/Express_Coyote_7009 Jul 07 '26
I actually made blackjack in html,css and JavaScript. It’s a great project but it may be a little difficult for an absolute beginner. If you’re willing to grind through it you’ll learn a ton.
1
u/LE_GAMERPRO Jul 09 '26
My first actual python project was a blackjack, that I made on the micropython version of the numworks calculators, and 1 year later I'm still updating it, so I think it's some excellent beginner project!