Master Mind is a code-breaking game. This version is based on the Invicta game from the mid 1970's.
It is also based on "The Computer As Master Mind", an article by Donald E. Knuth in 'Recreational Mathematics'.
To play it, click on one of the coloured glass balls and a copy will be placed in the first position. Continue until the row is filled. Click 'Score' to get a measure of how close the guess is to the hidden code.
A black scoring peg means a colour is correctly placed. A white peg means a colour is present but incorrectly placed. An incorrectly placed colour, if duplicated, will not be scored again unless that colour is used in another non-matching location in the hidden code.
'Clear' resets a row if not yet scored. 'Start' will set a new code immediately for a new game at any time. 'Quit' will end the current game and show the code.
I made a version for the Psion Organiser II XP (or LZ but not CM because the game needs a user-defined graphic). It's in a ZIP file here. To use it, translate the OPL to object code for the Organiser. I won't explain that here, but I may do it as part of an Organiser code section on this site.
I also made an EXE file that runs on Windows 98, XP, 7, and 10, and maybe WINE in Linux. It uses the OLEAUT32.dll function OleLoadPicture to load GIF and JPG image 'resources' in the program file. This solves two things: it makes the transparency needed for the game easy to do, and it makes the highest quality images by assembling them from the smallest sized image formats appropriate to each part of the final result. The file, compiled by GCC v5.1.0 from C code, is here:
Windows 32-bit Mastermind.zip
Size: 75,528 bytes. CRC32/MD5 codes: