GithubHelp home page GithubHelp logo

theblackethiopiandude / minesweeper Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 2.0 8.29 MB

Embark on a coding journey with our Java Swing Habeshan Minesweeper project. Dive into a unique twist on the classic game.

License: MIT License

Java 100.00%
customizable java minesweeper-game sqlite3 swing-game swing-gui

minesweeper's Introduction

๐ŸŒ Socials:

Instagram LinkedIn X

๐Ÿ’ป Tech Stack:

Java C++ Python C# .Net Qt MicrosoftSQLServer MySQL Postgres SQLite MariaDB Figma Arduino Adobe XD Adobe Illustrator Docker Pi-Hole Raspberry Pi

๐Ÿ“Š GitHub Stats:


minesweeper's People

Contributors

ablixm avatar hheran avatar theblackethiopiandude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ablixm hheran

minesweeper's Issues

Inconsistent Button Background Color Change on Click

Description:

When implementing mouse event listeners in our application to modify the appearance of buttons, we encountered an issue where the background color becomes lighter upon clicking. Although the code provided suggests that the background should darken when pressed and brighten when released, this effect is inconsistent across buttons.

Screenshot 2024-05-01 at 9 25 58โ€ฏPM

Code snippet:

@Override
public void mousePressed(MouseEvent e) {
    if (!isImageButton)
        this.setBackground(this.getBackground().darker());
}

@Override
public void mouseReleased(MouseEvent e) {
    if (!isImageButton)
        this.setBackground(this.getBackground().brighter());
}

Add Game Over Screen and Logic

Description

Currently, the our game lacks a proper game over screen and logic to handle the end of the game when a mine is hit. This issue aims to implement a game over screen and update the game logic accordingly so that players are notified and can see the game's outcome when hitting a mine.

Tasks

  1. Implement Game Over Screen:

    • Design a game over screen that displays when a mine is hit.
    • Include a message indicating that the game is over and whether the player won or lost.
    • Provide options for the player to start a new game or return to the main menu.
  2. Update Game Logic:

    • Integrate the game over screen into the existing game logic.
    • When a mine is clicked, trigger the game over screen and prevent further interactions with the board.
    • Update the game state to reflect whether the player won or lost.
  3. Handle Restart and Navigation:

    • Ensure that players can restart the game from the game over screen.
    • Implement navigation options to return to the main menu or start a new game seamlessly.

Acceptance Criteria

  • The game over screen appears immediately after clicking on a mine.
  • The screen displays a clear message indicating the game outcome (win or lose).
  • Players can restart the game or return to the main menu from the game over screen.
  • The game logic prevents further interactions with the board once the game is over.

Additional Information

This enhancement will significantly improve the user experience of our game by providing clear feedback to players upon hitting a mine. The changes should be implemented in a way that seamlessly integrates with the existing game structure and enhances overall gameplay.

Add Game Over Sounds

Description

In the current implementation of our game, there is a lack of audio feedback when the player triggers a game over condition (i.e., when they click on a mine). Adding a game over sound effect will enhance the user experience by providing auditory cues to signify the end of the game.

Proposed Solution

Integrate a game over sound effect into the Minesweeper game's codebase. When a game over condition is detected, play the sound effect to notify the player of the game's conclusion.

Tasks

  1. Integration: Implement the necessary code changes to trigger the game over sound effect when a game over condition occurs.
  2. Testing: Ensure that the sound effect plays reliably and appropriately upon triggering a game over condition.

Create Custom Navigation Stack Class for Game Screens

Description

The game currently lacks a structured navigation system to manage various screens and popups seamlessly. This issue focuses on creating a custom navigation stack class specifically tailored to the game's needs. This custom stack will handle the navigation flow between different screens, popups, and overlays, ensuring a smooth and cohesive user experience.

Tasks

  1. Design Custom Navigation Stack Class:

    • Define the architecture for the custom navigation stack class.
    • Determine the methods required to manage screen transitions, such as push, pop, and peek.
  2. Implement Navigation Stack Class:

    • Create the custom navigation stack class according to the defined architecture.
    • Implement methods for adding, removing, and navigating between screens.
    • Ensure flexibility to handle various types of screens and transitions effectively.
  3. Integrate Navigation Stack with Game UI:

    • Integrate the custom navigation stack with the game's existing UI elements and screens.
    • Test the integration to ensure smooth navigation and proper functionality.

Acceptance Criteria

  • The custom navigation stack class is designed with a clear architecture for managing screen transitions.
  • The navigation stack class is implemented with methods to add, remove, and navigate between screens.
  • Screens can be pushed, popped, presented, and dismissed using the custom navigation stack.
  • The navigation stack integrates seamlessly with the game's UI, enabling smooth transitions between screens and popups.

Additional Information

Creating a custom navigation stack class tailored to the game's requirements will provide a solid foundation for managing the complexity of the user interface. This approach allows for greater flexibility and control over screen transitions, leading to an enhanced overall user experience.

Update README.md

Description:

The README.md file for the project requires an update to provide accurate and up-to-date information about the project. This update aims to improve clarity, provide essential information for users and contributors, and ensure that the README reflects the current state of the project.

