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

Resolve puzzle-editor merge conflicts #193

Merged
merged 102 commits into from
Jul 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
9b7069d
changed redo from ctrl+y to ctrl+shift+z in windows
deShortOne Jun 5, 2022
6f74386
[NOT TESTED] mac implemented redo to cmd+shift+z
deShortOne Jun 5, 2022
ada38d5
potential mac solution for cmd+shift+Z
deShortOne Jun 6, 2022
6b5456e
Fix previous state
cjreed121 Jun 7, 2022
f1076b3
TreePanel.java line 57
GwinProGrammer Jun 7, 2022
1d7f36f
Merge pull request #118 from GwinProGrammer/ui-104-prooftreepanel
Chase-Grajeda Jun 7, 2022
96e2cc6
Merge pull request #113 from Bram-Hub/fix_prev_state
charlestian23 Jun 9, 2022
80702c2
Update LegupUI.java
Chase-Grajeda Jun 9, 2022
cc3ab7a
Merge pull request #122 from Bram-Hub/batch-grader_issue121-ungradeab…
charlestian23 Jun 9, 2022
ee82298
Add DS_Store to gitignore
cjreed121 Jun 10, 2022
8c71094
Merge pull request #124 from Bram-Hub/add_gitignore
charlestian23 Jun 10, 2022
703630f
Update README.md
charlestian23 Jun 10, 2022
91c88c6
Update README.md
charlestian23 Jun 10, 2022
765ef0a
Merge pull request #111 from deShortOne/master
charlestian23 Jun 10, 2022
f48d3c6
Removed artificial splash screen delay
charlestian23 Jun 10, 2022
6aa2c7e
Merge pull request #126 from Bram-Hub/ui-adjust_splash_screen
Chase-Grajeda Jun 10, 2022
1df8b77
Found location of board title
wei-jun7 Jun 10, 2022
b305299
Commented out console output for debugging.
Corppet Jun 10, 2022
b1c8b3f
Fix 3 Rules
Hiimadd Jun 10, 2022
9e6d426
find the solution for ui #108
wei-jun7 Jun 10, 2022
3907d6c
Fixed preferences window delay. Unnecessary block.
NMiklu Jun 10, 2022
b67e539
Merge branch 'dev' of https://github.com/Hiimadd/Legup into dev
Hiimadd Jun 10, 2022
1598af9
Revert "Update README.md"
RPIFisherman Jun 10, 2022
63fdad3
Revert "Revert "Update README.md""
RPIFisherman Jun 10, 2022
15ea671
Revert "Merge pull request #111 from deShortOne/master"
RPIFisherman Jun 10, 2022
67dc44f
Two-finger scroll bug
JingQunCui Jun 10, 2022
c0a0633
Some exception handling, null assertions, and fixing spaghetti code.
Corppet Jun 10, 2022
0d336aa
Merge branch 'dev' into dev
Corppet Jun 10, 2022
ee415ef
Merge branch 'ui-issue105-clean_up_the_tool_bar' of https://github.co…
RPIFisherman Jun 10, 2022
7dfac77
gradle version correction
RPIFisherman Jun 10, 2022
8205ad3
Revert gradle-wrapper back
RPIFisherman Jun 10, 2022
6e8f9ff
Merge pull request #131 from Bram-Hub/ui-issue108-change-puzzleview-t…
charlestian23 Jun 11, 2022
978f7e2
Merge pull request #130 from NMiklu/master
charlestian23 Jun 11, 2022
f1d49f4
Merge pull request #132 from JQCBozz/dev
Chase-Grajeda Jun 12, 2022
2f6f398
Merge branch 'dev' into dev
Chase-Grajeda Jun 12, 2022
861d9b5
Merge pull request #133 from Corppet/dev
Chase-Grajeda Jun 12, 2022
2886895
Merge branch 'dev' into ui-issue105-clean_up_the_tool_bar
Chase-Grajeda Jun 12, 2022
edeeeaa
Merge pull request #134 from Bram-Hub/ui-issue105-clean_up_the_tool_bar
Chase-Grajeda Jun 12, 2022
98e5e09
`BattleShipCell` uses `BattleShipType` as casted type instead of `Int…
Corppet Jun 14, 2022
b4ece53
Merge remote-tracking branch 'origin/dev' into dev
Corppet Jun 14, 2022
ca938cf
`BattleShipCell` uses `BattleShipType` as casted type instead of `Int…
Corppet Jun 14, 2022
2589930
Update LegupUI.java
wei-jun7 Jun 14, 2022
3599b95
Update LegupUI.java
charlestian23 Jun 14, 2022
1a52dac
Merge pull request #143 from Bram-Hub/ui-issue96-show-user-an-error-m…
charlestian23 Jun 14, 2022
dd3d4b3
Update PreferencesDialog.java
littlebizaizi Jun 14, 2022
1a01de5
Optimize the code
RPIFisherman Jun 14, 2022
13aaff1
Update PreferencesDialog.java
charlestian23 Jun 14, 2022
9e0300c
Merge pull request #144 from Bram-Hub/ui-issue109-update_preferences_…
charlestian23 Jun 14, 2022
49aedcd
Changed Nurikabe rule names
charlestian23 Jun 16, 2022
0ddb91a
Refactored two classes
charlestian23 Jun 16, 2022
e60e195
Merge pull request #147 from Bram-Hub/nurikabe-rule_name_changes
Chase-Grajeda Jun 16, 2022
0a22b0d
Merge branch 'Bram-Hub:dev' into dev
Corppet Jun 17, 2022
f5e2e44
Merge pull request #142 from Corppet/dev
charlestian23 Jun 17, 2022
a181123
`BattleShipCell` uses `BattleShipType` as casted type instead of `Int…
Corppet Jun 17, 2022
f39ef30
Merge pull request #150 from Corppet/dev
charlestian23 Jun 17, 2022
27e873f
Update PreferencesDialog.java
littlebizaizi Jun 17, 2022
e9c9742
Adjustments made to Batch Grader
charlestian23 Jun 17, 2022
f29516e
First scratch to fix
RPIFisherman Jun 20, 2022
a86005f
Fix TouchingTents, Work on FillInRow
Hiimadd Jun 21, 2022
bf6bcde
Merge pull request #151 from Bram-Hub/ui_145-preferences-menu-spacing
charlestian23 Jun 21, 2022
62b7492
fix the scroll of tree view
RPIFisherman Jun 21, 2022
c9e12ae
Merge remote-tracking branch 'origin/dev' into ui-issue128-Remove_Tre…
RPIFisherman Jun 21, 2022
29cca42
merge dev and check locally
RPIFisherman Jun 21, 2022
5290a65
Merge branch 'Bram-Hub:dev' into dev
Hiimadd Jun 21, 2022
c29af43
JavaDoc comments for some board class methods. Also added more method…
Corppet Jun 21, 2022
430db21
Refactored Battleship classes
charlestian23 Jun 21, 2022
b59b9a7
Merge pull request #160 from Corppet/dev
charlestian23 Jun 21, 2022
c0cf0f0
Merge pull request #158 from Bram-Hub/ui-issue128-Remove_Tree_View_pi…
charlestian23 Jun 21, 2022
960f872
Update LegupUI.java
wei-jun7 Jun 23, 2022
9e52ea5
Merge pull request #154 from Bram-Hub/batch-grader-issue149-show-puzz…
Chase-Grajeda Jun 23, 2022
43974fb
Merge branch 'battleship-refactor-classes' into dev
Chase-Grajeda Jun 23, 2022
216c60d
Removed JetBrains annotations.
Corppet Jun 24, 2022
c8fea1a
Revert "Removed JetBrains annotations."
Corppet Jun 24, 2022
527343d
Merge branch 'Bram-Hub:dev' into dev
Corppet Jun 24, 2022
eef234f
Removed JetBrains annotations.
Corppet Jun 24, 2022
55f9eb1
Other refactoring fixes.
Corppet Jun 24, 2022
a112e09
Merge pull request #164 from Corppet/dev
cjreed121 Jun 24, 2022
9cc5754
Merge pull request #163 from Bram-Hub/152-ui-issue
charlestian23 Jun 24, 2022
b1532fb
Update LegupUI.java issue 167
wei-jun7 Jun 24, 2022
1e9f24b
Shorter enum names in `BattleshipType` and some helper methods in `Ba…
Corppet Jun 25, 2022
b1e1d54
Implement Fill in Row
Hiimadd Jun 27, 2022
6932988
Merge branch 'dev' into ui-issue-167
charlestian23 Jun 28, 2022
bc1da91
Merge pull request #169 from Bram-Hub/ui-issue-167
charlestian23 Jun 28, 2022
a538e98
Merge pull request #170 from Corppet/dev
charlestian23 Jun 28, 2022
76f0b3b
Merge branch 'Bram-Hub:dev' into dev
Hiimadd Jun 28, 2022
821d5d8
Create LICENSE
charlestian23 Jun 29, 2022
76e5bc6
Merge pull request #173 from Bram-Hub/master
charlestian23 Jun 29, 2022
bbb5e3a
Battleship: Adjacent Ships Contradiction Rule
Corppet Jul 1, 2022
ae791af
Update ZoomWidget.java
GwinProGrammer Jul 7, 2022
7c46b07
Update DynamicView.java
GwinProGrammer Jul 11, 2022
a0d46d6
Merge branch 'Bram-Hub:dev' into dev
Hiimadd Jul 12, 2022
ff866d8
Update Controller.java
charlestian23 Jul 12, 2022
71178aa
Merge branch 'dev' into dev
charlestian23 Jul 12, 2022
504e5b5
Deleted log files
charlestian23 Jul 12, 2022
4993dc0
Update RuleFrame.java
littlebizaizi Jul 12, 2022
20d7a56
Work from 7/12/22
Hiimadd Jul 14, 2022
a84639b
Merge pull request #186 from GwinProGrammer/dev
charlestian23 Jul 15, 2022
49aa0cc
Merge pull request #176 from Corppet/dev
charlestian23 Jul 15, 2022
02fb9ee
Merge pull request #171 from Hiimadd/dev
charlestian23 Jul 15, 2022
e313d70
Merge pull request #188 from Bram-Hub/55-slow-scroll-in-case-rule-sel…
charlestian23 Jul 15, 2022
8295b28
Merge remote-tracking branch 'origin/dev' into puzzle-editor
mattsweet417 Jul 16, 2022
e0752bb
Merged dev fixes with puzzle editor design
mattsweet417 Jul 16, 2022
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,6 @@ gradle-app.setting
.classpath

