Skip to content

ANDRIX99/MineSweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

MineSweeper

Minesweeper is a classic single-player computer game that challenges players to clear a grid of hidden mines without detonating any of them. The game is played on a square board consisting of a number of tiles. Each tile can either be empty or contain a mine. The player must reveal tiles one by one, and use the information revealed by neighboring tiles to deduce the location of mines.

In javax, Minesweeper can be implemented using the Java Swing library. The game board can be represented as a 2D array of JButtons, each representing a tile. When a button is clicked, its corresponding tile is revealed, and the button's label is set to either the number of adjacent mines or a mine icon if the tile contains a mine. The player can also flag a tile by right-clicking it, indicating that they believe it contains a mine.

To win the game, the player must successfully reveal all non-mine tiles on the board without detonating any mines. If the player clicks on a tile containing a mine, they lose the game.

Overall, Minesweeper is a fun and challenging game that can be easily implemented using javax in Java.

About

recreate minesweeper in java with basic graphics thanks to javax.swing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages