This repository contains a memory game built using the Pygame library. The game challenges players to match pairs of cards with various shapes and colors. It includes a leaderboard and animations for level transitions and victories.
The game presents a grid of cards face down. Players take turns flipping two cards at a time, trying to find matching pairs. The game includes different levels with increasing difficulty, and it tracks the player's score and remaining steps. Upon completing a level, the game advances to a new level with a larger grid. The player can view their score and name on a leaderboard.
- Multiple levels: Increase the grid size and difficulty with each new level.
- Card matching: Flip and match pairs of cards based on color and shape.
- Score tracking: Keep track of the player's score and remaining steps.
- Victory animation: Display an animation when the player completes a level.
- Leaderboard: Save and display the top scores.
- User input: Enter a name to save to the leaderboard.
- Game restart: Restart the game or return to the leaderboard upon completion.
- Start the game: Run the script to start the game.
- Play the game: Click on cards to flip them and try to match pairs.
- View leaderboard: When the game ends, you can view the leaderboard and enter your name to save your score.
- Restart or quit: Choose to restart the game or quit from the leaderboard screen.
-
Clone the repository:
git clone https://github.com/your_username/your_repository.git
-
Navigate to the project directory:
cd your_repository -
Ensure required modules are installed: Install the necessary modules using pip:
pip install pygame
-
Run the script:
game_memory.py: Main script file for the game.leaderboard.txt: File to store top scores.music_dir/: Directory containing the music file for the game.materials/: Directory for screenshots of the game.