Tasks:

  1. Review and revise the existing content to ensure it accurately represents the project.
  2. Update any outdated information, such as installation instructions, usage guidelines, and project dependencies.
  3. Include sections such as project overview, installation instructions, usage examples, contributing guidelines, and license information, if not already present.
  4. Ensure that the README follows best practices for readability and organization, including clear formatting, consistent styling, and proper grammar.
  5. Optionally, include badges, links to relevant resources, and examples to enhance the README's effectiveness.

Additional Context:

A well-maintained and informative README.md is essential for users and contributors to understand the project's purpose, features, and how to contribute effectively. Keeping the README up-to-date helps maintain a positive user experience and encourages collaboration within the project community.

Add Exit and Difficulty Selection Functionality to Side Panel

Issue Description

Our Java Swing Minesweeper game lacks essential functionalities: graceful game exit and difficulty selection. Let's enhance user experience by adding these features.

Exit Functionality

Implement an "Exit" button for players to gracefully exit the game, improving user satisfaction and adhering to software standards.

Difficulty Selection Screen

Introduce a screen/dialog for players to choose difficulty levels (Beginner, Intermediate, Expert) before starting a new game. This empowers users to tailor their gaming experience.

Proposed Implementation

  1. Exit Button: Prominently position an "Exit" button in the game interface for easy access. Clicking it should gracefully close the game window.

  2. Difficulty Selection Screen: Implement a screen/dialog for users to select difficulty levels before starting a new game. Ensure clear instructions and visually distinct options.

  3. Integration: Seamlessly integrate these features into the existing codebase for smooth transition between game states.

Expected Benefits

  1. Improved User Experience: Easy game exit enhances user satisfaction. Difficulty selection offers tailored challenges.

  2. Customizable Gameplay: Players can adjust the game's difficulty to match their skill level.

  3. Enhanced Accessibility: Clear exit options and difficulty selection cater to diverse player preferences.

Prevent Audio Replay for Already Revealed Tiles

Description

Currently, in the game, when a tile that has already been revealed is pressed again, the associated audio replays. This behavior is not intended and can lead to unnecessary audio repetition. This issue aims to prevent the replay of audio for tiles that have already been revealed when they are pressed again.

Tasks

  1. Update Game Logic:

    • Modify the game logic to detect when a tile that has already been revealed is pressed again.
    • Implement a check to prevent the replay of audio for tiles that have been previously revealed.
  2. Ensure Correct Audio Handling:

    • Verify that the audio associated with a tile only plays when it is initially revealed.
    • Test various scenarios to ensure that audio playback behaves as expected.
  3. Handle Edge Cases:

    • Consider edge cases such as rapid clicking or pressing multiple tiles simultaneously.
    • Implement safeguards to prevent unintended audio playback for already revealed tiles.

Acceptance Criteria

  • The audio associated with a tile only plays when the tile is initially revealed.
  • Pressing a tile that has already been revealed does not trigger the replay of audio.
  • The game maintains smooth and consistent audio behavior across different interactions.

Additional Information

This adjustment will improve the game's audio experience by eliminating unnecessary repetition and ensuring that audio cues are provided only when tiles are initially revealed. It will contribute to a more polished and enjoyable gameplay experience.

Incompatibility with Fonts causing Display Issues

The current build of the game is experiencing compatibility issues with certain fonts, resulting in display anomalies and potentially hindering gameplay experience for affected users.

Upon investigation, it has been identified that the game's rendering system is not properly accommodating certain fonts, leading to unexpected display behaviors. This issue manifests in various ways, such as distorted text, overlapping characters, or even complete failure to render text elements.

Expected Behavior:
The game should render text elements consistently across different systems and font configurations, ensuring readability and visual coherence.

Actual Behavior:
Font rendering issues disrupt the visual presentation of text within the game, impacting readability and potentially causing confusion for players.

Potential Solutions:
Installing the required font (Bahnschrift) to ensure consistent experience across alll platform

photo_2024-04-26_14-45-34

photo_2024-04-26_15-16-01
photo_2024-04-26_15-16-03

Implement Custom Data Structure with Contains, Add, and Remove Methods

Expected Behavior

The custom data structure should provide methods for Contains, Add, and Remove operations, taking a set of points as a parameter. When the Add method is called, it should check if the set of points already exists in the data structure using the Contains method. If Contains returns true, the Add method should stop without adding the set of points.

Current Behavior

Currently, there is no implementation for the custom data structure with the specified behavior.

Possible Solution

  1. Define a custom data structure class.
  2. Implement methods for Contains, Add, and Remove operations.
  3. In the Add method, check if the set of points already exists using the Contains method. If it does, stop the addition process.
  4. Ensure proper documentation and error handling.

Steps to Reproduce

  1. Define a set of points.
  2. Call the Add method with the defined set of points.
  3. Verify if the set of points is added to the data structure.
  4. Call the Add method again with the same set of points.
  5. Verify if the Add method stops without adding the set of points.

Context (Environment)

This issue pertains to the development of a custom data structure.

Detailed Description

We need to create a custom data structure that supports Contains, Add, and Remove operations for a set of points. The Add method should check if the specified set of points already exists in the data structure using the Contains method. If Contains returns true, the Add method should halt without modifying the data structure. This behavior ensures that duplicate sets of points are not added to the data structure.

Possible Implementation

Define a class for the custom data structure.
Implement methods for Contains, Add, and Remove operations.
Use appropriate data structures and algorithms to optimize performance.
Ensure proper error handling and documentation for clarity.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.