Title: Memory Matching Game in Python
The Turtle graphics package is used to build our simple game. Here's the style of play that your program will implement for this project: On the game board, there are always two identical images.
For our game, you are required to support 8 cards (4 pairs of images), 10 cards (5 pairs of images), and 12 cards (6 pairs of images). Your game must allow the user to play any one of those options as they desire. NB: In my game, if the user specifies less than 8 or more than 12 cards, I force them to re-enter their choice. On the other hand, if they enter an odd number (9 or 11), I present a warning and "correct" their entry to the nearest even number for the game.
The player starts by entering their name and the number of cards they'd like to use for the game. Based on the player's choice, your program places the cards - FACE DOWN - on the canvas in the playing space. The player subsequently uses the mouse to select a card. This selection "flips" the card over and displays its "face".
The player then tries to find another card that has the same image as the first by clicking the mouse on another card. As with the first card selected, this second choice flips "face up" as well. If the two face-up cards match, they are removed (or hidden) from play.
If the two cards do NOT match, they both are flipped back so that they are face-down. GIF files for 2 card sets (traditional playing cards & dogs). You are free to create your own card resources if you wish. I used a card size of 100x150 pixels - you are free to diverge from that as long as your program still supports the play options outlined above.
NB: Python Turtle - and particularly the turtle objects - can only support the .GIF format, so if you create your own resources, keep that in mind. A GIF file for the "back" or face-down card view. GIFs for user messages (file errors, winning messages, etc.)
A GIF for the "Quit" button. Besides implementing a solution to support the game outline above, here are other functional requirements: Your program must display a "status" area that presents the player with their current number of guesses and matches - updating those values appropriately. Note: a single mouse-click is not a "guess".
Consider the player entering their guess after they've selected a card and then tried to match it with another card selection. Your program must display a "leaderboard" that keeps track of the (6 to 8) "top player" statistics (number of guesses and name) between executions of your program.
The lowest number of guesses indicates the "better" player. Your program must implement a "quit" button (similar to what's shown in the demo video) in case the player wants to exit the program before finishing the game. Players who quit do NOT have their statistics added to the leaderboard.