A simple memory game implemented in Python using Tkinter. The objective of the game is to find all matching pairs of images (or letters, in this case) hidden behind a grid of buttons.
- 4x4 grid of buttons with hidden images
- Randomly shuffled images for each game
- Simple GUI using Tkinter
- Highlights matched pairs in green
- Displays a congratulatory message when all matches are found
-
Clone the repository:
git clone https://github.com/milamailo/memory-game-python-tkinter.git cd MemoryGame
-
Ensure you have Python installed. This code is compatible with Python 3.x.
-
Install Tkinter if it's not already installed. Tkinter usually comes pre-installed with Python. You can check if it's installed by running:
python -m tkinter
If you see a Tkinter window, it's installed. If not, you may need to install it. For example, on Ubuntu:
sudo apt-get install python3-tk
-
Run the main script to start the game:
python main.py
-
A window will appear with a 4x4 grid of buttons. Click on the buttons to reveal the hidden images.
-
Try to find all matching pairs. When you find a match, the buttons will be highlighted in green. If you find all matches, a congratulatory message will be displayed.
memory-game/
│
├── src/
│ └── memoryGame.py # Contains the game logic and GUI setup
│
└── main.py # Main script to start the game
Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss changes.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the Tkinter documentation and community for providing valuable resources and examples.