Skip to content

rlmoser99/ruby_Mastermind

Repository files navigation

Mastermind

This project is part of the The Odin Project's Ruby curriculum.

Game Description

There are many variations of Mastermind, according to Wikipedia, so I choose to use the original game rules. There are 6 different colors pegs that form a 4 peg "code" that another player tries to break in 12 guesses. After each guess, they receive feedback on the number of pegs that were the right color or if that right color was also in the correct spot.

Instructions

This Mastermind game is a 1-player game, that is played in the command line. You can choose to be a code-breaker with a computer randomly generated, or you can choose be a code-maker to create a code for the computer to break. For this program, I assigned numbers 1-6 to each of the colored pegs, so the user only needs to input those numbers to enter or guess the code. There are additional instructions that will be displayed at the beginning of each game.

The easiest way to play this game, is to play online at repl.it. To play online, click on the green 'run' button at the top of the repl.it page. Otherwise, you can download this repository and run main.rb in the command line.

Run on Repl.it

About

A command line game written in Ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages