- Minesweeper is a logic puzzle video game genre generally played on personal computers.
- The objective is to clear the board without detonating any mines, with help from clues about the number of neighboring mines in each field.
- Minesweeper has been incorporated as a minigame in other games, such as
RuneScapeandMinecraft's2015 April Fools update.
-
when I started
BFSproblems inleetcodeto crackOAfor intern and placement,I found this q 529.Mineweeper, which made me understand how aminesweepergame works and intrested me.(Bucket list project)- FUN FACT:I used to randomly pick cells when I first got a computer in 6th std.😁
- I had no clue how it works.Mostly everyone during that time don't know how to play and I bet many don't know how to play now too.😂
-
To revise
JAVAwithAWTandSWING -
To develop a final prodduct and give it as a
JAR,So I learnt how to doJAR. -
Ofc to have fun🕺
If u want to learn how to develop this? Then you can view my commits,it guides you to how do the same work.
- In the game, mines (that resemble naval mines in the classic theme) are scattered throughout a board, which is divided into cells.
- Three states:
unopened,openedandflagged. An unopened cell is blank and clickable, while an opened cell is exposed. - Flagged cells are those marked by the player to indicate a potential mine location.
- Players can also flag a cell, visualised by a flag being put on the location, to denote that they believe a mine to be in that place
- A player selects a cell to open it. If a player opens a mined cell, the game ends. Otherwise,
- The opened cell displays either a number, indicating the number of mines vertically, horizontally or diagonally adjacent to it. or a
blank tile(or "0"), and all adjacent non-mined cells will automatically be opened - WIN: If we managed to open all the cells without exploding a mine,then we win!
- LOOSE: when u click a mine,u lost the game.
MINESWEEPER-JAVA/
├── GameBoardGUI.java
├── GameLogic.java
├── Minesweeper.java
├── MineSweeperGUI.java
Minesweeper.javais the main() function where program starts.GameLogic.javahandles the logic.MineSweeperGUI.javafirst dispaly page .GameBoardGUI.javagame play and event handling.
MINESWEEPER-JAVA/
├── src
├── MAKE A JAR.md
- This contains the resource for
ImageIconI used for each button for GUI. - Read the
MAKE A JAR.mdto learn how to make aJAR.
- Different modes based on difficulty.
- Full working of the game with winning and loosing logic.
- Reset game and can quit game.
- Random mine planting.
- Timer
- Flag count
- State management
- Making it similar to that of the Orginal game.





