This pull request introduces a GUI-based Minesweeper game implemented in Java (Adding a new game called Minesweeper in java), complete with an interactive interface that allows players to reveal cells, flag potential mines, and attempt to clear the board without triggering a mine. This addition brings a visually engaging version of the classic game to the project.
Features Added
Interactive 9x9 Game Board:
A 9x9 grid with 10 randomly placed mines, following the traditional Minesweeper format.
Players can click to reveal cells or right-click to flag suspected mines.
Emoji Enhancements:
Mines: Mines are displayed as "*" emojis when revealed after a game loss, adding visual feedback.
Flagged Cells: Players can mark suspected mines with a "..." by right-clicking on a cell, enhancing the visual appeal of flagged cells.
Game Mechanics:
Cell Revealing: Reveals adjacent cells automatically if a cell has no neighboring mines.
Flagging Feature: Right-click to toggle flags on cells, allowing players to mark suspected mines.
End Game Logic: Alerts for win or loss conditions, displaying all mines upon game over.
User Interaction:
Players use the mouse for cell actions:
Left-click to reveal a cell.
Right-click to flag/unflag a cell as a suspected mine.
Visual Enhancements
Fonts and button designs make the GUI clear and accessible.
How to Play
Left-click to reveal a cell. If it’s a mine, the game ends with a "Game Over" message.
Right-click to flag/unflag cells as suspected mines using the "..."
The game ends when all non-mine cells are revealed, displaying a "Congratulations" message.
Testing & Verification
Game Functionality: Verified that left-clicking and right-clicking perform the correct actions, and that win/loss conditions work as expected.
Visual Feedback: Checked that cells display the correct emojis and mine counts, enhancing gameplay clarity.
This Minesweeper game adds an interactive and visually pleasing experience, and its simplicity makes it a great addition to introduce beginners to GUI programming in Java.
Please let me know if you need any other additional information to accept our PR.
As mentioned in the issue description We are master’s students (@KSVeerendernath, @manutopp, @gurramtejaswini) working on this project as part of our coursework, which requires us to contribute to an open-source repository. We've chosen to add Minesweeper to this project to demonstrate our skills and bring a new, fully functional game to the repository
Pull Request: Add GUI-Based Minesweeper Game
Description
This pull request introduces a GUI-based Minesweeper game implemented in Java (Adding a new game called Minesweeper in java), complete with an interactive interface that allows players to reveal cells, flag potential mines, and attempt to clear the board without triggering a mine. This addition brings a visually engaging version of the classic game to the project.
Features Added
Interactive 9x9 Game Board:
Emoji Enhancements:
Game Mechanics:
User Interaction:
Visual Enhancements
How to Play
Testing & Verification
This Minesweeper game adds an interactive and visually pleasing experience, and its simplicity makes it a great addition to introduce beginners to GUI programming in Java.
We have also raised an issue for this.
Please let me know if you need any other additional information to accept our PR.
As mentioned in the issue description We are master’s students (@KSVeerendernath, @manutopp, @gurramtejaswini) working on this project as part of our coursework, which requires us to contribute to an open-source repository. We've chosen to add Minesweeper to this project to demonstrate our skills and bring a new, fully functional game to the repository