Skip to content

Commit

Permalink
Merge pull request #384 from ThisMatt/new_puzzle-skyscrapers
Browse files Browse the repository at this point in the history
Renamed basic rules
  • Loading branch information
ThisMatt authored Nov 18, 2022
2 parents c6eaad4 a4b19df commit 3eac55b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 9,13 @@
import edu.rpi.legup.puzzle.skyscrapers.SkyscrapersCell;
import edu.rpi.legup.puzzle.skyscrapers.SkyscrapersType;

import java.awt.Point;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class LastCellBasicRule extends BasicRule {
public class LastSingularCellBasicRule extends BasicRule {

public LastCellBasicRule() {
super("SKYS-BASC-0002", "Last Cell",
"A certain number must go in a certain cell, because that cell is only cell in that row/col that does not create a duplicate contradiction",
public LastSingularCellBasicRule() {
super("SKYS-BASC-0002", "Last Non-Duplicate Cell",
"There is only one cell on this row/col for this number that does not create a duplicate contradiction",
"edu/rpi/legup/images/skyscrapers/rules/LastCell.png");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 9,13 @@
import edu.rpi.legup.puzzle.skyscrapers.SkyscrapersCell;
import edu.rpi.legup.puzzle.skyscrapers.SkyscrapersType;

import java.awt.Point;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class LastNumberBasicRule extends BasicRule {
public class LastSingularNumberBasicRule extends BasicRule {

public LastNumberBasicRule() {
super("SKYS-BASC-0003", "Last Number",
"A certain cell must contain a certain number since that number is the only one that does not create a duplicate contradiction.",
public LastSingularNumberBasicRule() {
super("SKYS-BASC-0003", "Last Non-Duplicate Number",
"There is only one number for this cell that does not create a duplicate contradiction",
"edu/rpi/legup/images/skyscrapers/rules/LastNumber.png");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 9,13 @@
import edu.rpi.legup.puzzle.skyscrapers.SkyscrapersCell;
import edu.rpi.legup.puzzle.skyscrapers.SkyscrapersType;

import java.awt.Point;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class FixedMaxBasicRule extends BasicRule {
public class LastVisibleCellBasicRule extends BasicRule {

public FixedMaxBasicRule() {
super("SKYS-BASC-0001", "Fixed Max",
"This is the last cell for this number that does not create a visibility contradiction.",
public LastVisibleCellBasicRule() {
super("SKYS-BASC-0001", "Last Visible Cell",
"There is only one cell on this row/col for this number that does not create a visibility contradiction",
"edu/rpi/legup/images/skyscrapers/rules/FixedMax.png");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 9,13 @@
import edu.rpi.legup.puzzle.skyscrapers.SkyscrapersCell;
import edu.rpi.legup.puzzle.skyscrapers.SkyscrapersType;

import java.awt.Point;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class OneEdgeBasicRule extends BasicRule {
public class LastVisibleNumberBasicRule extends BasicRule {

public OneEdgeBasicRule() {
super("SKYS-BASC-0005", "One Edge",
"This is the last number for this cell that does not create a visibility contradiction",
public LastVisibleNumberBasicRule() {
super("SKYS-BASC-0005", "Last Visible Number",
"There is only one number for this cell that does not create a visibility contradiction",
"edu/rpi/legup/images/skyscrapers/rules/OneEdge.png");
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 13,9 @@ spreadsheet : https://docs.google.com/spreadsheets/d/1l7aUZtavtysM8dtGnaEIXhBKMR
- View contains a few of these
- document utility functions in the reference sheet, COMMENTS!
- review and identify dead code
- replace height/width with size (never not square)
- remove all these damn print statments (commented ones too if they aren't useful)
- Edit to allow blank clues
- Display flags somewhere
5. Flags
- edit exporter to include flags in xml file format (if needed)
6. Documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 1,15 @@
RULE LIST:
SKYS-BASC-0001 : FixedMaxBasicRule
SKYS-BASC-0002 : LastCellBasicRule
SKYS-BASC-0003 : LastNumberBasicRule
SKYS-BASC-0001 : LastVisibleNumberBasicRule
SKYS-BASC-0002 : LastSingularCellBasicRule
SKYS-BASC-0003 : LastSingularNumberBasicRule
SKYS-BASC-0004 : NEdgeBasicRule
SKYS-BASC-0005 : OneEdgeBasicRule
SKYS-BASC-0005 : LastVisibleNumberBasicRule

SKYS-CONT-0001 : DuplicateNumbersContradictionRule
SKYS-CONT-0002 : ExceedingVisibilityContradictionRule
SKYS-CONT-0003 : InsufficientVisibilityContradictionRule
SKYS-CONT-0004 : NoNumberForCellContradictionRule/UnresoveldCell
SKYS-CONT-0005 : NoCellForNumberContradictionRule/UnresoveldNumber
SKYS-CONT-0004 : UnresolvedCellContradictionRule
SKYS-CONT-0005 : UnresolvedNumberContradictionRule
SKYS-CONT-0006 : PreemptiveVisibilityContradictionRule

SKYS-CASE-0001 : NumberForCellCaseRule
Expand Down

0 comments on commit 3eac55b

Please sign in to comment.