Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



7 Commits

Repository files navigation


A simple JavaFX GUI of the Minesweeper game
built by Ashley Liew

Version 1 Features

  • layout similar to typical Minesweeper game
  • new game button, game over modes, different sizes and densities available
  • only basic commands (reveal, flag, unflag)

Instructions on how to execute JAR file

1) You must have the following installed on your computer:

2) Running the file

  • Install the necessary software above.
  • Take note of the directory path where you install JavaFX, specifically the lib folder.
  • In your command line, go to the directory where you download the JAR file.
  • Type in this command: java --module-path path-to-javafx-lib --add-modules javafx.controls, -jar MinesweeperGUI.jar (view footnote)
  • Press 'Enter' and play!

Example: Let's say the path to your JavaFX lib file is: C:\javafx\javafx-sdk-11.0.2\lib
The command you will put in will be: java --module-path \javafx\javafx-sdk-11.0.2\lib --add-modules javafx.controls, -jar MinesweeperGUI.jar

Notes on Implementation

I used recursion to implement Minesweeper which limits the possible dimension sizes due to stack overflow for large sizes (80-90+ rows and columns). The grids will not reveal and the command line where you write the program will display an error.


All graphics (not including the JavaFX components) are made by me, except for the ‘7’ icon for the numbered cell, Rosé pictures on the new game button (which were sourced from Google), and the flag icon (credit below).