# End of https://www.toptal.com/developers/gitignore/api/intellij+all,gradle,java

**/.DS_Store
gradle/wrapper/gradle-wrapper.properties
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ An example for the Battleship puzzle demonstrates the proper format for XML file

```
<edu.rpi.legup.Legup>
<edu.rpi.legup.puzzle qualifiedClassName="edu.rpi.legup.puzzle.battleship.BattleShip">
<edu.rpi.legup.puzzle qualifiedClassName="edu.rpi.legup.puzzle.battleship.Battleship">
<board size="10">
<puzzleElement>
<puzzleElement value="1" x="2" y="0"/>
Expand Down
2 changes: 1 addition & 1 deletion bin/main/edu/rpi/legup/legup/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Legup version="2.0">
<puzzles>
<puzzle name="BattleShip" qualifiedClassName="edu.rpi.legup.puzzle.battleship.BattleShip" fileType=".xml"/>
<puzzle name="BattleShip" qualifiedClassName="edu.rpi.legup.puzzle.battleship.Battleship" fileType=".xml"/>
<puzzle name="Fillapix" qualifiedClassName="edu.rpi.legup.puzzle.fillapix.Fillapix" fileType=".xml"/>
<puzzle name="Heyawake" qualifiedClassName="edu.rpi.legup.puzzle.heyawake.Heyawake" fileType=".xml"/>
<puzzle name="LightUp" qualifiedClassName="edu.rpi.legup.puzzle.lightup.LightUp" fileType=".xml"/>
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
10 changes: 7 additions & 3 deletions src/main/java/edu/rpi/legup/controller/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,15 @@ public void mouseMoved(MouseEvent e) {
*/
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
System.out.println(e.getWheelRotation());
// System.out.println(e.getWheelRotation());
if (e.isControlDown()) {
viewer.zoom(e.getWheelRotation() * 2, e.getPoint());
if (e.getWheelRotation() != 0){
viewer.zoom(e.getWheelRotation() * 2, e.getPoint());
}
} else {
viewer.zoom(e.getWheelRotation(), e.getPoint());
if (e.getWheelRotation() != 0) {
viewer.zoom(e.getWheelRotation(), e.getPoint());
}
}
}
}
3 changes: 2 additions & 1 deletion src/main/java/edu/rpi/legup/controller/TreeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import edu.rpi.legup.ui.boardview.BoardView;
import edu.rpi.legup.ui.proofeditorui.treeview.*;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
Expand Down Expand Up @@ -149,6 +150,6 @@ public void mouseMoved(MouseEvent e) {
*/
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
super.mouseWheelMoved(e);
super.viewer.scroll(e.getWheelRotation());
}
}
2 changes: 1 addition & 1 deletion src/main/java/edu/rpi/legup/model/gameboard/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void removeModifiedData(PuzzleElement data) {
*/
@SuppressWarnings("unchecked")
public void notifyChange(PuzzleElement puzzleElement) {
puzzleElements.get(puzzleElement.getIndex()).setData(puzzleElement.getData());
puzzleElements.set(puzzleElement.getIndex(), puzzleElement);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/rpi/legup/model/tree/TreeElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public TreeElement(TreeElementType type) {
public abstract boolean isContradictoryBranch();

/**
* Recursively determines if the sub tree rooted at this tree puzzleElement is valid by checking
* Recursively determines if the sub-tree rooted at this tree puzzleElement is valid by checking
* whether this tree puzzleElement and all descendants of this tree puzzleElement is justified
* and justified correctly
*
Expand Down
81 changes: 0 additions & 81 deletions src/main/java/edu/rpi/legup/puzzle/battleship/BattleShipBoard.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,28 @@

import edu.rpi.legup.model.Puzzle;
import edu.rpi.legup.model.gameboard.Board;
import edu.rpi.legup.model.gameboard.PuzzleElement;
import edu.rpi.legup.model.rules.ContradictionRule;

public class BattleShip extends Puzzle {
public BattleShip() {
public class Battleship extends Puzzle {
public Battleship() {
super();

this.name = "BattleShip";
this.name = "Battleship";

this.importer = new BattleShipImporter(this);
this.exporter = new BattleShipExporter(this);
this.importer = new BattleshipImporter(this);
this.exporter = new BattleshipExporter(this);

this.factory = new BattleShipCellFactory();
this.factory = new BattleshipCellFactory();
}

/**
* Initializes the game board. Called by the invoker of the class
*/
@Override
public void initializeView() {
boardView = new BattleShipView((BattleShipBoard) currentBoard);
boardView = new BattleshipView((BattleshipBoard) currentBoard);
addBoardListener(boardView);
}

@Override
Expand Down Expand Up @@ -46,9 +52,27 @@ public boolean isValidDimensions(int rows, int columns) {
*/
@Override
public boolean isBoardComplete(Board board) {
return false;
BattleshipBoard battleShipBoard = (BattleshipBoard) board;

for (ContradictionRule rule : contradictionRules) {
if (rule.checkContradiction(battleShipBoard) == null) {
return false;
}
}
for (PuzzleElement data : battleShipBoard.getPuzzleElements()) {
BattleshipCell cell = (BattleshipCell) data;
if (cell.getType() == BattleshipType.UNKNOWN) {
return false;
}
}
return true;
}

/**
* Callback for when the board puzzleElement changes
*
* @param board the board that has changed
*/
@Override
public void onBoardChange(Board board) {

Expand Down Expand Up @@ -111,7 +135,7 @@ public void importPuzzle(String fileName) {
// int y = Integer.valueOf(cells.item(i).getAttributes().getNamedItem("y").getNodeValue());
// String value = cells.item(i).getAttributes().getNamedItem("value").getNodeValue().toUpperCase();
//
// BattleShipCell cell = new BattleShipCell(BattleShipCellType.valueOf(value).ordinal(), new Point(x, y));
// BattleShipCell cell = new BattleShipCell(BattleShipType.valueOf(value).ordinal(), new Point(x, y));
// battleShipBoard.setCell(x, y, cell);
// cell.setModifiable(false);
// cell.setGiven(true);
Expand Down
Loading