Skip to content

MatteoKoch/Mastermind-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Mastermind-solver

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! ;)

About

This code finds a solution to any game of Mastermind

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages