I'm new to this forum, so try to be easy on me. I don't have a background in programming so I'm not very familiar with advanced topics and/or lingo, but I'm sure you guys can explain it to me.
I am creating a dice game (yahtzee) for my current programming class, obviously from scratch, and I need help with tallying the scores for the end of the round. If you're familiar with yahtzee you know you can get 3 of a kind, 4 of a kind, full house, small straight and large straight. I've figured out how to tally the scores for the easier categories (ones, twos, etc.) but I have NO idea on how to tally the scores for the previously mentioned categories.
I'm confused on how to write the program to take some of the values and sum them up while omitting others. We have to display the dice for the user to see, and for example, if the outcome is 1, 2, 3, 4, and 6 and you want to place the values in the small straight category, I'm not sure how to tell the program to take the values 1-4 but keep the 6 out of the sum.
Also, the user will choose a character (A-L) corresponding to each category depending on which one they want to score their roll in. That's an easy scanf statement, but I have no clue how to determine from the random values, which ones would correspond to a full house or the 3 & 4 of a kind categories. I can't say if (dice1 == dice 2) and follow with an instruction because they are random values and will obviously change with each roll.
I hope this makes sense; if it doesn't I'll explain further.
Thanks in advance guys,