This project is a Minesweeper game integrated with a MySQL database for user management, game state saving, and statistics tracking. It was developed as part of the CSE-208 Database Lab Course.
- User Registration and Login
- Save and Load Game States
- Track User Statistics
- Different Difficulty Levels
- Customizable Grid Sizes
- Python
- MySQL
- XAMPP (for MySQL database)
- Tkinter (for GUI)
- PIL (for image handling)
- ttkthemes (for themed Tkinter widgets)
- Clone the repository:
git clone https://github.com/asifurrahmanbubt/Minesweepwer-Database-Project
- Navigate to the project directory:
cd Minesweeper-Database-Project
- Set up your Python environment and install dependencies:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` pip install -r requirements.txt
- Ensure you have XAMPP installed and running.
- Open the XAMPP Control Panel and start the MySQL module.
- Import the
minesweeper_db.sql
file into your MySQL server to create the database and necessary tables:mysql -u root -p minesweeper_db < /path/to/minesweeper_db.sql
- Start the application by running:
python main.py
- Register a new user or log in with an existing account.
- Select the desired difficulty level or customize your game.
- Play the game and your progress will be saved to the database.
main.py
: Contains the main game logic and GUI setup.database.py
: Contains functions for database connection, user registration, login, game state saving, and statistics fetching.minesweeper_db.sql
: SQL script for setting up the MySQL database.
This project is licensed under the MIT License. See the LICENSE file for more details.