Minesweeper game in C++ and GTK4

Bernardo Magri 039de24da8 Update 'flake.nix' 8 months ago
resources a4dccdc2a3 major refactor 8 months ago
screenshots 27e4031699 adding a game screenshot 9 months ago
src a4dccdc2a3 major refactor 8 months ago
.gitignore a4dccdc2a3 major refactor 8 months ago
LICENSE cc215f3c74 Initial commit 10 months ago
README.md a4dccdc2a3 major refactor 8 months ago
default.nix fe0b39a49d adding default.nix for nix packaging 8 months ago
flake.lock fe0b39a49d adding default.nix for nix packaging 8 months ago
flake.nix 039de24da8 Update 'flake.nix' 8 months ago
meson.build a4dccdc2a3 major refactor 8 months ago

README.md

MineSweeper

A modern GTK4/C++ implementation of the classic Minesweeper game with multiple difficulty levels, customizable board sizes, animations, and a leaderboard system.

Game Screenshot

Features

  • 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

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:

sudo apt install build-essential meson ninja-build libgtkmm-4.0-dev libsigc++-3.0-dev

Fedora

Install dependencies:

sudo dnf install gcc-c++ meson ninja-build gtkmm4.0-devel libsigc++3-devel

Arch Linux

Install dependencies:

sudo pacman -S base-devel meson ninja gtkmm-4.0 libsigc++-3.0

Building the Project

Clone the repository:

git clone https://github.com/username/minesweeper.git
cd minesweeper

Configure and build with Meson:

meson setup build
meson compile -C build

Run the game:

./build/minesweeper

Installing

To install system-wide:

meson install -C build

Using Nix

If you use the Nix package manager, you can build and run the application with:

nix-build
./result/bin/minesweeper

Or install it with:

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.