Skip to content

pjor94/mastermind

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Javascript Mastermind solver. It exposes a function solve() that takes a code as an array of characters. For example, the code blue blue green red would be passed as ['b', 'b', 'g', 'r']. Rather than being returned, the answer and all logging information is printed to the console.

Available colors are blue, green, orange, purple, red, silver, and yellow, each represented in the code by its first letter.

Algorithm used comes straight from Donald Knuth.

Future work

If there is ever a UI need for it, make solve() return a JSON object with the details of the solve.

About

mastermind solver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%