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 changes #871

Open
wants to merge 396 commits into
base: minesweeper
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
396 commits
Select commit Hold shift + click to select a range
9e41523
Comment out nonfunctional test
summerhenson Apr 16, 2024
0308ce5
Merge branch 'dev' into binary
charlestian23 May 5, 2024
277a2b9
Automated Java code formatting changes
Bram28 May 5, 2024
429e26b
Merge branch 'dev' into sudoku
charlestian23 May 5, 2024
9c121cc
Automated Java code formatting changes
Bram28 May 5, 2024
d68859b
Minesweeper (#815)
vockek May 5, 2024
9b46ce7
Team Thermometers final merge (#816)
morenomarcus03 May 5, 2024
afbde38
Merge branch 'Bram-Hub:master' into master
zacharybonagura May 9, 2024
3b82c5b
Merge pull request #1 from Bram-Hub/binary
zacharybonagura May 9, 2024
ed91549
Merge branch 'master' into dev
Chase-Grajeda Jun 1, 2024
f49f9a6
Merge pull request #818 from Bram-Hub/dev
Chase-Grajeda Jun 1, 2024
d85b9ab
Test commit
zacharybonagura Jun 4, 2024
d2b3798
Fixed Surround Pair bug, worked when one tile gap was supposed to be …
zacharybonagura Jun 6, 2024
320d03c
Fixed One Tile Gap bug, worked when surround pair was supposed to be …
zacharybonagura Jun 7, 2024
3abd581
Untested fix for StarBattleBoard copy function
summerhenson Jun 7, 2024
5f7b65c
Created a more structured way of fixing OneTileGap and SurroundPair d…
zacharybonagura Jun 7, 2024
65c2287
Merge pull request #821 from zachbonagura/binary
zacharybonagura Jun 7, 2024
ebc20df
Start first Clashing Orbit contradiction rule test
summerhenson Jun 7, 2024
71cae2b
Modified CompleteRowColumn to allow multiple cells to be selected to …
zacharybonagura Jun 8, 2024
3431226
Created puzzle editor functionality for the binary puzzle
zacharybonagura Jun 9, 2024
bd27094
Renamed and created more binary files, updated unknowntile image
zacharybonagura Jun 9, 2024
1a54846
Made progress toward a create puzzle button from file list
zacharybonagura Jun 9, 2024
e8a7cbe
Updated home page buttons
zacharybonagura Jun 11, 2024
f9a369d
Merge pull request #823 from zachbonagura/binary
zacharybonagura Jun 11, 2024
b192b79
Create 6x6 Star Battle Normal1 visualized (DO NOT OPEN AS A PUZZLE).png
offline171 Jun 11, 2024
6d8d050
Create 5x5 Star Battle Normal visualized (DO NOT OPEN AS A PUZZLE).png
offline171 Jun 11, 2024
9dff936
Fixed first clashing orbit test
summerhenson Jun 11, 2024
8d1f230
Finished Clashing Orbit contradiction rule test suite
summerhenson Jun 11, 2024
307d8ef
Start Too Few Stars contradiction rule test
summerhenson Jun 11, 2024
aabdd05
Updated toolbar in Puzzle Editor to remove unnecessary buttons
zacharybonagura Jun 13, 2024
f9f8aa6
Modified Puzzle Editor so if there are no non-placeable elements or p…
zacharybonagura Jun 13, 2024
7c273d4
Modified Binary Puzzle File Editor Number Tile and Image
zacharybonagura Jun 13, 2024
62b7811
Fixed FinishRoom case rule bug in Nurikabe so cells are modifiable
zacharybonagura Jun 13, 2024
cd17e87
Create FalseContradiction
summerhenson Jun 14, 2024
c0fc026
Merge branch 'master' into star-battle
summerhenson Jun 14, 2024
9ef4cd4
Merge remote-tracking branch 'upstream/star-battle' into star-battle
offline171 Jun 14, 2024
12add88
Merge pull request #824 from zachbonagura/binary
zacharybonagura Jun 14, 2024
ee22ec0
Created EliminateTheImpossible direct rule
zacharybonagura Jun 14, 2024
7d02f11
Finish Too Few Stars contradiction rule tests
summerhenson Jun 14, 2024
d3a677e
Too Many Stars tests
offline171 Jun 14, 2024
9f42c2d
Fixed checkstyle errors in ElementFrame
zacharybonagura Jun 14, 2024
71838a5
Combined placeable elements and nonplaceable elements into just eleme…
zacharybonagura Jun 16, 2024
eda8b22
Removed Edit Puzzle button on home page, resized home page
zacharybonagura Jun 17, 2024
9ae0fae
Removed extra buttons in proof solver, added directions button that w…
zacharybonagura Jun 18, 2024
fac81fb
Made progress with binary test suite for surround pair
zacharybonagura Jun 18, 2024
732bc78
Too Many Stars test suite
offline171 Jun 18, 2024
0fc98f5
Merge branch 'dev' into sudoku
summerhenson Jun 18, 2024
3b64e77
Automated Java code formatting changes
Bram28 Jun 18, 2024
71d128c
Merge pull request #805 from Bram-Hub/sudoku
summerhenson Jun 18, 2024
a83844a
Made progress with binary test suite for surround pair
zacharybonagura Jun 18, 2024
1a1bf5e
Editing Blackout test
offline171 Jun 18, 2024
1203860
Basic Surround Star direct rule tests
summerhenson Jun 18, 2024
c3fb60d
Merge pull request #826 from zachbonagura/binary
zacharybonagura Jun 18, 2024
65db0f7
Made progress with eliminate the impossible direct rule
zacharybonagura Jun 18, 2024
02bf6f5
Blackout Test Suite first test
offline171 Jun 18, 2024
3206f46
test committ
ContemporaryNietzsche Jun 18, 2024
c03d7e6
Merge branch 'binary' of https://github.com/ContemporaryNietzsche/LEG…
ContemporaryNietzsche Jun 18, 2024
58ff2bf
t
ContemporaryNietzsche Jun 20, 2024
ec8e1d3
commented before implementation
ContemporaryNietzsche Jun 21, 2024
109293b
Merge branch 'Bram-Hub:star-battle' into star-battle
summerhenson Jun 21, 2024
b222cdc
Finishing Blackout Test
offline171 Jun 21, 2024
cd42e83
Added new Surround Star direct rule test
summerhenson Jun 21, 2024
6772071
Finish with Stars
offline171 Jun 21, 2024
4db09f9
added generateAllBinaryStrings functions(pair programmed with Zach)
ContemporaryNietzsche Jun 21, 2024
ac95969
Make a rule name more accurate
summerhenson Jun 21, 2024
c3265d3
fixed some variables (extra 0 bug found) and commented/explained some…
ContemporaryNietzsche Jun 21, 2024
4a1ab37
Merge pull request #828 from summerhenson/star-battle
offline171 Jun 21, 2024
d286dda
Merge branch 'Bram-Hub:star-battle' into star-battle
offline171 Jun 21, 2024
7049e9f
finished the generate possibilites function for ETP
ContemporaryNietzsche Jun 22, 2024
a884291
Modified "Create Puzzle" to become puzzle editor, when clicked opens …
zacharybonagura Jun 23, 2024
3350325
Merge pull request #827 from ContemporaryNietzsche/binary
zacharybonagura Jun 23, 2024
3dcc3d5
Added create and open toolbar buttons when first opening puzzle editor
zacharybonagura Jun 23, 2024
de2b08a
Added Too Few Stars contradiction rule test
summerhenson Jun 25, 2024
d30206d
new 2 star puzzle
offline171 Jun 25, 2024
6e5dc78
added functions to eliminate the impossible (still wip)
ContemporaryNietzsche Jun 25, 2024
1ab5eb2
Merge pull request #830 from ContemporaryNietzsche/binary
ContemporaryNietzsche Jun 25, 2024
dfadd67
Merge branch 'binary' into binary
zacharybonagura Jun 28, 2024
cb6ad78
Merge pull request #831 from zachbonagura/binary
zacharybonagura Jun 28, 2024
9fbb412
Modified EliminateTheImpossible so it produces the correct combinatio…
zacharybonagura Jun 28, 2024
dbbaca6
Update 10x10 Star Battle 2star Normal1.xml
offline171 Jun 28, 2024
24bd384
First test case boards for Columns w/in Regions direct rule
summerhenson Jun 28, 2024
cf78cac
Added new Too Few Stars contradiction rule test case
summerhenson Jun 28, 2024
dc73947
Added second new test case for Too Few Stars contradiction rule
summerhenson Jun 28, 2024
53a0ac6
Merge branch 'Bram-Hub:star-battle' into star-battle
summerhenson Jun 28, 2024
1441f93
Each possible binary string combination is added to row
zacharybonagura Jun 28, 2024
541edff
Fixed EliminateTheImpossible so each row is a deep copy of original
zacharybonagura Jun 28, 2024
2e6b526
Merge branch 'star-battle' of https://github.com/offline171/LEGUP int…
offline171 Jun 28, 2024
7575f17
Fixed curly brace checkstyle error
zacharybonagura Jun 28, 2024
81483de
Modified Puzzle Solver -> when opened, a blank board is shown with no…
zacharybonagura Jun 30, 2024
3b5b7d0
Fixed case rule bug that causes proof tree to lock when deleting if t…
zacharybonagura Jul 2, 2024
88c6f69
Enhanced finish room case rule in nurikabe to inlucde options of room…
zacharybonagura Jul 8, 2024
dd6aca0
Merge pull request #832 from summerhenson/star-battle
summerhenson Jul 9, 2024
925ff9c
Added undo and redo buttons to puzzle solver tool bar, fixed major re…
zacharybonagura Jul 9, 2024
d69e634
Removed unnecessary logger error info
zacharybonagura Jul 9, 2024
379613e
Merge pull request #829 from offline171/star-battle
summerhenson Jul 9, 2024
b5c10be
Fixed checkStyle error in Board
zacharybonagura Jul 9, 2024
5f73f44
Fix bug with iterating through and modifying collections in Star Batt…
summerhenson Jul 9, 2024
c46c698
Merge pull request #834 from zachbonagura/binary
zacharybonagura Jul 9, 2024
b527b9a
Added row functionality for eliminate the impossible
zacharybonagura Jul 9, 2024
34c73d4
Merge pull request #835 from zachbonagura/binary
zacharybonagura Jul 9, 2024
34b166a
Started Columns Within Regions direct rule test suite
summerhenson Jul 9, 2024
c2687b7
Fixed bug with XWithinY direct rules
summerhenson Jul 12, 2024
d37284c
Fixed return strings for some X Within Y direct rules
summerhenson Jul 12, 2024
453fe30
Added Image for PushoutAdjacentDirectRule
offline171 Jul 12, 2024
1268ca4
Merge pull request #837 from offline171/star-battle
offline171 Jul 12, 2024
7750b73
Name change
offline171 Jul 12, 2024
2b83775
Merge pull request #839 from offline171/star-battle
offline171 Jul 12, 2024
45b594e
Lock transition states before a future case rule, flash background re…
zacharybonagura Jul 14, 2024
39dbef4
Modified finish room case rule to allow a minimum of only one state
zacharybonagura Jul 14, 2024
c2c3aab
Updated finish room case rule test to match current functionality
zacharybonagura Jul 14, 2024
3e8a438
Fixed bug that prevented user from deleting transition from the root …
zacharybonagura Jul 14, 2024
616ff88
Updated images to binary puzzle
zacharybonagura Jul 15, 2024
621b581
Updated binary contradiction images
zacharybonagura Jul 16, 2024
b18857f
Merge pull request #840 from zachbonagura/binary
zacharybonagura Jul 16, 2024
f32fe76
Wrote test for Columns Within Regions direct rule and fixed the bug i…
summerhenson Jul 16, 2024
2e62d41
Bug fix for X Within Y direct rules
summerhenson Jul 16, 2024
060897a
Finish ColumnsWithinRegions direct rule tests
summerhenson Jul 16, 2024
5d767a7
Refactored ZeroOrOneCaseRule
zacharybonagura Jul 18, 2024
3fd0d80
Created PreventWastedDigitDirectRule and WastedDigitContradictionRule
zacharybonagura Jul 19, 2024
2ff6899
Refactored ThreeAdjacentContradictionRule to TrioContradictionRule
zacharybonagura Jul 19, 2024
7d9d2d5
Refactored PreventWastedDigitDirectRule to SaveBlockerDirectRule, Was…
zacharybonagura Jul 19, 2024
e8bd65e
Test case files for Columns Within Rows direct rule
summerhenson Jul 19, 2024
d2347f3
EmptyAdjacentDirectRule added
offline171 Jul 19, 2024
cf121b6
Made progress toward UniqueRowColumnDirectRule
zacharybonagura Jul 19, 2024
4b7e1e9
Columns Within Rows direct rule tests
summerhenson Jul 19, 2024
4d8a7c7
Fixed null reference bug in some direct rules
summerhenson Jul 19, 2024
d93a06e
Merge branch 'Bram-Hub:star-battle' into star-battle
summerhenson Jul 19, 2024
eac5fd5
Added tests (function not working)
offline171 Jul 19, 2024
57f09be
Merge pull request #842 from summerhenson/star-battle
summerhenson Jul 19, 2024
36090d0
Created solution for rows in UniqueRowColumnDirectRule
zacharybonagura Jul 19, 2024
82e0e97
Fixed bug in duplicate rows columns
zacharybonagura Jul 19, 2024
9010903
Created image for unique row column direct rule
zacharybonagura Jul 19, 2024
f371ee2
Updated rule descriptions for zero or one case rule and surround pair…
zacharybonagura Jul 19, 2024
a3e1ca7
Changed rule name sizes for buttons so names fit within button box
zacharybonagura Jul 20, 2024
44de989
Test case files for Regions Within Columns direct rule
summerhenson Jul 23, 2024
9d95045
Fixed an issue where tests wouldn't run
offline171 Jul 23, 2024
4fa089a
Made progress toward a reset button for puzzle editor that clears all…
zacharybonagura Jul 23, 2024
d92d567
Regions Within Columns direct rule test suite
summerhenson Jul 23, 2024
c1510b7
New 5x5 1 star puzzle file
summerhenson Jul 26, 2024
f99a1d1
Debugging process rooted out issue
offline171 Jul 26, 2024
9abd9c0
Merge pull request #845 from offline171/star-battle
summerhenson Jul 26, 2024
b0afc36
First half of Regions Within Rows direct rule test suite
summerhenson Jul 26, 2024
8ca9d07
Merge branch 'Bram-Hub:star-battle' into star-battle
summerhenson Jul 26, 2024
5c3cc1c
Merge branch 'star-battle' of https://github.com/summerhenson/LEGUP i…
summerhenson Jul 26, 2024
e8de3de
Created puzzle files for binary
zacharybonagura Jul 27, 2024
af6fd72
Combined SurroundPair and OneTileGap direct rules into PreventTrio di…
zacharybonagura Jul 27, 2024
75e74c7
Fully implemented UniqueRowColumn direct rule and organized code
zacharybonagura Jul 27, 2024
e5bbc51
Added more puzzle files to binary
zacharybonagura Jul 28, 2024
543626e
Added right click functionality to binary to cycle backwards compared…
zacharybonagura Jul 28, 2024
dd0e37b
Added reset functionality for puzzle editor
zacharybonagura Jul 28, 2024
412ea9e
Updated binary reference sheet
zacharybonagura Jul 28, 2024
f3a97e6
Fixed undo redo error when deleting nodes
zacharybonagura Jul 28, 2024
b2ba642
Enhanced UniqueRowColumn direct rule
zacharybonagura Jul 29, 2024
b2c93b9
Fixed reset button for both opening existing file or creating new fil…
zacharybonagura Jul 29, 2024
d22226d
Fixed puzzle editor malfunction under multiple puzzles
zacharybonagura Jul 29, 2024
e55541e
Merge branch 'Bram-Hub:binary' into binary
zacharybonagura Jul 29, 2024
76d3f2e
Merge branch 'binary' of https://github.com/zachbonagura/LEGUP into b…
zacharybonagura Jul 30, 2024
f61454c
Updated sudoku image directories
zacharybonagura Jul 30, 2024
8f62435
Removed debug print statements
zacharybonagura Jul 30, 2024
e1564ec
Merge branch 'binary' into dev
zacharybonagura Jul 30, 2024
60f1a73
Fixed merge conflicts
zacharybonagura Jul 30, 2024
513f228
Fixed image bug for complete row column direct rule
zacharybonagura Jul 30, 2024
562cdbb
Finish Regions Within Rows inference rule tests
summerhenson Jul 30, 2024
485791f
Implemented skyscrapers puzzle editor functionality, created no clue …
zacharybonagura Jul 31, 2024
cc70ece
Implemented sudoku puzzle editor functionality
zacharybonagura Jul 31, 2024
9f6de7d
Renamed menu buttons in puzzle solver
zacharybonagura Jul 31, 2024
abbe550
Added documentation to binary main files
zacharybonagura Aug 1, 2024
fe42b93
Added documentation to binary rules and reorganized/restructured bits…
zacharybonagura Aug 1, 2024
965b66d
Added treeTent isBoardComplete function
zacharybonagura Aug 1, 2024
b1708f3
Fixed resize proof functionality
zacharybonagura Aug 1, 2024
9dbd831
Changed Skyscrapers valid dimensions to minimum 3x3
zacharybonagura Aug 1, 2024
eac3c6b
Added new skyscrapers contradiction rule images
zacharybonagura Aug 2, 2024
54184df
Rewrite Columns Within Regions inference rule
summerhenson Aug 2, 2024
4fe7e5f
Added new skyscrapers direct rule images
zacharybonagura Aug 2, 2024
2d0026e
Finish reworking X Within Y rules
summerhenson Aug 6, 2024
9e9d8b2
Star or Empty case rule test
summerhenson Aug 6, 2024
c4ce4cc
Updated several image files
zacharybonagura Aug 8, 2024
e73720e
Updated number for cell case rule image
zacharybonagura Aug 8, 2024
e89393f
Fixed save file bug in puzzle editor that did not save most recent pa…
zacharybonagura Aug 8, 2024
5e7cef7
Added code specifications to all methods in all classes in app directory
zacharybonagura Aug 8, 2024
fb5df3d
Added code specifications to the classes themselves in app directory
zacharybonagura Aug 8, 2024
8180f7c
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
760b493
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
cac3fa4
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
581654e
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
5ed4a27
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
bc0b425
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
4715d11
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
fea6f0f
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
9935e3b
Merge pull request #849 from summerhenson/star-battle
summerhenson Aug 9, 2024
e29ff9c
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 9, 2024
b361a09
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 10, 2024
63c3a9d
Removed PuzzleEditorDialog class rather implemented functionaliy dire…
zacharybonagura Aug 10, 2024
12a3014
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 10, 2024
86e8c38
Fixed number tile in binary where cycled through the unknown tile as …
zacharybonagura Aug 11, 2024
373ac5d
Added code specifications to all missing methods and class descriptio…
zacharybonagura Aug 12, 2024
87ad777
Fixed clear history bug
zacharybonagura Aug 19, 2024
80dc899
Merge branch 'dev'
zacharybonagura Aug 19, 2024
c6ec39e
Fixed Binary Cell merge conflict
zacharybonagura Aug 19, 2024
7b45547
Merge branch 'master' into master
zacharybonagura Aug 19, 2024
a89e85b
Merge branch 'star-battle'
zacharybonagura Aug 19, 2024
c274436
Starbattle rules causing checkstyle error on github
zacharybonagura Aug 19, 2024
76aa2e7
Revert "Starbattle rules causing checkstyle error on github"
zacharybonagura Aug 19, 2024
e51bcd3
Revert "Merge branch 'star-battle'"
zacharybonagura Aug 19, 2024
f6889a4
Merge pull request #852 from zacharybonagura/master
Chase-Grajeda Aug 30, 2024
87d7ac1
Test Commit to see how reverting works
jadeandtea Sep 26, 2024
c04eef1
Revert "Test Commit to see how reverting works"
jadeandtea Sep 26, 2024
476486d
Test commit to see how reverting a merge works
jadeandtea Sep 26, 2024
7aa29db
Merge branch 'dev' of https://github.com/Bram-Hub/LEGUP into dev
jadeandtea Sep 26, 2024
1044f1c
Revert "Test commit to see how reverting a merge works"
jadeandtea Sep 27, 2024
81f05a4
Revert "Merge updated binary puzzle, proof editor, puzzle editor, hom…
jadeandtea Sep 27, 2024
ac61f10
Merge pull request #857 from Bram-Hub/revert-852-master
jadeandtea Sep 27, 2024
1cc1c45
Merge pull request #858 from zacharybonagura/master
jadeandtea Sep 27, 2024
e0d3b3a
Automated Java code formatting changes
Bram28 Sep 27, 2024
d3965f5
Merge pull request #860 from Bram-Hub/auto-format-code-1727468924
jadeandtea Sep 27, 2024
0567f8b
Don't let user change numbers
willyoung366 Oct 1, 2024
7b2b37d
little bug fix
willyoung366 Oct 4, 2024
0cc33f2
new minesweeper puzzle
willyoung366 Oct 4, 2024
53f29b0
Remove extraneous check of package name
jadeandtea Oct 6, 2024
19a37c6
Fixing merge issue
jadeandtea Oct 8, 2024
13a38b3
Fixing Merge Conflict
jadeandtea Oct 11, 2024
f44d4b3
fixes to some rules
willyoung366 Oct 12, 2024
5231687
Another board
willyoung366 Oct 12, 2024
3b1d6e8
Merge pull request #859 from Bram-Hub/dev
jadeandtea Oct 15, 2024
25455b1
new rule
willyoung366 Oct 20, 2024
d4a85d9
Minesweeper
willyoung366 Oct 25, 2024
4db1bf9
Minesweeper changes
willyoung366 Nov 1, 2024
fd909de
New rule added
willyoung366 Nov 2, 2024
7832044
2-2-X case rule update
willyoung366 Nov 2, 2024
7e50edd
1-2-X rule DONE
willyoung366 Nov 5, 2024
9a26831
1-1-E direct rule
willyoung366 Nov 8, 2024
4c16ac3
Some changes
willyoung366 Nov 9, 2024
3642a16
Must Contain Bomb Direct Rule test
willyoung366 Nov 14, 2024
e0c311e
Must Not Contain Bomb test cases
willyoung366 Nov 14, 2024
0e3ceb6
New Minesweeper rules images
willyoung366 Nov 15, 2024
3a3e222
Merge branch 'Bram-Hub:master' into local-brancj
willyoung366 Nov 19, 2024
f62a86c
massive refacotring
willyoung366 Nov 20, 2024
33c5f5c
Merge branch 'local-brancj' of https://github.com/willyoung366/will-l…
willyoung366 Nov 20, 2024
fafd7d6
finished test suites for direct rules
willyoung366 Nov 22, 2024
8c7ebf8
Test suites for case rules
willyoung366 Nov 27, 2024
e7a6546
Contradiction Rules Test
willyoung366 Nov 27, 2024
5357d7c
couple tiny changes
willyoung366 Nov 27, 2024
d589811
bug fixes
willyoung366 Dec 2, 2024
63cf5a4
remove print
willyoung366 Dec 2, 2024
18a8cb2
Merge branch 'minesweeper' into local-brancj
willyoung366 Dec 2, 2024
28b12fe
prepare to merge
willyoung366 Dec 2, 2024
420a535
prepare to merge part 2
willyoung366 Dec 2, 2024
174518c
1 comment
willyoung366 Dec 2, 2024
94d74f0
some small improvements
willyoung366 Dec 7, 2024
67e5143
new rule + test suite for the rule
willyoung366 Dec 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added code specifications to all methods in all classes in app directory
  • Loading branch information
zacharybonagura committed Aug 8, 2024
commit 5e7cef7ff895c3ba016d0189989d50a6c23809a4
18 changes: 18 additions & 0 deletions src/main/java/edu/rpi/legup/app/Config.java
Original file line number Diff line number Diff line change
@@ -74,6 +74,13 @@ public static String convertClassNameToDisplayName(String className) {
return displayName;
}

/**
* Converts the display name of the puzzle back to its corresponding class name.
* For example: convertDisplayNameToClassName("Tree Tent") returns "TreeTent"
*
* @param displayName the display name of the puzzle
* @return the class name of the puzzle as a String
*/
public static String convertDisplayNameToClassName(String displayName) {
String className = "";
for (int i = 0; i < displayName.length(); i++) {
@@ -84,6 +91,11 @@ public static String convertDisplayNameToClassName(String displayName) {
return className;
}

/**
* Gets a list of all available puzzle display names
*
* @return a List of puzzle display names as Strings
*/
public List<String> getPuzzleNames() {
List<String> names = new LinkedList<String>();
for (String puzzle : this.getPuzzleClassNames()) {
@@ -92,6 +104,12 @@ public List<String> getPuzzleNames() {
return names;
}

/**
* Returns a list of the display names of the puzzles that can have files created and edited within
* the proof editor
*
* @return a List of puzzle display names as Strings with file creation enabled
*/
public List<String> getFileCreationEnabledPuzzleNames() {
List<String> names = new LinkedList<String>();
for (String puzzle : this.getFileCreationEnabledPuzzles()) {
48 changes: 45 additions & 3 deletions src/main/java/edu/rpi/legup/app/GameBoardFacade.java
Original file line number Diff line number Diff line change
@@ -72,6 +72,9 @@ public static synchronized GameBoardFacade getInstance() {
return instance;
}

/**
* Initializes the UI components
*/
public void initializeUI() {
EventQueue.invokeLater(
() -> {
@@ -83,18 +86,29 @@ public void initializeUI() {
});
}

/**
* Sets the current puzzle in the game board
*
* @param puzzle the Puzzle to set
*/
public void setPuzzle(Puzzle puzzle) {
this.puzzle = puzzle;
this.puzzleSolver.setPuzzleView(puzzle);
this.history.clear();
}

/**
* Clears the current puzzle
*/
public void clearPuzzle() {
this.puzzle = null;
this.curFileName = null;
this.history.clear();
}

/**
* Sets up the configuration by initializing the Config object
*/
public static void setupConfig() {
Config config = null;
try {
@@ -105,11 +119,21 @@ public static void setupConfig() {
GameBoardFacade.getInstance().setConfig(config);
}

/**
* Sets the current puzzle editor with the given puzzle
*
* @param puzzle the Puzzle to set in the editor
*/
public void setPuzzleEditor(Puzzle puzzle) {
this.puzzle = puzzle;
this.puzzleEditor.setPuzzleView(puzzle);
}

/**
* Sets the configuration object for the GameBoardFacade
*
* @param config config the Config object to set
*/
public void setConfig(Config config) {
this.config = config;
}
@@ -168,7 +192,7 @@ public boolean validateTextInput(String game, String[] statements) throws Runtim
}

/**
* Loads an empty puzzle
* Loads an empty puzzle with the specified dimensions
*
* @param game name of the puzzle
* @param rows the number of rows on the board
@@ -218,6 +242,12 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti

}

/**
* Loads an empty puzzle with the specified input
*
* @param game name of the puzzle
* @param statements an array of statements to load the puzzle with
*/
public void loadPuzzle(String game, String[] statements) {
String qualifiedClassName = config.getPuzzleClassForName(game);
LOGGER.debug("Loading " + qualifiedClassName);
@@ -260,10 +290,10 @@ public void loadPuzzle(String game, String[] statements) {
}

/**
* Loads a puzzle file
* Loads a puzzle file from the specified file
*
* @param fileName file name of the board file
* @throws InvalidFileFormatException if input is invalid
* @throws InvalidFileFormatException if the file format is invalid or if the file cannot be created
*/
public void loadPuzzle(String fileName) throws InvalidFileFormatException {
try {
@@ -276,6 +306,12 @@ public void loadPuzzle(String fileName) throws InvalidFileFormatException {
}
}

/**
* Loads a puzzle into the editor from the specified file name
*
* @param fileName the name of the file to load
* @throws InvalidFileFormatException if the file format is invalid or if the file cannot be created
*/
public void loadPuzzleEditor(String fileName) throws InvalidFileFormatException {
try {
loadPuzzleEditor(new FileInputStream(fileName));
@@ -287,6 +323,12 @@ public void loadPuzzleEditor(String fileName) throws InvalidFileFormatException
}
}

/**
* Loads a puzzle into the editor from the specified input stream
*
* @param inputStream the input stream to load the puzzle from
* @throws InvalidFileFormatException if the input stream cannot be processed or the file format is invalid
*/
public void loadPuzzleEditor(InputStream inputStream) throws InvalidFileFormatException {
Document document;
try {
8 changes: 8 additions & 0 deletions src/main/java/edu/rpi/legup/app/InvalidConfigException.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
package edu.rpi.legup.app;

/**
* Custom exception class for handling invalid configuration errors
*/
public class InvalidConfigException extends Exception {
/**
* Constructs a new InvalidConfigException with the specified detail message
*
* @param message the detail message
*/
public InvalidConfigException(String message) {
super(message);
}
35 changes: 28 additions & 7 deletions src/main/java/edu/rpi/legup/app/LegupPreferences.java
Original file line number Diff line number Diff line change
@@ -73,9 +73,10 @@ public class LegupPreferences {
}

/**
* Gets the legup preferences singleton instance.
* Gets the legup preferences singleton instance
* This method ensures that only one instance of LegupPreferences exists
*
* @return legup preferences
* @return the singleton instance of LegupPreferences
*/
public static LegupPreferences getInstance() {
if (instance == null) {
@@ -84,30 +85,40 @@ public static LegupPreferences getInstance() {
return instance;
}

/** Private LegupPreferences Singleton Constructor */
/**
* Private constructor to prevent instantiation from outside the class
* Use {@link #getInstance()} to access the singleton instance
*/
private LegupPreferences() {}

/**
* Gets the user preference by the string key
*
* @param key key name of the preference
* @return value of the preference
* @return value of the preference or {@code null} if the preference does not exist
*/
public String getUserPref(String key) {
return preferencesMap.get(key);
}

/**
* Gets the user preference by the string key, value pair
* Sets the user preference for the specified key to the provided value
*
* @param key key name of the preference
* @param value value of the preference
* @param key key to set for the preference
* @param value value to set for the preference
*/
public void setUserPref(String key, String value) {
preferences.put(key, value);
preferencesMap.put(key, value);
}

/**
* Retrieves the user preference associated with the specified key as a boolean
*
* @param key the key for the preference to retrieve
* @return the boolean value of the preference
* @throws RuntimeException if the preference value cannot be interpreted as a boolean
*/
public boolean getUserPrefAsBool(String key) {
if (preferencesMap.get(key).equalsIgnoreCase(Boolean.toString(true))) {
return true;
@@ -120,10 +131,20 @@ public boolean getUserPrefAsBool(String key) {
}
}

/**
* Gets the saved path
*
* @return the saved path as a String
*/
public String getSavedPath() {
return SAVED_PATH;
}

/**
* Sets the saved path to the specified value
*
* @param path the new saved path
*/
public void setSavedPath(String path) {
SAVED_PATH = path;
}