Minesweeper-Game

JavaFX Minesweeper

A Minesweeper game implemented using JavaFX. This project demonstrates a classic Minesweeper game with a graphical user interface, complete with cell-reveal, flagging, flood-fill for empty cells, and win/lose detection.


Features


Prerequisites


File Structure

This project is contained in a single Java file:

MinesweeperFX.java

Getting Started

Compiling the Application

  1. Open a terminal in the directory where MinesweeperFX.java is located.

  2. Compile the application using the following command (adjust the path to your JavaFX SDK’s lib folder):

    javac --module-path /path/to/javafx-sdk/lib --add-modules javafx.controls MinesweeperFX.java
    

    Replace /path/to/javafx-sdk/lib with the actual path to your JavaFX SDK library directory.

Running the Application

After compiling, run the application with:

java --module-path /path/to/javafx-sdk/lib --add-modules javafx.controls MinesweeperFX

Again, replace /path/to/javafx-sdk/lib with the correct path for your environment.


How It Works


Customization


Contributing

Contributions are welcome! Feel free to fork this repository, make improvements, and submit pull requests. Whether it’s adding new features or improving the UI, your input is valuable.


License

This project is licensed under the MIT License.


Enjoy playing Minesweeper with JavaFX and happy coding!