A text based game of Yahtzee, the dice game, written in Python
This game is a a little different than your standard game of yahtzee, which consists of 13 rounds of rolling. I have divided this game into 3 sections, so theres a higher chance of getting points.
Round 1: One round of rolling where the objective is to get a yahtzee - 50 points
Round 2: The standard 13 rounds of rolling where the standard points apply, which are as follows:
-Ones: However many dice show a 1, multiplied by 1
-Twos: However many dice show a 2, multiplied by 2
-Threes: However many dice show a 3, multiplied by 3
-Fours: However many dice show a 4, multiplied by 4
-Fives: However many dice show a 5, multiplied by 5
-Sixes: However many dice show a 6, multiplied by 6
-Three of a kind: If 3 of the dice are the same number, than the sum of the dice
-Four of a kind: If 4 of the dice are the same number, than the sum of the dice
-Small Straight: If 4 of the dice are sequential, worth 30 points
-Large Straight: If all 5 of the dice are sequential, worth 40 points
-Full House: If 3 of the dice are the same number, and the other 2 are both a separate number, worth 25 points
-Chance: The sum of all the dice
-Yahtzee: If all 5 of the dice are the same number, worth 50 points
Round 3: 5 rounds of rolling, with the objective of getting yahtzees
-1 Yahtzee: 50 points
-2 Yahtzees: 150 points
-3 Yahtzees: 300 points
-4 Yahtzees: 500 points
-5 Yahtzees: 750 points
Download the exe, then answer all yes or no questions exactly with a yes or a no. When asking about locking dice, those are yes or no questions, and you do have to re-lock dice you already locked in prior rounds. When asking about where you should be scored, type exactly as seen in the question.
In my opinion, I can see the progression in my coding skills. Unlike my last project, Roulette, there were not as many if statements, and basically a fifth of total code written. I started this with the solid idea of creating a roll function, and calling it every time a roll was needed. I could've written out the code for rolling 19 times today, but I have progressed to the point of no longer needing that. I have also learned to put things into an array, and sort that array, with some help from ChatGPT. That being said, there is still some repetitiveness in my code that I need to eradicate. Additionally, I am aware people want a UI. However, that will be for another day and another event. I'm proud of what I've done with this project, especially the fact that I did it all in one day, and I can sleep peacefully today.