This code finds a solution to any game of Mastermind
Being fascinated by this game after playing this game as a child with my dad, I decided to write a program that solves any configuration. You enter a 4-digit number (canonly contain digits [1;8]) which represents the different colors used in the game. The program then solves the given configuration step-by-step (each step is outputted).
The layout of the output is: abcd: e,f
Where a,b,c and d are digits [1;8]. Each one represents a color. Where e and f are digits [0;4]. Each one represents a pin (e black, f white)
I based this algorithm on a video from the Youtube-channel "Numberphile".
Don't cheat! ;)