Skip to content

zander37/Minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minesweeper

A simple Minesweeper clone written in C++ using SFML. This project demonstrates how to create a graphical user interface with interactive buttons, windows, and more.

Table of Contents


Features

  • Graphical Interface: Uses SFML for drawing windows, buttons, and text.
  • Customizable: You can adjust the window size and number of mines in the source code.
  • Cross-Platform: CMake + SFML allows the game to be built on Windows, macOS, and Linux.

Requirements

  1. A C++11 (or higher) compatible compiler (e.g., gcc, clang, MSVC).

  2. CMake 3.2 or higher.

  3. SFML 2.5.1 (or newer).

    • You can install SFML from:
      • SFML official website
      • A package manager (e.g., vcpkg, Conan, homebrew, apt, etc.)
      • Or build SFML from source.

Building and Running

  1. Clone this repository:

    git clone https://github.com/<YOUR_USERNAME>/Minesweeper.git
    cd Minesweeper
    
  2. Install SFML If you haven’t already. Make sure SFML is accessible to CMake (for example, via SFML_DIR or a standard system path).

  3. Generate build files with CMake:

    cmake -B build -S .
    
  4. Build the project:

    cmake --build build
    
  5. Run the game:

    • On macOS/Linux:
      ./build/untitled
      
    • On Windows
      .\build\Debug\untitled.exe
      

Usage

  • Left-click on a tile to reveal it.
  • Right-click to place/remove flags.
  • The goal is to reveal all non-mine tiles without triggering a mine.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published