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

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