I am trying to calculate the various combinations that you could have. Matched, Not-Matched, Not-In. I had the function:
But when you pick say: Blue Blue Blue Blue, and Blue is only in the first match, the other 3 Blue's say that they are Not a match, but in the combo. This is confusing to people who do not expect that. So I tried to write another fucton for this and it was getting very long using if/else so I scrapped that idea.
int w = 0;
char x; //szMatch is users choice
char y; //total is computers choice
//Get an array of the colors to check each letter for a match
x[w]=szMatch.GetAt(w); //Sets x[w] with users choice colors
y[w]=total.GetAt(w); //Sets y[w] with computers choice colors
//reset w to zero so we can use it again
if(x[w]==y[w]) //We have a match
else if(x[w]==y||x[w]==y||x[w]==y||x[w]==y) //Not a match, but in the combo
else //Default, no match
Anyone have a better way to do this?