March 2026
University Degree Class Project – 2nd Year, 2nd Semester
MinesFinder is a grid-based puzzle game inspired by the classic Minesweeper.
The goal is to reveal all safe cells while avoiding hidden mines using logical deduction and numerical hints.
Instead of traditional flags, players can mark cells using different indicators to track potential mine locations.
- Grid-based board
- Random mine generation
- Numerical hints indicating nearby mines
- Safe cell revealing
- Automatic expansion of empty areas
- Red
!– High probability the cell contains a mine - Yellow
?– Uncertain cell that may contain a mine
These markers help players track potential dangers and avoid accidental reveals.
Each revealed cell displays the number of mines in the 8 surrounding cells (horizontal, vertical, and diagonal), allowing players to deduce where mines are located.
Player records are automatically saved in a file:
minesfinder.recordes
Located in the user’s home directory, ensuring persistence across game sessions.
Default locations:
| OS | Path |
|---|---|
| Windows | C:\Users\<username>\minesfinder.recordes |
| Linux | /home/<username>/minesfinder.recordes |
| macOS | /Users/<username>/minesfinder.recordes |
How it works:
- On startup, the game checks if the file exists.
- If it exists, saved records are loaded.
- If it does not exist, a new file is automatically created.
- Start – New board generated
- Playing – Player reveals and marks cells
- Win – All safe cells revealed
- Lose – A mine was revealed
- A board is generated with a predefined number of mines.
- The player selects a cell to reveal.
- If the cell contains a mine → game ends.
- If the cell is safe → a number shows nearby mines.
- If the cell has 0 adjacent mines, neighboring cells are automatically revealed.
- The player wins when all non-mine cells are revealed.
-
Reveal Cell: Left mouse click
-
Mark Cell: Right mouse click (cycle through markers):
!→ suspected mine?→ uncertain
-
Solver (Logical Step): Press
Sto automatically make safe moves
MinesFinder/
│
├── src/main/java/pt.ipleiria.estg.dei.ei.esoft/
│ ├── BotaoCampoMinado.java
│ ├── CampoMinado.java
│ ├── TabelaRecordes.java
│ ├── TabelaRecordesListener.java
│ ├── JanelaDeJogo/
│ │ ├── JanelaDeJogo.java
│ │ └── JanelaDeJogo.form
│ └── MinesFinder/
│ ├── MinesFinder.java
│ └── MinesFinder.form
│
├── src/main/resources/
├── pom.xml
└── README.md
+-----------------+
| MinesFinder | <-- main menu / difficulty selection
+-----------------+
| | \
| | \
v v v
| | /
| | /
| | /
+----------------+ +----------------+ +----------------+
| JanelaDeJogo | | TabelaRecordes | | SolverCampoMinado |
| (game window) |<->| (high scores) |<->| (logic helper) |
+----------------+ +----------------+ +----------------+
|
v
+----------------+
| CampoMinado | <-- game engine / board state
+----------------+
Legend:
MinesFinder→ launchesJanelaDeJogowith selected difficultyJanelaDeJogo→ GUI + player interactionCampoMinado→ board logic, mine placement, game rulesSolverCampoMinado→ optional auto-play logic for safe movesTabelaRecordes→ stores and updates high scores
- Java
- Java Swing for the graphical interface
- Maven for project management and build
- IntelliJ IDEA GUI Designer
- Object-Oriented Programming (OOP)
This project uses Maven.
Compile the project: You can run the project directly from IntelliJ IDEA.
This project was developed as a programming exercise to practice: Object-oriented programming Algorithm design Grid-based game logic Event-driven programming with Swing GUI development in Java
- Duarte Lacerda
This project is licensed under the MIT License. See the LICENSE file for details.