$$ $$ $$$ $$$$$$ $$$$$$$$ $$$$$$$$ $$$$$$$$ $$ $$ $$$$ $$ $$ $$$$$$$$
$$$ $$$ $$ $$ $$ $$ $$ $$ $$ $$ $$$ $$$ $$ $$$ $$ $$ $$
$$$$ $$$$ $$ $$ $$ $$ $$ $$ $$ $$$$ $$$$ $$ $$$$ $$ $$ $$
$$ $$$ $$ $$ $$ $$$$$$ $$ $$$$$$ $$$$$$$$ $$ $$$ $$ $$ $$ $$ $$ $$ $$
$$ $$ $$$$$$$$$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$$$ $$ $$
$$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$$ $$ $$
$$ $$ $$ $$ $$$$$$ $$ $$$$$$$$ $$ $$ $$ $$ $$$$ $$ $$ $$$$$$$$
The script chooses a 4-digit code, you as the user can guess the code 12 times. After each guess you are given a hint. The hints are 4-character strings consisting of three types of characters. The i'th character of the hint, corresponds to the i'th digit of your guess. Here are the characters:
- ■: This character means that the corresponding number exists in the code and is in the correct place.
- ◪: This character means that the corresponding number exists in the code but it is not in the correct place.
- □: This character means that the corresponding number does not exist in the code.
note: there may exist duplicated digits in the code.
$ bash mastermind.sh
__________________________________
/ Mastermind-Bash is the best game \
\ project ever done! /
----------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||