Lab 1 – Ruby Mastermind

GitHub Classroom Link

Moodle

Goal

If you’ve never played Mastermind, a game where you have to guess your opponent’s secret code within a certain number of turns (like hangman with colored pegs), check it out on Wikipedia. Each turn you get some feedback about how good your guess was – whether it was exactly correct or just the correct color but in the wrong space. You can play the game here to understand: Mastermind

Method

Part 1

Create a design document for you project. This will include:

  1. A design of the user interface. You should specify what the user will see, and how they will input their guesses. This will be a text interface program, you will run it in the terminal.
  2. A list of the features you will support. Such has number of pegs, colors, number or users. User picks colors, computer guesses and computer picks colors, user guesses.
  3. Create an Object oriented design. Include at least three classes, and for each class give a description of the variables and the methods for that class. Also create a diagram showing the relationships between the classes.

Part 2

Write the program and test it. Here is the GitHub classroom link

You must have a GitHub repository with the code, which includes a readme. on how to set it up.

Turn in Github link, and a text file of at least 3 complete game plays.

Turn in

  1. The Design Document
  2. A link to your GitHub Project
  3. A text file with at least 3 complete games playing, showing/testing all features.
Scroll to Top