Giter VIP home page Giter VIP logo

mastermind's Introduction

About the Game

Mastermind is a two-player code-breaking game where one player, the code-maker, creates a secret code using a series of colored pegs, and the other player, the code-breaker, tries to guess the code within a limited number of attempts. The game typically comes with a board with four rows of holes, where the code-maker places four colored pegs in a specific order, with the possibility of using duplicates.

The code-breaker makes a guess by placing four colored pegs in the same order on the same board. The code-maker provides feedback by placing smaller pegs in either white or black color in the feedback row. A black peg indicates that the code-breaker has guessed the correct color and position, while a white peg indicates that the code-breaker has guessed the correct color but in the wrong position.

The code-breaker then uses this feedback to adjust their next guess, using a process of elimination to deduce the correct code. The game continues until the code-breaker correctly guesses the code or until the maximum number of attempts is reached.

Mastermind is a challenging game that requires logical thinking, deductive reasoning, and strategic planning. It is suitable for players of all ages and can be played in about 5 minutes.

HOW TO PLAY

This is a command line interface where the user inputs the first letter of a color that they wish to play a guess for. The user will be told how many colors of the code that they have guessed correctly and/or how many colors are placed in the correct position to form the code.

git clone https://github.com/chparmley/MasterMInd.git
cd MasterMind
python3 mastermind.py

mastermind's People

Contributors

7urtles avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.