Skip to content

Commit 750bd12

Browse files
committed
Updated documentation of python-mastermind
1 parent 5f28f50 commit 750bd12

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
1-
# python-mastermind
2-
Mastermind: A repository to get students familiar with the git environment. (python)
1+
# MASTERMIND
2+
##INTRODUCTION
3+
Mastermind or Master Mind is a code-breaking game. The board game with pegs was invented in 1970 by Mordecai Meirowitz, an Israeli postmaster and telecommunications expert.It resembles an earlier pencil and paper game called Bulls and Cows that may date back a century or more. It has been recently implemented as an game application with similar rules as that of the board game, except the code is randomly generated.
4+
5+
##RULES AND PROCEDURE
6+
The game consists of a hidden randomly generated code of four colours. The player has to guess the code **both the correct colours and their correct order** out of possibility of eight colours, in the specified number of guesses.
7+
8+
The player chooses a pattern of four code pegs. Duplicates and blanks are allowed depending on player choice, so the player could even choose four code pegs of the same color or four blanks.The player tries to guess the pattern, in both order and color, within the specified turns. Each guess is made by placing a row of code pegs on the decoding board. Once placed, a feedback is provided by placing from zero to four key pegs in the small holes of the row with the guess. A colored or black key peg is placed for each code peg from the guess which is correct in both color and position. A white key peg indicates the existence of a correct color code peg placed in the wrong position.
9+
10+
Once feedback is provided, another guess is made; guesses and feedback continue to alternate until either the player guesses correctly, or the specified number of incorrect guesses are made.
11+
12+
##HOW TO RUN
13+
You can run the game after installing pygame through the command
14+
```
15+
sudo apt-get install python-pygame
16+
```
17+
and run it simply by,
18+
```
19+
index.py
20+
```
21+
######Happy gaming and happy coding!
22+
23+
24+
25+

0 commit comments

Comments
 (0)