Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minesweeper #771

Merged
merged 28 commits into from
Mar 31, 2024
Merged

Minesweeper #771

merged 28 commits into from
Mar 31, 2024

Conversation

vockek
Copy link
Collaborator

@vockek vockek commented Mar 22, 2024

Description

  • Added "satisfy flag" case rule
  • Added functions to MinesweeperCell, MinesweeperUtilities and Unset clsases
  • Fixed "bomb or filled" case rule picture
  • Added "more bombs than flag" contradiction rule

Closes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (improvement to an already existing feature)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

I used a few example minesweeper puzzle files to make sure the case rule worked in a few different scenarios (in the middle, on edges, corners, etc.)

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

vockek and others added 24 commits February 16, 2024 16:08
This reverts commit ace7122.
removed fillapix imports
Added the unset puzzle element, added the minesweeper board copy function, fixed the bomb or filled case rule
This reverts commit ace7122.
Added helper functions used for getting cells adjacent to flag, as well as combinations of possible bomb tiles.
This reverts commit b4c8ed9.
-Fixed Bomb or Filled case rule picture
-Added getTileNumber and setCellType functions
-added 5x5 test puzzle
Copy link
Collaborator

@charlestian23 charlestian23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments. Other the two comments I made, the general structure of the code looks fine. I didn't look specifically into the general logic of the rules, I trust you guys to do that. I'll look over the rules more closely when the puzzle is ready to be merged into dev.


public class Unset extends NonPlaceableElement {
public Unset() {
super("MINE-UNPL-0002", "Unset", "A blank tile", "edu/rpi/legup/images/fillapix/tiles/UnknownTile.png");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if you guys made a copy of the Fillapix unknown tile and put it in the Minesweeper directory. All the other puzzles have their own unknown tile images.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you guys have an empty cell tile? If not, just ignore this comment. But if you do, I'd prefer if you modified this tile to have an empty cell tile. This way, we can just have two branches in the icon and it can be the same size as all the other icons.

@vockek vockek merged commit 6230b7b into Bram-Hub:minesweeper Mar 31, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants