This repository contains the Java implementation of the famous game "Minesweeper" for the exam of the course Software Development Methods @ University of Trieste.
Minesweeper is a logic puzzle video game. The game features a grid of clickable squares, with hidden mines scattered around throughout the board. The objective is to clear the board without detonating any mines, with the help of clues about the number of nearby mines in each cell.
-
Click on a green tile to uncover it. Depending on the hidden value underneath the tile, there can be different outcomes.
- If you dig out a number, its value indicates the total number of mines underneath the surrounding eight tiles
- If you dig and there is no value, the eight surrounding tiles will also be dug, and so on if the dug tiles are empty
- If you dig a mine, you have lost the game
-
Depending on the numbers that you dig, you might be sure that a green tile hides a mine. Put a flag on that tile to mark it as mined.
-
Repeat 1. until you've dug up all the safe tiles and marked all the mines!
Do not worry, the first click is always safe, e.g. you will not dig a mine on your first move.
For the realization of the game, the business part has been realized using TDD, through JUnit. The game also implements a graphical interface, built with the Swing framework, using the MVC pattern, in a "classic" version.
Open a terminal and clone the repository (git required)
git clone https://github.com/damianoravalico/jminesweeper
Enter the folder just created
cd jminesweeper
Run the following command
./gradlew run
Project carried out by Cimador G. and Ravalico D. adopting pair programming technique.
Repository licensed with the MIT license. See the LICENSE for rights and limitations.