Title: Re: best way to check for correct conditions
Post by: Pete on November 29, 2019, 04:01:16 am
Well late to the party, but I thought I'd have a go without looking at other responses. I wouldn't say this is clever, but it would be my practical approach to tackling this dice game analysis...
I hope it works. Too much lasagna today to do much more than SLEEP...
Hope everyone who celebrated Thanksgiving had a safe and happy one.
Pete
Edit: I tried Steve's. That IF Count(i) > 3 THEN Result = Result + 2 is a clever way of differentiating between pairs and kinds. Only problem is the SECOND FOR/NEXT count is off. It should be FOR i = 1 to 6, not 1 to 5. The 1 - 6 represents the possible numbers on each die. So as is, 1 to 5 will not analyze something like 6-6-2-6-1 as three of a kind, etc. Simple fix.