Skip to content

Commit

Permalink
Automated Java code formatting changes (Bram-Hub#792)
Browse files Browse the repository at this point in the history
Co-authored-by: Bram van Heuveln <[email protected]>
  • Loading branch information
github-actions[bot] and Bram28 authored Apr 2, 2024
1 parent f6817c3 commit 4781736
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import edu.rpi.legup.puzzle.lightup.LightUpBoard;
import edu.rpi.legup.puzzle.lightup.LightUpCell;
import edu.rpi.legup.puzzle.lightup.LightUpCellType;
import edu.rpi.legup.puzzle.lightup.rules.FinishWithBulbsDirectRule;
import java.awt.*;
import java.util.ArrayList;
import java.util.Iterator;
Expand Down Expand Up @@ -210,8 +209,7 @@ public String checkRuleRaw(TreeTransition transition) {
return null;
}
return super.getInvalidUseOfRuleMessage();
}
else if (cases.size() == childTransitions.size() && cases.size() > 1) {
} else if (cases.size() == childTransitions.size() && cases.size() > 1) {
boolean foundSpot = true;
for (TreeTransition childTrans : childTransitions) {
LightUpBoard actCase = (LightUpBoard) childTrans.getBoard();
Expand All @@ -228,7 +226,7 @@ else if (cases.size() == childTransitions.size() && cases.size() > 1) {
LightUpCell posCell = (LightUpCell) posEle;
if (actCell.getType() == posCell.getType()
&& actCell.getLocation()
.equals(posCell.getLocation())) {
.equals(posCell.getLocation())) {
foundCell = true;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
import java.util.Set;

public class FinishRoomCaseRule extends CaseRule {
private int legitCases = 0; //placeholder for amount of cases originally generated in case user tries to delete cases
private int legitCases =
0; // placeholder for amount of cases originally generated in case user tries to delete

// cases

public FinishRoomCaseRule() {
super(
"NURI-CASE-0002",
Expand Down Expand Up @@ -48,8 +52,9 @@ public String checkRuleRaw(TreeTransition transition) {
+ ": This case rule must have 2 or more children.";
}
if (childTransitions.size() != legitCases) {
return super.getInvalidUseOfRuleMessage() + ": Cases can not be removed from the branch.";
} //stops user from deleting 1 or mose generated cases and still having path show as green
return super.getInvalidUseOfRuleMessage()
+ ": Cases can not be removed from the branch.";
} // stops user from deleting 1 or mose generated cases and still having path show as green
Set<Point> locations = new HashSet<>();
for (TreeTransition t1 : childTransitions) {
locations.add(
Expand Down Expand Up @@ -174,7 +179,7 @@ public ArrayList<Board> getCases(Board board, PuzzleElement puzzleElement) {
// it again and accidentally add
if (curr.getType()
== NurikabeType
.UNKNOWN) { // found adjacent space to region that is currently
.UNKNOWN) { // found adjacent space to region that is currently
// unknown
curr.setData(
NurikabeType.WHITE.toValue()); // changes adjacent cell color to white
Expand Down Expand Up @@ -241,4 +246,4 @@ public ArrayList<Board> getCases(Board board, PuzzleElement puzzleElement) {
public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElement) {
return null;
}
}
}

0 comments on commit 4781736

Please sign in to comment.