Yahtzee, over the next two posts going to explain about the thoughts behind working out the categories within the game, e.g. yahtzee, straight etc. And then in the 3rd post I am going to do the extensions of the assignment.
So to start with here are the different types of categories that the 5 dice can fall into with also there score associated value. ( the number at the start is the category that the dice would fall into)
- 1. Ones. Any dice configuration is valid for this category. The score is equal to the sum of all of the 1
2 thoughts on “Yahtzee”
Is the bubble sort even necessary for checking this? I feel like just the checking (iono about score calculation) can be done with 2 for loops
I think from memory the reason why I used bubble sort was for the pass the new array to the other functions that will expect the array in order for them to figure out what type of category that I was dealing with, sure there is other ways of doing this, this was just the way that I picked :).