Mastermind

4th November 2004

Mastermind is a game of logical deduction, based on the classic 70s board game. The computer thinks of a four digit number and you have to work out what it is.

This game works in all browsers, including screenreaders and text-only browsers:

How to play

Start by making a guess. Each of the digits in the number you guess will be marked BLACK or WHITE. BLACK means the right digit in the right place; WHITE means the right digit but in the wrong place.

So for example: if the number was "1 4 2 5" and you guessed "2 4 3 3", you would score a single black and a single white - a black for the "4" in the right place, and a white for the "2" in the wrong place. When you get it exactly right you'll score four blacks, and the game is over.

The overall objective is to get it in the fewest attempts.

Get the script

Download the zipfile [14K] and unzip it into your site directory - the game is self-contained within the mastermind folder. You can customise the appearance of the game using the mastermind.css style sheet in the mastermind/resources folder.

The game requires PHP 4 with session support.

Get the script

BSD License → Terms of use

Categories...

Website gadgets

Bits of site functionality:

Usability widgets

Local network apps

Web-applications for your home or office network:

Game and novelties

More amusing than useful:

Our internal search engine is currently offline, undergoing some configuration changes in preparation for a major site overhaul. In the meantime, you can still search this site using Google Custom Search.


In this area

Main areas


[brothercake] a round peg in a square hole, that still fits