I just started using Godot, and I am attempting to build a Yahtzee type-type game on my own. I created a function to evaluate the dice/roll and have it working correctly, I believe. I was hoping to get some more experienced eyes to look over my solution and provide some helpful feedback/criticism.
Instead of storing each die as an individual value, my first instinct was to group values, kind of tallying the total of each side rolled. I'm mainly curious if this is efficient enough and if someone can spot andan edge case. But I'm also interested in improving it, so anything helpful is appreciated.
Edit: Noticed
I noticed this as well.: When I duplicate the array in the chunk, I evaluating for "Pairs" and remove at that index. Using .Find(2).Find(2)
instead of .Any().Any()
in the following Ifif statement will return true in cases where it shouldn't (only 1 pair). I Lookedlooked at both functions in the class definition, and I am still confused about why that actsthey act like it doesthey do. Maybe someone can explain?