Yahtzee banner

Yahtzee

9 devlogs
4h 35m 44s

A text-based game of Yahtzee written entirely in python. Contains 3 rounds, with the first being one round of rolling to attempt a Yahtzee. The second round contains 13 rounds of rolling, with standard rules. The third round consists of 5 rounds o…

A text-based game of Yahtzee written entirely in python. Contains 3 rounds, with the first being one round of rolling to attempt a Yahtzee. The second round contains 13 rounds of rolling, with standard rules. The third round consists of 5 rounds of rolling, where you can only get yahtzees.

This project uses AI

Used chatgpt to debug, as well as learn new commands on what to do in an array, such as sorting, counting the number of each value, excluding values when looking for 4 in a row.

Demo Repository

Loading README...

BlueCheckmate

Shipped this project!

Hours: 4.6
Cookies: 🍪 28
Multiplier: 6.14 cookies/hr

What a grind today, starting and finishing this project. I’m honestly happy with how it turned out, and how I learned new things such as arrays, sorting arrays, and creating a function that I can call upon a lot of times. happi If you’ve seen my last project (Roulette), that was a 3000 line abomination, while this one is under 700. Creating the definition of roll() definitely saved me over 1500 lines of codes, seeing as I would have to write it out 19 whole times wowsers. I would also like to stress another point of this project, which is that despite using A.I to learn some new things, this is NOT vibecoded, and not A.I slop. I know that some people will look at my declaration and flame me. I want to defend myself that I used A.I to learn. I could’ve just as easily and went on some website to learn what I wanted to do, but A.I was more convenient. I also know what the text actually means. It wasn’t just a straight copy+paste, I spend some time actually caring and figuring out what the commands meant, so that I can use them in the future. That being said, this is a nice little project, 4.5 hours isn’t that much, but it’s ok. I pray you guys give me good votes prayer. Last time I got average votes and got absolutely slammed with a diabolically low payot ms-sob, so hopefully this time it’s different. I have progressed in my coding skills, and at the end of the day, that’s what probably matters the most.

BlueCheckmate

Right, so flavourtown decided to go ghost on me and not publish my last devlog, which was completing all the other scoring for the second round. I realized this too late, and now this will be my last devlog, because I am done!!! yay2. I added the 3rd round of rolling, which is 5 attempts to get yahtzees, then I polished it up real quick, made it as easy of the eyes as can be (especially for a text based game). However, we are done with this, kinda surreal to have started this and finished this all in one day, would call it a successful day in my books.

Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
Attachment
0
BlueCheckmate

So now we got into stuff that’s new for me, which chatgpt helped me out. I needed to quickly check if there is a 3 of a kind, and doing every possible combination is not easy, so chatgpt led me through some new stuff that I now understand. And it work, so very nice.

Attachment
0
BlueCheckmate

So nice once you get the format for things in similarity, so its just a quick copy paste of code and a lil tweak, and we finished with scoring for the top bracket, also knows as the numbers, 1-6

Attachment
Attachment
Attachment
0
BlueCheckmate

So I started scoring, and adding score, and for now it was just for if you chose for ones. I realized that I would get a bug that if you didnt have any ones to score, and you declined the confirmation of recording 0 points, it would re-roll everything, so then I needed to create a loop in the code that would make sure that it would repeat the question without rerolling.

Attachment
Attachment
Attachment
0
BlueCheckmate

Added the first round, which is just one round of rolling to try and get a yahtzee, which I actually did! badparrot Anyways, I had some issues with unresolved references, in which I had no clue what was going on, so I went to ChatGPT to help me figure it out and basically I needed to return the values from the def roll(), and also save them as variables outside of the def roll(), so I learned something new today! big-brain

Attachment
0
BlueCheckmate

Added the intro and rules

Attachment
0
BlueCheckmate

Added roll #3, and now that function if fully defined, and we can start creating the actual game yay2

Attachment
0
BlueCheckmate

Created the roll #2 code, which is still in the same definition, which is roll.. I wanted each roll to be a separate function, but then it gave me errors that I didn’t know how to overcome so I just decided to bunch all 3 rolls within one function, called, you guessed it, roll.

Attachment
0
BlueCheckmate

And with 5 days left in flavourtown, we start a project. This is a simple yahtzee game, and I’m hoping it will be quick as I won’t have to write as much since this time I’m writing functions I will continuously call upon. Right now, I created the function for roll 1. Had some issues with it in terms of that it would exit when it wasnt supposed to, but then I added a few loops and all is good now thumbs-up.

Attachment
0