|
PIC-A-Colour Game
Approx construction cost US$26
PIC your wits against a colourful code-setting mastermind! Readers may remember some years ago there was a popular board game called Mastermind. It was a two-player game and the object was for one person to secretly create a colour code using four coloured pegs, the other person then had to try and guess the colours by putting four coloured pegs into a board full of holes. The code-maker then gave the other person clues as to how close they had come to breaking the secret code. This was in the form of white or black pegs. The number of black pegs denoted the number of correct colours in the correct order. The number of white pegs denoted the number of correct colours in the wrong order. This process of guessing the code continued until the player correctly established the four colours in the correct order, or until all of the player’s ten guesses were up, in which case the code-maker had won the game. The original board game is still marketed today and there have been various commercial electronic versions of the game available over the years. PIC-A-Colour is an attempt to emulate the principle of the original game using a PIC microcontroller. In this version the player pits their wits against the PIC, which creates a secret random colour code, the player then has ten attempts to try and guess the code. After each guess the PIC gives the player clues as to how close they are to cracking the code, using a 7-segment display. The electronic version described here utilises four tri-colour l.e.d.s, which act as the coloured pegs. There are four colours available for each l.e.d., these are red, green, yellow and white (off), this gives a total number of 256 combinations. The original Mastermind board game had six coloured pegs available to the players, giving just over 1000 different combinations for the player to try and guess. The fact that PIC-A-Colour has fewer combinations does not, in practice, seem to reduce the difficulty of the game. The game is still quite addictive, and there is plenty of scope for the constructor to modify the program to increase the difficulty levels of the game if they so require. Some ideas for doing this are discussed later in this article.
This project originally appeared in the September 2003 issue of EPEOnline. >> PURCHASE <<
|
||
Copyright © 1998-2004, TechBites Interactive Inc., All rights reserved. This site is powered by techbites. |
||