Skip to content

The classic Minesweeper game, with graphical interface, made in Java with JUnit

License

Notifications You must be signed in to change notification settings

cima22/jminesweeper

 
 

Repository files navigation

CircleCI GitHub

Java Gradle JUnit

JMinesweeper

This repository contains the Java implementation of the famous game "Minesweeper" for the exam of the course Software Development Methods @ University of Trieste.

Description of the game

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.

How to play

  1. 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
  2. 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.

  3. 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.

Build with

Information about the implementation

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.

Usage

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

Gameplay

jminesweeper

Authors and acknowledgment

Project carried out by Cimador G. and Ravalico D. adopting pair programming technique.

License

Repository licensed with the MIT license. See the LICENSE for rights and limitations.

About

The classic Minesweeper game, with graphical interface, made in Java with JUnit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%