Looking for the formula to recursively check for combinations of a mastermind program.
Example:
6 colors
4 peg slots
Guess 1: 0 1 2 3 | No correct slots, 2 correct colors
Guess 2: 2 2 4 1 | No correct slots, 2 correct colors
Guess 3: 4 3 3 2 | 1 correct slot, 1 correct color
Guess 4: 1 3 5 4 | 1 correct slot, 3 correct colors
The answer to this should be 1 possible combination with the partially played game.
Thanks
Example:
6 colors
4 peg slots
Guess 1: 0 1 2 3 | No correct slots, 2 correct colors
Guess 2: 2 2 4 1 | No correct slots, 2 correct colors
Guess 3: 4 3 3 2 | 1 correct slot, 1 correct color
Guess 4: 1 3 5 4 | 1 correct slot, 3 correct colors
The answer to this should be 1 possible combination with the partially played game.
Thanks


