Mastermind: The Big Picture

For our final project, we wanted to try to incorporate several concepts from previous projects in order to show what we’ve learned. There were countless possibilities of what we could accomplish, but in the end we decided that we would create our own version of the game Mastermind. This would allow us to build and program everything ourselves to get it working exactly the way we wanted.

The original Mastermind was a board game involving two players: the codemaker and the codebreaker. The code maker would create a pattern of four pegs, with each peg having a variety of possible colors. The code is covered from the second play by a small shield, and then their job is to guess the code. For each guess, there is a spot at the end of the row for four smaller pegs to indicate whether each peg was either: in the correct location and the correct color, a color in the code but in the wrong location, or a color that isn’t in the code.

Mastermind

We decided to make a few changes to the game in order to make it friendlier to use with the A3BU. Rather than trying to figure out how we could use color coded pegs, we decided to switch from a code of colored pegs to a code of digits. The program would randomly generate a four digit code, with the range of digits specified in the code (we used 1-6 most often), and then the user could enter their guess from TeraTerm. Then we wired up each of the three legs from each LED to the output pins on the A3BU, and these LEDs served as the indicator pegs that showed the player information about their guess. If their guess contained a correct number in the correct location, one of the LEDs would turn green. If their guess contained a correct number in an incorrect location, then one of the LEDs would turn blue. If any of the numbers guessed weren’t in the master code at all then that number of LEDs would turn red.

Here is a sample of our finished product:

Smoketown_Mastermind