Skip to content

This repository contains an implementation of Minesweeper Game with Java Swing API.

Notifications You must be signed in to change notification settings

Priyanshu-git/minesweeper-swing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minesweeper-swing

About

This application is built as a fun project for implementation of the classic Minesweeper Game with Java Swing API. There may be possible bugs.

Each Minesweeper game starts out with a grid of unmarked squares. After clicking one of these squares, some of the squares will disappear, some will remain blank, and some will have numbers on them. It's your job to use the numbers to figure out which of the blank squares have mines and which are safe to click.

Minesweeper is similar to a Sudoku puzzle in that your success is largely contingent on being able to eliminate possible answers until only one answer remains.

Instructions to Play the game

  • The mouse is the only tool that you'll need to play Minesweeper.
  • The left mouse button is used to click squares that don't contain mines, while the right mouse button is used to flag squares that contain mines.
  • The first square that you click will never have a mine beneath it. Clicking a square will clear off some of the board while numbering other squares.
  • A number on a square refers to the number of mines that are currently touching that square.
  • To win the game, flag all the squares that have mines beneath them.

Pre-requisites

  • Java 8 or higher version (See here)
  • Github (optional) (See here)

To run the game locally

  1. In CMD, run git clone https://github.com/Priyanshu-git/minesweeper-swing.git to clone this repository locally.
  2. Open minesweeper-swing folder. In CMD, run: start minesweeper-swing
  3. Run LAUNCHER.cmd file
  4. Select the difficulty level and click on "New Game" button and start playing!

** If you don't have github installed, just download this repository as zip file and extract it. Then follow from step 2 **

About

This repository contains an implementation of Minesweeper Game with Java Swing API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published