Skip to content

Dev#969

Open
AndrewAirasian wants to merge 10 commits intoBram-Hub:devfrom
AndrewAirasian:dev
Open

Dev#969
AndrewAirasian wants to merge 10 commits intoBram-Hub:devfrom
AndrewAirasian:dev

Conversation

@AndrewAirasian
Copy link
Copy Markdown
Collaborator

Description

Updates rule descriptions for Sudoku

I noticed that the hover messages for three of the sudoku case rules were all the same and also didn't accurately describe what was going on. So I made them clearer and more accurate.

Fixes Minesweeper's NonTouchingSharedEmpty rule.

the Not Shared Empty rule for minesweeper was not working for cells between two numbers (horizontally/vertically or diagonally) it was only working for a cell next to two adjacent numbers. That was fixed and a test was written for it. Some of the rule descriptions were not consistent looking. Some had () and some had - so I made them all have -, for the sudoku rules. Also I wanted to get rid of some things that I put earlier that weren't doing anything.

Closes issue #349

The cause of the problem, from what I was able to gather, was that .getMenuShortcutKeyMask() is deprecated post Java 10. And .getMenuShortcutKeyMaskEx() is safer.

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 wrote a test that verifies the minesweeper fix @ src/test/java/puzzles/minesweeper/NonTouchingSharedEmptyDirectRuleTest. The Sudoku rule descriptions can be checked directly. As for the thing with issue 349, somebody with a mac should try closing the application and verifying that it behaves the same as it does on windows.

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

… or not they're a basic/case/contradiction/ rule
Clarifying documentation.
Clarifying documentation.
I noticed that the hover messages for three of the sudoku case rules were all the same and also didn't accurately describe what was going on. So I made them clearer and more accurate.
Some of the rule descriptions were not consistent looking. Some had () and some had - so I made them all have -, for the sudoku rules. Also I wanted to get rid of some things that I put earlier that weren't doing anything.
the Not Shared Empty rule for minesweeper was not working for cells between two numbers (horizontally/vertically or diagonally) it was only working for a cell next to two adjacent numbers. That was fixed and a test was written for it.
This is meant to resolve issue Bram-Hub#933. It no longer breaks when the NonTouching Shared Direct Rule is used.
Copy link
Copy Markdown
Collaborator

@jadeandtea jadeandtea left a comment

Choose a reason for hiding this comment

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

Can you add a small comment to the test that explains what the test puzzle is checking for? Like have a diagram for which situations are checked and why the rule should/shouldn't check out.

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.

2 participants