You are to implement the following memory game:
- You have to create an 8x8 board containing of 64 squares.
- Each square should hold a random value between 1 and 100 and each value should be present twice on the board.
- ALL values should be distributed in a haphazard manner.
The game starts as follows:
1. You should setup and display the board by filling it with the corresponding values. Your values should NOT be visible to the user but rather you should display the number of each square e.g. the first square of the first row has the number 1 and the last one has the number 8; the first square of the second row has the number 9 and the last one has the number 16, etc.
2. The user should then start guessing the locations of each pair of identical values by choosing two squares (i.e. by entering their numbers). You are free to choose to ask the user to choose each square alone or both at the same time. Whichever method you choose make sure the users knows exactly what you’re expecting.
3. Once two locations are chosen you should then display the board again and uncover them. If the user made a right guess then both squares should remain uncovered throughout the rest of the game. Otherwise, you should cover them again and re-display their numbers.
4. The user is not allowed to choose a non-existing square nor an already uncovered one.
5. The game ends when the user guesses all pairs of identical values or if he/she chooses to stop by entering some sentinel value of your choosing.
6. Your program should display at each round the status of the board and the total number of guesses (whether right or wrong).