Home CPSC 330

Mastermind Group Project

Due: October 9th

Overview

For this assignment, you will create a text-based version of the popular game Mastermind.

This is a two-player game in which one player is the code maker and the other is the code breaker. The "code" consists of four different elements. These are typically colored pegs, but for the text-based version will be capital letters.

There is a fixed number of possible different elements that can make up the code. This number must be agreed on before play begins.

For example, if the number of letters is 8, then letters A - H can make up the code. Duplicates are allowed. The following are all valid codes in this scheme:


CHFA
BDCA
EEEE
HAHA

Once the code maker has chosen the code (which the code breaker cannot see), the code breaker begins guessing the code.

For each guess, the code breaker chooses a complete code of four letters.

After a guess, the code breaker gets feedback on how close the guess was. This is done by telling the code breaker:

If all four letters are correct, the game is over, and the code breaker wins.

Before play, the players agree on the number of rounds that they will play. If the code breaker guesses this number of times without getting the code fully correct, then the code maker wins.


Details


Design Requirements

For this project, the quality of your code will be a part of your grade.

Groups


Report

Each team member will write a report on the project, individually. This should be from one to two pages long. It should cover the following topics:


Submitting

When you set your project up on GitHub, you must send me the link to the project page. I will clone your project early in the morning on October 10th.

Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.