Blackjack banner

Blackjack

10 devlogs
9h 49m 59s

Play a few games of Blackjack with fake money. Written in Python. All functions available, but you can only split once. Side bets are now included.

This project uses AI

I used A.I to create the code for saving the balance as a file, so you can leave the program, but still pick up where you left off. I also used A.I to debug the many flaws I had. For instance, I’d spot a bug in testing, ask where in my code the bug is, and some tips on how to fix it. I also just uploaded my entire code at times to see if there were any critical errors, which I then fixed. I mean the code is so poorly written I don’t even think and A.I could write it.

Demo Repository

Loading README...

BlueCheckmate

Shipped this project!

Hours: 9.83
Cookies: 🍪 25
Multiplier: 4.85 cookies/hr

Lowkey, this a pretty mid project if I do say so myself. The code isn’t written well, and it’s text based. I’m pretty new to coding, and suck at writing code. I probably have very shallow knowledge of python, and that’s the only language I know. However, I got this to work, and we leave it at that. I started this project very early in Flavourtown as something to do before I started my major project, which I shipped yesterday. Just thought I’d come back and finish what I started, get a few more cookies cus it couldn’t hurt. Hopefully you enjoy playing a few rounds of blackjack, and remember, the fact that it works is more important than how the code is written.

BlueCheckmate

It’s lowkey been a while since I’ve even glanced at this, but that’s because I was so focused with my other project that I shipped yesterday, and got a nice payout for. I decided to go back into my old project and finish what I started, side bets. After taking a few minutes to see what I was coding, I got back to work, and implemented the payouts for side bets, while making sure regular bets stay intact. I did this eventually, and I can’t even explain it in terms advanced people know because the way I structured this is terrible. But basically the function (a) that controls what exactly is happening right now had to be diverted to side bets before saving the new balance. After that, I spent a lot, and I mean A LOT of time debugging, because my coding sucks pf. After time, I got it to work at a 100% success rate for me at least, so I called it a day, and shipping this. Honestly, this project is quite mid so I aint expecting anything much out of this.

Attachment
0
BlueCheckmate

Started adding the structure for side bets. Created a list of possible side bets, and the factor of whether or not you can make the bet.

I need to add the payout function

Attachment
Attachment
Attachment
0
BlueCheckmate

Shipped this project!

Hours: 6.74
Cookies: 🍪 45
Multiplier: 6.62 cookies/hr

This is my first-ever project, and my first time actually coding. I created blackjack, because it was one of the first things that came into my head, and I thought it would be relatively easy to code, especially for a beginner like me. You can hit, stand, double down, and split, but only once. During this project, I learnt how to make a file, so the balance continuously updates. However, this code may not be the most stable thing ever, but it works (90% confident), and that’s what matters!

BlueCheckmate

Debugged splitting function:
-Made sure you can’t overspend on doubling down
-Correct payouts for split variations

Version 1 of Project is ready to be shipped

Attachment
Attachment
0
BlueCheckmate

Created the rules
Last thing before shipping: verify there are no bugs when splitting

Attachment
0
BlueCheckmate

Debugged the entire project:

  • The while statements only worked once, and were indented improperly, so they were all changed to if, and indented properly
    -Included a loop that lets the game run multiple times
    -Fixed numerous small bugs
    -Will check if splitting works properly
    -Will add rules, then ship it
    -Create side bets and reship
Attachment
0
BlueCheckmate

Created the comparison between dealers hand and both of your hands in split.
Will look at entire code, debug, then ship it.
After shipping, I will add side bets and re-ship it

Attachment
Attachment
Attachment
0
BlueCheckmate

Created the split function - only allows splitting on the original hand. Basically had to copy the same actions for a regular hand twice for each hand of split.
Still considering adding side bets, but will probably ship this when it’s ready and re-ship it when side bets are included.

Attachment
Attachment
Attachment
0
BlueCheckmate

Created the system that store balance and updates balance accordingly.
Still need to create a split option
Side bets will be added

Attachment
Attachment
0
BlueCheckmate

Created the dealer’s automatic hit or stand
Created the comparison between your hand and the dealer’s hand
Still need to add a split ability
Still need to work out how the balance will work.
Interested in adding side bets to make the game as realistic as possible.

Attachment
0
BlueCheckmate

Created the beginning variables, and the random number generator. Created the cycle for hitting, and created the end for when you bust.
Need to go back and add more variables, such as current balance and making sure you can’t bet more than you have, as well as adding a split option, but those are extras that will be added when the basic structure is done.

Attachment
Attachment
0