major refactor

This commit is contained in:
Bernardo Magri
2025-04-24 09:53:09 +01:00
parent 0cdc668629
commit a4dccdc2a3
11 changed files with 2069 additions and 474 deletions

View File

@@ -1,25 +1,101 @@
# minesweeper
# MineSweeper
Minesweeper game in C++ and GTK4
A modern GTK4/C++ implementation of the classic Minesweeper game with multiple difficulty levels, customizable board sizes, animations, and a leaderboard system.
![Game Screenshot](screenshots/screen1.png)
## Instructions to build
## Features
Install dependencies
- Multiple difficulty levels: Beginner, Intermediate, Expert, and Master
- Custom board size and mine count configuration
- Win/lose animations
- Persistent leaderboard to track best scores
- Modern GTK4 user interface
- Modern C++20 implementation
```
sudo apt install libgtkmm-4.0-dev libsigc++-3.0-dev
## Building from Source
### Dependencies
- GTK 4.0 or later
- gtkmm 4.0 or later
- sigc++ 3.0 or later
- Meson build system
- Ninja build system
### Ubuntu/Debian
Install dependencies:
```bash
sudo apt install build-essential meson ninja-build libgtkmm-4.0-dev libsigc++-3.0-dev
```
Go to the project folder
### Fedora
Install dependencies:
```bash
sudo dnf install gcc-c++ meson ninja-build gtkmm4.0-devel libsigc++3-devel
```
### Arch Linux
Install dependencies:
```bash
sudo pacman -S base-devel meson ninja gtkmm-4.0 libsigc++-3.0
```
### Building the Project
Clone the repository:
```bash
git clone https://github.com/username/minesweeper.git
cd minesweeper
```
Setup meson and compile the project
Configure and build with Meson:
```
```bash
meson setup build
meson compile -C build
```
Run the game:
```bash
./build/minesweeper
```
### Installing
To install system-wide:
```bash
meson install -C build
```
## Using Nix
If you use the Nix package manager, you can build and run the application with:
```bash
nix-build
./result/bin/minesweeper
```
Or install it with:
```bash
nix-env -i -f .
```
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License - see the LICENSE file for details.