At the beginning, there is a four digit number, let's call it the goal number. You can guess this number by input a four digit number. The game will return a mark to tell you the result of your guessing like 1A2B
, which means:
1A: your guessing has 1 digit is precisely the same number and same position as the goal number
2B:your guessing has 2 digits are the same in the goal number, but not the same position.
Now, you can change you input number, until you got the same number as the goal number, you win. Or, you used up all your 7 chances, you lose.
Just run app.py, and access localhost:5000, you got a web interface.
Run guessNumber.py, you got a console interface.