Skip to content

andrecosta90/mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mastermind

mastermind: code-breaking game for two players

How to Run

To play the game, make sure you have Ruby installed on your system. Then, navigate to the directory containing the main.rb file and run the following command:

ruby main.rb

How to Play

  1. You will be prompted to choose whether you want to be the Codemaker or the Codebreaker.
  2. If you choose to be the Codemaker, you will set a secret code for the Codebreaker to guess. The Codebreaker will utilize the Knuth's algorithm to generate guesses.
  3. If you choose to be the Codebreaker, you will attempt to guess the secret code set by the Codemaker.
  4. The game will continue for a specified number of rounds. After each guess, feedback will be provided to indicate how close the guess was to the secret code.
  5. Keep playing until either the Codebreaker guesses the secret code correctly or the maximum number of rounds is reached.

Enjoy the game!

About

mastermind: code-breaking game for two players

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages