From c77bacd575b4d8c1f1f970753d3b6c80a2c9af0e Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Dec 2021 12:57:11 -0500 Subject: [PATCH 01/32] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e57deabfb..e3acf79c0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .idea/* out/* build/* +legup-update/build/* .DS_Store \ No newline at end of file From eb2cbca5edabe17c5140d31b11dc4d08fc1b32b2 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Dec 2021 14:53:15 -0500 Subject: [PATCH 02/32] Added ID parameter to Rule class --- src/main/java/edu/rpi/legup/model/rules/BasicRule.java | 5 +++-- src/main/java/edu/rpi/legup/model/rules/CaseRule.java | 5 +++-- .../java/edu/rpi/legup/model/rules/ContradictionRule.java | 5 +++-- src/main/java/edu/rpi/legup/model/rules/MergeRule.java | 2 +- src/main/java/edu/rpi/legup/model/rules/Rule.java | 7 +++++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/main/java/edu/rpi/legup/model/rules/BasicRule.java b/src/main/java/edu/rpi/legup/model/rules/BasicRule.java index 3c36f9bb9..ae30acdf9 100644 --- a/src/main/java/edu/rpi/legup/model/rules/BasicRule.java +++ b/src/main/java/edu/rpi/legup/model/rules/BasicRule.java @@ -11,12 +11,13 @@ public abstract class BasicRule extends Rule { /** * BasicRule Constructor creates a new basic rule. * + * @param ruleID ID of the rule * @param ruleName name of the rule * @param description description of the rule * @param imageName file name of the image */ - public BasicRule(String ruleName, String description, String imageName) { - super(ruleName, description, imageName); + public BasicRule(String ruleID, String ruleName, String description, String imageName) { + super(ruleID, ruleName, description, imageName); this.ruleType = BASIC; } diff --git a/src/main/java/edu/rpi/legup/model/rules/CaseRule.java b/src/main/java/edu/rpi/legup/model/rules/CaseRule.java index 1390997ca..72b336829 100644 --- a/src/main/java/edu/rpi/legup/model/rules/CaseRule.java +++ b/src/main/java/edu/rpi/legup/model/rules/CaseRule.java @@ -17,12 +17,13 @@ public abstract class CaseRule extends Rule { /** * CaseRule Constructor creates a new case rule. * + * @param ruleID ID of the rule * @param ruleName name of the rule * @param description description of the rule * @param imageName file name of the image */ - public CaseRule(String ruleName, String description, String imageName) { - super(ruleName, description, imageName); + public CaseRule(String ruleID, String ruleName, String description, String imageName) { + super(ruleID, ruleName, description, imageName); this.ruleType = CASE; } diff --git a/src/main/java/edu/rpi/legup/model/rules/ContradictionRule.java b/src/main/java/edu/rpi/legup/model/rules/ContradictionRule.java index 4ec5b9a57..8fbfc54d0 100644 --- a/src/main/java/edu/rpi/legup/model/rules/ContradictionRule.java +++ b/src/main/java/edu/rpi/legup/model/rules/ContradictionRule.java @@ -10,12 +10,13 @@ public abstract class ContradictionRule extends Rule { /** * ContradictionRule Constructor creates a new contradiction rule * + * @param ruleID ID of the rule * @param ruleName name of the rule * @param description description of the rule * @param imageName file name of the image */ - public ContradictionRule(String ruleName, String description, String imageName) { - super(ruleName, description, imageName); + public ContradictionRule(String ruleID, String ruleName, String description, String imageName) { + super(ruleID, ruleName, description, imageName); ruleType = CONTRADICTION; } diff --git a/src/main/java/edu/rpi/legup/model/rules/MergeRule.java b/src/main/java/edu/rpi/legup/model/rules/MergeRule.java index 598de9875..16454643a 100644 --- a/src/main/java/edu/rpi/legup/model/rules/MergeRule.java +++ b/src/main/java/edu/rpi/legup/model/rules/MergeRule.java @@ -19,7 +19,7 @@ public class MergeRule extends Rule { * MergeRule Constructor merges to board states together */ public MergeRule() { - super("Merge Rule", + super("MERGE","Merge Rule", "Merge any number of nodes into one", "edu/rpi/legup/images/Legup/MergeRule.png"); this.ruleType = MERGE; diff --git a/src/main/java/edu/rpi/legup/model/rules/Rule.java b/src/main/java/edu/rpi/legup/model/rules/Rule.java index bcec08dba..66bfe8804 100644 --- a/src/main/java/edu/rpi/legup/model/rules/Rule.java +++ b/src/main/java/edu/rpi/legup/model/rules/Rule.java @@ -13,6 +13,7 @@ @RegisterRule public abstract class Rule { + protected String ruleID; protected String ruleName; protected String description; protected String imageName; @@ -22,14 +23,16 @@ public abstract class Rule { /** * Rule Constructor creates a new rule * + * @param ruleID ID of the rule * @param ruleName name of the rule * @param description description of the rule * @param imageName file name of the image */ - public Rule(String ruleName, String description, String imageName) { - this.imageName = imageName; + public Rule(String ruleID, String ruleName, String description, String imageName) { + this.ruleID = ruleID; this.ruleName = ruleName; this.description = description; + this.imageName = imageName; loadImage(); } From 247fc7d3dbdfdd477c147f077ea1a8f1fe3e0f36 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Dec 2021 15:12:08 -0500 Subject: [PATCH 03/32] Nurikabe rule IDs added --- legup-update/build/libs/legup-update-2.0.jar | Bin 9946 -> 9946 bytes .../rules/BlackBetweenRegionsBasicRule.java | 3 ++- .../rules/BlackBottleNeckBasicRule.java | 3 ++- .../nurikabe/rules/BlackOrWhiteCaseRule.java | 3 ++- .../rules/BlackSquareContradictionRule.java | 3 ++- .../CantReachWhiteContradictionRule.java | 3 ++- .../nurikabe/rules/CornerBlackBasicRule.java | 3 ++- .../nurikabe/rules/FillinBlackBasicRule.java | 3 ++- .../nurikabe/rules/FillinWhiteBasicRule.java | 3 ++- .../rules/IsolateBlackContradictionRule.java | 3 ++- .../MultipleNumbersContradictionRule.java | 3 ++- .../rules/NoNumberContradictionRule.java | 3 ++- .../rules/PreventBlackSquareBasicRule.java | 3 ++- .../rules/SurroundRegionBasicRule.java | 2 +- .../rules/TooFewSpacesContradictionRule.java | 3 ++- .../rules/TooManySpacesContradictionRule.java | 3 ++- .../nurikabe/rules/UnreachableBasicRule.java | 3 ++- .../rules/WhiteBottleNeckBasicRule.java | 3 ++- .../rules/nurikabe_reference_sheet.txt | 19 ++++++++++++++++++ 19 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/nurikabe_reference_sheet.txt diff --git a/legup-update/build/libs/legup-update-2.0.jar b/legup-update/build/libs/legup-update-2.0.jar index eb09441b051af1cb4aa8b002c7bf9e71115dec46..cfa841042a59d654443d29032d7c0265de934797 100644 GIT binary patch delta 78 zcmccRd&`$Mz?+$ci-CcIgF&-$>O@{O<`dCVCz?%T{$4tD<9RM_5WV>h_djuFp!DRs Z$|fNB$s#JtK@yYqsXPWNSfXmi2mnrm9=HGi delta 78 zcmccRd&`$Mz?+$ci-CcIgQ0SH#YA2;=81k`6V0YEcP^{gc%F+JL~p*s{ZE`3C_VYE ZvI$6jvWUuZki_JDDv!YmmZ+LB0stb>9Si^f diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackBetweenRegionsBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackBetweenRegionsBasicRule.java index 71e460fa1..324afd93d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackBetweenRegionsBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackBetweenRegionsBasicRule.java @@ -19,7 +19,8 @@ public class BlackBetweenRegionsBasicRule extends BasicRule { public BlackBetweenRegionsBasicRule() { - super("Black Between Regions", + super("NURIK-BASIC-00001", + "Black Between Regions", "Any unknowns between two regions must be black.", "edu/rpi/legup/images/nurikabe/rules/BetweenRegions.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackBottleNeckBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackBottleNeckBasicRule.java index 72cf0c587..e67354b71 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackBottleNeckBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackBottleNeckBasicRule.java @@ -13,7 +13,8 @@ public class BlackBottleNeckBasicRule extends BasicRule { public BlackBottleNeckBasicRule() { - super("Black Bottle Neck", + super("NURIK-BASIC-00002", + "Black Bottle Neck", "If there is only one path for a black to escape, then those unknowns must be white.", "edu/rpi/legup/images/nurikabe/rules/OneUnknownBlack.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackOrWhiteCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackOrWhiteCaseRule.java index 7251bb145..36e559f31 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackOrWhiteCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackOrWhiteCaseRule.java @@ -15,7 +15,8 @@ public class BlackOrWhiteCaseRule extends CaseRule { public BlackOrWhiteCaseRule() { - super("Black or White", + super("NURI-CASE-0001", + "Black or White", "Each blank cell is either black or white.", "edu/rpi/legup/images/nurikabe/cases/BlackOrWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackSquareContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackSquareContradictionRule.java index bcfdc78b6..251dc754f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackSquareContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/BlackSquareContradictionRule.java @@ -10,7 +10,8 @@ public class BlackSquareContradictionRule extends ContradictionRule { public BlackSquareContradictionRule() { - super("Black Square", + super("NURI-CONT-0001", + "Black Square", "There cannot be a 2x2 square of black.", "edu/rpi/legup/images/nurikabe/contradictions/BlackSquare.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java index c2077ccec..395e15fea 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java @@ -14,7 +14,8 @@ public class CantReachWhiteContradictionRule extends ContradictionRule { public CantReachWhiteContradictionRule() { - super("Cant Reach white cell", + super("NURI-CONT-0002", + "Cant Reach white cell", "A white cell must be able to reach a white region", "edu/rpi/legup/images/nurikabe/contradictions/CantReach.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CornerBlackBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CornerBlackBasicRule.java index 64f492a95..c7ec93e22 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CornerBlackBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CornerBlackBasicRule.java @@ -18,7 +18,8 @@ public class CornerBlackBasicRule extends BasicRule { public CornerBlackBasicRule() { - super("Corners Black", + super("NURI-BASC-0003", + "Corners Black", "If there is only one white square connected to unknowns and one more white is needed then the angles of that white square are black", "edu/rpi/legup/images/nurikabe/rules/CornerBlack.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/FillinBlackBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/FillinBlackBasicRule.java index 1e5c02efd..326729797 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/FillinBlackBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/FillinBlackBasicRule.java @@ -13,7 +13,8 @@ public class FillinBlackBasicRule extends BasicRule { public FillinBlackBasicRule() { - super("Fill In Black", + super("NURI-BASC-0004", + "Fill In Black", "If there an unknown region surrounded by black, it must be black.", "edu/rpi/legup/images/nurikabe/rules/FillInBlack.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/FillinWhiteBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/FillinWhiteBasicRule.java index 73a9461f0..748cc66ff 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/FillinWhiteBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/FillinWhiteBasicRule.java @@ -13,7 +13,8 @@ public class FillinWhiteBasicRule extends BasicRule { public FillinWhiteBasicRule() { - super("Fill In White", + super("NURI-BASC-0005", + "Fill In White", "If there an unknown region surrounded by white, it must be white.", "edu/rpi/legup/images/nurikabe/rules/FillInWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/IsolateBlackContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/IsolateBlackContradictionRule.java index 846e486d3..ec0c3edc2 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/IsolateBlackContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/IsolateBlackContradictionRule.java @@ -14,7 +14,8 @@ public class IsolateBlackContradictionRule extends ContradictionRule { public IsolateBlackContradictionRule() { - super("Isolated Black", + super("NURI-CONT-0003", + "Isolated Black", "There must still be a possibility to connect every Black cell", "edu/rpi/legup/images/nurikabe/contradictions/BlackArea.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/MultipleNumbersContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/MultipleNumbersContradictionRule.java index 03c4647f6..5ebae5853 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/MultipleNumbersContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/MultipleNumbersContradictionRule.java @@ -14,7 +14,8 @@ public class MultipleNumbersContradictionRule extends ContradictionRule { public MultipleNumbersContradictionRule() { - super("Multiple Numbers", + super("NURI-CONT-0004", + "Multiple Numbers", "All white regions cannot have more than one number.", "edu/rpi/legup/images/nurikabe/contradictions/MultipleNumbers.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/NoNumberContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/NoNumberContradictionRule.java index 446088988..eabdd02d5 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/NoNumberContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/NoNumberContradictionRule.java @@ -14,7 +14,8 @@ public class NoNumberContradictionRule extends ContradictionRule { public NoNumberContradictionRule() { - super("No Number", + super("NURI-CONT-0005", + "No Number", "All enclosed white regions must have a number.", "edu/rpi/legup/images/nurikabe/contradictions/NoNumber.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/PreventBlackSquareBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/PreventBlackSquareBasicRule.java index a3a91624e..25c16d362 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/PreventBlackSquareBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/PreventBlackSquareBasicRule.java @@ -13,7 +13,8 @@ public class PreventBlackSquareBasicRule extends BasicRule { public PreventBlackSquareBasicRule() { - super("Prevent Black Square", + super("NURI-BASC-0006", + "Prevent Black Square", "There cannot be a 2x2 square of black. (3 blacks = fill in last corner white)", "edu/rpi/legup/images/nurikabe/rules/NoBlackSquare.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/SurroundRegionBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/SurroundRegionBasicRule.java index 31eb4f4bd..e6abd0416 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/SurroundRegionBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/SurroundRegionBasicRule.java @@ -13,7 +13,7 @@ public class SurroundRegionBasicRule extends BasicRule { public SurroundRegionBasicRule() { - super("Surround Region", + super("NURI-BASC-0007","Surround Region", "Surround Region", "edu/rpi/legup/images/nurikabe/rules/SurroundBlack.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/TooFewSpacesContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/TooFewSpacesContradictionRule.java index 2e211bcda..beaae9b81 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/TooFewSpacesContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/TooFewSpacesContradictionRule.java @@ -14,7 +14,8 @@ public class TooFewSpacesContradictionRule extends ContradictionRule { public TooFewSpacesContradictionRule() { - super("Too Few Spaces", + super("NURI-CONT-0006", + "Too Few Spaces", "A region cannot contain less spaces than its number.", "edu/rpi/legup/images/nurikabe/contradictions/TooFewSpaces.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/TooManySpacesContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/TooManySpacesContradictionRule.java index d7be638ca..a9626ae9d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/TooManySpacesContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/TooManySpacesContradictionRule.java @@ -15,7 +15,8 @@ public class TooManySpacesContradictionRule extends ContradictionRule { public TooManySpacesContradictionRule() { - super("Too Many Spaces", + super("NURI-CONT-0007", + "Too Many Spaces", "A region cannot contain more spaces than its number.", "edu/rpi/legup/images/nurikabe/contradictions/TooManySpaces.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/UnreachableBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/UnreachableBasicRule.java index 3c75e7ded..850d5c103 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/UnreachableBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/UnreachableBasicRule.java @@ -12,7 +12,8 @@ public class UnreachableBasicRule extends BasicRule { public UnreachableBasicRule() { - super("Unreachable white region", + super("NURI-BASC-0008", + "Unreachable white region", "A cell must be black if it cannot be reached by any white region", "edu/rpi/legup/images/nurikabe/rules/Unreachable.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/WhiteBottleNeckBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/WhiteBottleNeckBasicRule.java index 887ff0ae6..eca68fde8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/WhiteBottleNeckBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/WhiteBottleNeckBasicRule.java @@ -16,7 +16,8 @@ public class WhiteBottleNeckBasicRule extends BasicRule { public WhiteBottleNeckBasicRule() { - super("White Bottle Neck", + super("NURI-BASC-0009", + "White Bottle Neck", "If a region needs more whites and there is only one path for the region to expand, then those unknowns must be white.", "edu/rpi/legup/images/nurikabe/rules/OneUnknownWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/nurikabe_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/nurikabe_reference_sheet.txt new file mode 100644 index 000000000..ae714e83f --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/nurikabe_reference_sheet.txt @@ -0,0 +1,19 @@ +NURI-BASC-0001 : BlackBetweenRegionsBasicRule +NURI-BASC-0002 : BlackBottleNeckBasicRule +NURI-BASC-0003 : CornerBlackBasicRule +NURI-BASC-0004 : FillinBlackBasicRule +NURI-BASC-0005 : FillinWhiteBasicRule +NURI-BASC-0006 : PreventBlackSquareBasicRule +NURI-BASC-0007 : SurroundRegionBasicRule +NURI-BASC-0008 : UnreachableBasicRule +NURI-BASC-0009 : WhiteBottleNeckBasicRule + +NURI-CONT-0001 : BlackSquareContradictionRule +NURI-CONT-0002 : CantReachWhiteContradictionRule +NURI-CONT-0003 : IsolateBlackContradictionRule +NURI-CONT-0004 : MultipleNumbersContradictionRule +NURI-CONT-0005 : NoNumberContradictionRule +NURI-CONT-0006 : TooFewSpacesContradictionRule +NURI-CONT-0007 : TooManySpacesContradictionRule + +NURI-CASE-0001 : BlackOrWhiteCaseRule \ No newline at end of file From c50c25357d13a1f75040a8d9cf04179389f0bed7 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Dec 2021 15:25:03 -0500 Subject: [PATCH 04/32] Added getRuleByID() --- src/main/java/edu/rpi/legup/model/Puzzle.java | 29 +++++++++++++++++++ .../edu/rpi/legup/model/PuzzleExporter.java | 2 +- .../edu/rpi/legup/model/PuzzleImporter.java | 2 +- .../java/edu/rpi/legup/model/rules/Rule.java | 9 ++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/rpi/legup/model/Puzzle.java b/src/main/java/edu/rpi/legup/model/Puzzle.java index c7d942161..24fa967e1 100644 --- a/src/main/java/edu/rpi/legup/model/Puzzle.java +++ b/src/main/java/edu/rpi/legup/model/Puzzle.java @@ -385,6 +385,35 @@ public Rule getRuleByName(String name) { return null; } + /** + * Gets the rule using the specified name + * + * @param id name of the rule + * @return Rule + */ + public Rule getRuleByID(String id) { + for (Rule rule : basicRules) { + if (rule.getRuleID().equals(id)) { + return rule; + } + } + for (Rule rule : contradictionRules) { + if (rule.getRuleID().equals(id)) { + return rule; + } + } + for (Rule rule : caseRules) { + if (rule.getRuleID().equals(id)) { + return rule; + } + } + Rule mergeRule = new MergeRule(); + if (mergeRule.getRuleID().equals(id)) { + return mergeRule; + } + return null; + } + /** * Gets the current board * diff --git a/src/main/java/edu/rpi/legup/model/PuzzleExporter.java b/src/main/java/edu/rpi/legup/model/PuzzleExporter.java index ed8533cfc..10b6a6b6e 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleExporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleExporter.java @@ -44,7 +44,7 @@ public void exportPuzzle(String fileName) throws ExportFileException { Document newDocument = docBuilder.newDocument(); org.w3c.dom.Element legupElement = newDocument.createElement("Legup"); - legupElement.setAttribute("version", "2.0.0"); + legupElement.setAttribute("version", "3.0.0"); newDocument.appendChild(legupElement); org.w3c.dom.Element puzzleElement = newDocument.createElement("puzzle"); diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index f83484de4..38ef8c2af 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -201,7 +201,7 @@ protected void createTree(Node node) throws InvalidFileFormatException { Rule rule; if (!ruleName.isEmpty()) { - rule = puzzle.getRuleByName(ruleName); + rule = puzzle.getRuleByID(ruleName); if (rule == null) { throw new InvalidFileFormatException("Proof Tree construction error: could not find rule by name"); } diff --git a/src/main/java/edu/rpi/legup/model/rules/Rule.java b/src/main/java/edu/rpi/legup/model/rules/Rule.java index 66bfe8804..8683841d8 100644 --- a/src/main/java/edu/rpi/legup/model/rules/Rule.java +++ b/src/main/java/edu/rpi/legup/model/rules/Rule.java @@ -108,6 +108,15 @@ public String getRuleName() { return ruleName; } + /** + * Gets the name of the rule + * + * @return name of the rule + */ + public String getRuleID() { + return ruleID; + } + /** * Sets the rule name * From e218a145487765cd01062610dd14c004717cfc31 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Dec 2021 15:29:07 -0500 Subject: [PATCH 05/32] Preliminary conversion of PuzzleImporter and PuzzleExporter to use ID instead of name --- src/main/java/edu/rpi/legup/model/PuzzleExporter.java | 1 + src/main/java/edu/rpi/legup/model/PuzzleImporter.java | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/rpi/legup/model/PuzzleExporter.java b/src/main/java/edu/rpi/legup/model/PuzzleExporter.java index 10b6a6b6e..1d596b7d6 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleExporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleExporter.java @@ -112,6 +112,7 @@ protected Element createTreeElement(Document newDocument) { if (transition.isJustified()) { transElement.setAttribute("rule", transition.getRule().getRuleName()); + transElement.setAttribute("rule_id", transition.getRule().getRuleID()); } for (PuzzleElement data : transition.getBoard().getModifiedData()) { diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index 38ef8c2af..0f73efa22 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -154,10 +154,10 @@ protected void createTree(Node node) throws InvalidFileFormatException { String nodeId = treeNodeElement.getAttribute("id"); String isRoot = treeNodeElement.getAttribute("root"); if (nodeId.isEmpty()) { - throw new InvalidFileFormatException("Proof Tree construction error: cannot find node id"); + throw new InvalidFileFormatException("Proof Tree construction error: cannot find node ID"); } if (treeNodes.containsKey(nodeId)) { - throw new InvalidFileFormatException("Proof Tree construction error: duplicate tree node id found"); + throw new InvalidFileFormatException("Proof Tree construction error: duplicate tree node ID found"); } TreeNode treeNode = new TreeNode(puzzle.getCurrentBoard().copy()); if (isRoot.equalsIgnoreCase("true")) { @@ -187,13 +187,14 @@ protected void createTree(Node node) throws InvalidFileFormatException { treeNode.addChild(transition); continue; } else { - throw new InvalidFileFormatException("Proof Tree construction error: duplicate transition id found"); + throw new InvalidFileFormatException("Proof Tree construction error: duplicate transition ID found"); } } String childId = trans.getAttribute("child"); String ruleName = trans.getAttribute("rule"); + String ruleId = trans.getAttribute("rule_id"); TreeNode child = treeNodes.get(childId); @@ -201,9 +202,9 @@ protected void createTree(Node node) throws InvalidFileFormatException { Rule rule; if (!ruleName.isEmpty()) { - rule = puzzle.getRuleByID(ruleName); + rule = puzzle.getRuleByID(ruleId); if (rule == null) { - throw new InvalidFileFormatException("Proof Tree construction error: could not find rule by name"); + throw new InvalidFileFormatException("Proof Tree construction error: could not find rule by ID"); } transition.setRule(rule); } From 49c35fc273bb5d2da8231399175937f279920a29 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 23 Dec 2021 12:19:05 -0500 Subject: [PATCH 06/32] Assigned Battleship IDs --- .../rules/AdjacentShipsContradictionRule.java | 3 ++- .../battleship/rules/ContinueShipBasicRule.java | 3 ++- .../rules/FinishWithWaterBasicRule.java | 3 ++- .../rules/FinishedWithShipsBasicRule.java | 3 ++- .../rules/IncompleteShipContradictionRule.java | 3 ++- .../battleship/rules/SegmentTypeBasicRule.java | 3 ++- .../battleship/rules/SegmentTypeCaseRule.java | 3 ++- .../battleship/rules/ShipLocationCaseRule.java | 3 ++- .../battleship/rules/ShipOrWaterCaseRule.java | 3 ++- .../battleship/rules/SurroundShipBasicRule.java | 3 ++- .../rules/TooFewInFleetContradictionRule.java | 3 ++- .../rules/TooFewRowColContradictionRule.java | 3 ++- .../rules/TooManyInFleetContradictionRule.java | 3 ++- .../rules/TooManyRowColContradiction.java | 3 ++- .../rules/battleship_reference_sheet.txt | 17 +++++++++++++++++ 15 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 src/main/java/edu/rpi/legup/puzzle/battleship/rules/battleship_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/AdjacentShipsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/AdjacentShipsContradictionRule.java index 0661d5571..c336a4daf 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/AdjacentShipsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/AdjacentShipsContradictionRule.java @@ -7,7 +7,8 @@ public class AdjacentShipsContradictionRule extends ContradictionRule { public AdjacentShipsContradictionRule() { - super("Adjacent Ships", + super("BTSP-CONT-0001", + "Adjacent Ships", "", "edu/rpi/legup/images/battleship/contradictions/AdjacentShips.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ContinueShipBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ContinueShipBasicRule.java index cc92dbfab..b30110838 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ContinueShipBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ContinueShipBasicRule.java @@ -9,7 +9,8 @@ public class ContinueShipBasicRule extends BasicRule { public ContinueShipBasicRule() { - super("Continue Ship", + super("BTSP-BASC-0001", + "Continue Ship", "", "edu/rpi/legup/images/battleship/rules/ContinueShip.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/FinishWithWaterBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/FinishWithWaterBasicRule.java index 2713a64bd..be29e7c18 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/FinishWithWaterBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/FinishWithWaterBasicRule.java @@ -9,7 +9,8 @@ public class FinishWithWaterBasicRule extends BasicRule { public FinishWithWaterBasicRule() { - super("Finish with Water", + super("BTSP-BASC-0003", + "Finish with Water", "", "edu/rpi/legup/images/battleship/rules/finishWater.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/FinishedWithShipsBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/FinishedWithShipsBasicRule.java index 6ea43e5f7..39c9498fe 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/FinishedWithShipsBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/FinishedWithShipsBasicRule.java @@ -9,7 +9,8 @@ public class FinishedWithShipsBasicRule extends BasicRule { public FinishedWithShipsBasicRule() { - super("Finished with Ships", + super("BTSP-BASC-0002", + "Finished with Ships", "", "edu/rpi/legup/images/battleship/rules/finishShip.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/IncompleteShipContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/IncompleteShipContradictionRule.java index 3c71cb759..4a6cb3d15 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/IncompleteShipContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/IncompleteShipContradictionRule.java @@ -7,7 +7,8 @@ public class IncompleteShipContradictionRule extends ContradictionRule { public IncompleteShipContradictionRule() { - super("Incomplete Ship", + super("BTSP-CONT-0002", + "Incomplete Ship", "", "edu/rpi/legup/images/battleship/contradictions/IncompleteShip.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SegmentTypeBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SegmentTypeBasicRule.java index 7cf94622f..676b9dc69 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SegmentTypeBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SegmentTypeBasicRule.java @@ -9,7 +9,8 @@ public class SegmentTypeBasicRule extends BasicRule { public SegmentTypeBasicRule() { - super("Segment Type", + super("BTSP-BASC-0004", + "Segment Type", "", "edu/rpi/legup/images/battleship/rules/SegmentChoice.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SegmentTypeCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SegmentTypeCaseRule.java index 635405cf1..3850ee39f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SegmentTypeCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SegmentTypeCaseRule.java @@ -10,7 +10,8 @@ public class SegmentTypeCaseRule extends CaseRule { public SegmentTypeCaseRule() { - super("Segment Type", + super("BTSP-CASE-0001", + "Segment Type", "", "edu/rpi/legup/images/battleship/cases/SegmentType.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ShipLocationCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ShipLocationCaseRule.java index c1e441625..f21488cca 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ShipLocationCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ShipLocationCaseRule.java @@ -11,7 +11,8 @@ public class ShipLocationCaseRule extends CaseRule { public ShipLocationCaseRule() { - super("Ship Location", + super("BTSP-CASE-0002", + "Ship Location", "", "edu/rpi/legup/images/battleship/cases/ShipLocations.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ShipOrWaterCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ShipOrWaterCaseRule.java index bae13b9f0..a419b831f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ShipOrWaterCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/ShipOrWaterCaseRule.java @@ -11,7 +11,8 @@ public class ShipOrWaterCaseRule extends CaseRule { public ShipOrWaterCaseRule() { - super("Ship or Water", + super("BTSP-CASE-0003", + "Ship or Water", "", "edu/rpi/legup/images/battleship/cases/ShipOrWater.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SurroundShipBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SurroundShipBasicRule.java index f70ff76b6..ee3bd18a9 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SurroundShipBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/SurroundShipBasicRule.java @@ -9,7 +9,8 @@ public class SurroundShipBasicRule extends BasicRule { public SurroundShipBasicRule() { - super("Surround Ship", + super("BTSP-BASC-0005", + "Surround Ship", "", "edu/rpi/legup/images/battleship/rules/SurroundShip.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooFewInFleetContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooFewInFleetContradictionRule.java index 3dc82d4a2..5a4eb187e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooFewInFleetContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooFewInFleetContradictionRule.java @@ -7,7 +7,8 @@ public class TooFewInFleetContradictionRule extends ContradictionRule { public TooFewInFleetContradictionRule() { - super("Too Few in Fleet", + super("BTSP-CONT-0003", + "Too Few in Fleet", "", "edu/rpi/legup/images/battleship/contradictions/too_few_in_fleet.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooFewRowColContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooFewRowColContradictionRule.java index 168228b97..7c2fa7819 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooFewRowColContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooFewRowColContradictionRule.java @@ -7,7 +7,8 @@ public class TooFewRowColContradictionRule extends ContradictionRule { public TooFewRowColContradictionRule() { - super("Too few in row/col", + super("BTSP-CONT-0004", + "Too few in row/col", "", "edu/rpi/legup/images/battleship/contradictions/too_few_segments.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooManyInFleetContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooManyInFleetContradictionRule.java index c7c28e543..3aad88613 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooManyInFleetContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooManyInFleetContradictionRule.java @@ -7,7 +7,8 @@ public class TooManyInFleetContradictionRule extends ContradictionRule { public TooManyInFleetContradictionRule() { - super("Too Many in Fleet", + super("BTSP-CONT-0005", + "Too Many in Fleet", "", "edu/rpi/legup/images/battleship/contradictions/too_many_in_fleet.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooManyRowColContradiction.java b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooManyRowColContradiction.java index 33f64c1aa..0970c9c69 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooManyRowColContradiction.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/TooManyRowColContradiction.java @@ -7,7 +7,8 @@ public class TooManyRowColContradiction extends ContradictionRule { public TooManyRowColContradiction() { - super("Too Many row/col", + super("BTSP-CONT-0006", + "Too Many row/col", "", "edu/rpi/legup/images/battleship/contradictions/too_many_segments.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/rules/battleship_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/battleship_reference_sheet.txt new file mode 100644 index 000000000..216584ee5 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/rules/battleship_reference_sheet.txt @@ -0,0 +1,17 @@ +BTSP-BASC-0001 : ContinueShipBasicRule +BTSP-BASC-0002 : FinishedWithShipsBasicRule +BTSP-BASC-0003 : FinishWithWaterBasicRule +BTSP-BASC-0004 : SegmentTypeBasicRule +BTSP-BASC-0005 : SurroundShipBasicRule + +BTSP-CONT-0001 : AdjacentShipsContradictionRule +BTSP-CONT-0002 : IncompleteShipContradictionRule +BTSP-CONT-0003 : TooFewInFleetContradictionRule +BTSP-CONT-0004 : TooFewRowColContradictionRule +BTSP-CONT-0005 : TooManyInFleetContradictionRule +BTSP-CONT-0006 : TooManyRowColContradiction + +BTSP-CASE-0001 : SegmentTypeCaseRule +BTSP-CASE-0002 : ShipLocationCaseRule +BTSP-CASE-0003 : ShipOrWaterCaseRule + From 8d367a69e5b91c7f553f62b848e55e72489c6a34 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 23 Dec 2021 13:31:55 -0500 Subject: [PATCH 07/32] Assigned Fillapix IDs --- .../legup/puzzle/fillapix/rules/BlackOrWhiteCaseRule.java | 3 ++- .../puzzle/fillapix/rules/FinishWithBlackBasicRule.java | 3 ++- .../puzzle/fillapix/rules/FinishWithWhiteBasicRule.java | 3 ++- .../fillapix/rules/TooFewBlackCellsContradictionRule.java | 3 ++- .../fillapix/rules/TooManyBlackCellsContradictionRule.java | 3 ++- .../puzzle/fillapix/rules/fillapix_reference_sheet.txt | 7 +++++++ 6 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 src/main/java/edu/rpi/legup/puzzle/fillapix/rules/fillapix_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/BlackOrWhiteCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/BlackOrWhiteCaseRule.java index 7d37a3c76..85a786052 100644 --- a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/BlackOrWhiteCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/BlackOrWhiteCaseRule.java @@ -14,7 +14,8 @@ public class BlackOrWhiteCaseRule extends CaseRule { public BlackOrWhiteCaseRule() { - super("Black or White", + super("FPIX-CASE-0001", + "Black or White", "Each cell is either black or white.", "edu/rpi/legup/images/fillapix/cases/BlackOrWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/FinishWithBlackBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/FinishWithBlackBasicRule.java index e39fbd9ca..9b94445bc 100644 --- a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/FinishWithBlackBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/FinishWithBlackBasicRule.java @@ -11,7 +11,8 @@ public class FinishWithBlackBasicRule extends BasicRule { public FinishWithBlackBasicRule() { - super("Finish with Black", + super("FPIX-BASC-0001", + "Finish with Black", "The remaining unknowns around and on a cell must be black to satisfy the number", "edu/rpi/legup/images/fillapix/rules/FinishWithBlack.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/FinishWithWhiteBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/FinishWithWhiteBasicRule.java index 0fbc3826f..6e835d638 100644 --- a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/FinishWithWhiteBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/FinishWithWhiteBasicRule.java @@ -11,7 +11,8 @@ public class FinishWithWhiteBasicRule extends BasicRule { public FinishWithWhiteBasicRule() { - super("Finish with White", + super("FinishWithWhiteBasicRule", + "Finish with White", "The remaining unknowns around and on a cell must be white to satisfy the number", "edu/rpi/legup/images/fillapix/rules/FinishWithWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/TooFewBlackCellsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/TooFewBlackCellsContradictionRule.java index 0a3b68e2b..6304ed72b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/TooFewBlackCellsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/TooFewBlackCellsContradictionRule.java @@ -12,7 +12,8 @@ public class TooFewBlackCellsContradictionRule extends ContradictionRule { public TooFewBlackCellsContradictionRule() { - super("Too Few Black Cells", + super("FPIX-CONT-0001", + "Too Few Black Cells", "There may not be fewer black cells than the number.", "edu/rpi/legup/images/fillapix/contradictions/TooFewBlackCells.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/TooManyBlackCellsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/TooManyBlackCellsContradictionRule.java index b4cd2c31b..870b0bd38 100644 --- a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/TooManyBlackCellsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/TooManyBlackCellsContradictionRule.java @@ -12,7 +12,8 @@ public class TooManyBlackCellsContradictionRule extends ContradictionRule { public TooManyBlackCellsContradictionRule() { - super("Too Many Black Cells", + super("FPIX-CONT-0002", + "Too Many Black Cells", "There may not be more black cells than the number", "edu/rpi/legup/images/fillapix/contradictions/TooManyBlackCells.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/fillapix_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/fillapix_reference_sheet.txt new file mode 100644 index 000000000..eee67639a --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/rules/fillapix_reference_sheet.txt @@ -0,0 +1,7 @@ +FPIX-BASC-0001 : FinishWithBlackBasicRule +FPIX-BASC-0002 : FinishWithWhiteBasicRule + +FPIX-CONT-0001 : TooFewBlackCellsContradictionRule +FPIX-CONT-0002 : TooManyBlackCellsContradictionRule + +FPIX-CASE-0001 : BlackOrWhiteCaseRule \ No newline at end of file From 82239546dc977b02fd5d9292fdd06c54827cfcb0 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 5 Mar 2022 20:43:09 -0500 Subject: [PATCH 08/32] Create heyawake_reference_sheet.txt --- .../rules/heyawake_reference_sheet.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/java/edu/rpi/legup/puzzle/heyawake/rules/heyawake_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/heyawake_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/heyawake_reference_sheet.txt new file mode 100644 index 000000000..87b263fbc --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/heyawake_reference_sheet.txt @@ -0,0 +1,19 @@ +HEYA-BASC-0001 : BlackBetweenRegionsBasicRule +HEYA-BASC-0002 : BlackBottleNeckBasicRule +HEYA-BASC-0003 : CornerBlackBasicRule +HEYA-BASC-0004 : FillInBlackBasicRule +HEYA-BASC-0005 : FillInWhiteBasicRule +HEYA-BASC-0006 : PreventBlackSquareBasicRule +HEYA-BASC-0007 : SurroundRegionBasicRule +HEYA-BASC-0008 : UnreachableBasicRule +HEYA-BASC-0009 : WhiteBottleNeckBasicRule + +HEYA-CONT-0001 : BlackSquareContradictionRule +HEYA-CONT-0002 : CantReachWhiteContradictionRule +HEYA-CONT-0003 : IsolateBlackContradictionRule +HEYA-CONT-0004 : MultipleNumbersContradictionRule +HEYA-CONT-0005 : NoNumberContradictionRule +HEYA-CONT-0006 : TooFewSpacesContradictionRule +HEYA-CONT-0007 : TooManySpacesContradictionRule + +HEYA-CASE-0001 : BlackOrWhiteCaseRule \ No newline at end of file From 7c9b4bb409ff649ad1b5606ca5a4cab29cbd20fa Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 5 Mar 2022 21:00:09 -0500 Subject: [PATCH 09/32] Added IDs --- .../AdjacentBlacksContradictionRule.java | 2 +- .../heyawake/rules/BlackOrWhiteCaseRule.java | 2 +- .../heyawake/rules/BlackPathBasicRule.java | 4 +++ .../heyawake/rules/BottleNeckBasicRule.java | 7 +++- .../rules/FillRoomBlackBasicRule.java | 2 +- .../rules/FillRoomWhiteBasicRule.java | 2 +- .../heyawake/rules/OneRowBasicRule.java | 7 +++- .../rules/PreventWhiteLineBasicRule.java | 7 +++- .../rules/RoomTooEmptyContradictionRule.java | 2 +- .../rules/RoomTooFullContradictionRule.java | 2 +- .../heyawake/rules/ThreeByThreeBasicRule.java | 7 +++- .../heyawake/rules/TwoInCornerBasicRule.java | 7 +++- .../rules/WhiteAreaContradictionRule.java | 2 +- .../rules/WhiteAroundBlackBasicRule.java | 2 +- .../heyawake/rules/WhiteEscapeBasicRule.java | 7 +++- .../rules/WhiteLineContradictionRule.java | 2 +- .../puzzle/heyawake/rules/ZigZagCaseRule.java | 7 +++- .../heyawake/rules/ZigZagWhiteBasicRule.java | 7 +++- .../rules/heyawake_reference_sheet.txt | 35 ++++++++++--------- 19 files changed, 79 insertions(+), 34 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/AdjacentBlacksContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/AdjacentBlacksContradictionRule.java index 7736766b2..d2eceb7a1 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/AdjacentBlacksContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/AdjacentBlacksContradictionRule.java @@ -7,7 +7,7 @@ public class AdjacentBlacksContradictionRule extends ContradictionRule { public AdjacentBlacksContradictionRule() { - super("Adjacent Blacks", + super("HEYA-CONT-0001", "Adjacent Blacks", "", "edu/rpi/legup/images/heyawake/contradictions/adjacentBlacks.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BlackOrWhiteCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BlackOrWhiteCaseRule.java index 2dff16ab9..147c07e9b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BlackOrWhiteCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BlackOrWhiteCaseRule.java @@ -11,7 +11,7 @@ public class BlackOrWhiteCaseRule extends CaseRule { public BlackOrWhiteCaseRule() { - super("Black or White", + super("HEYA-CASE-0001", "Black or White", "", "edu/rpi/legup/images/heyawake/cases/BlackOrWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BlackPathBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BlackPathBasicRule.java index 6f1745f81..9c656498c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BlackPathBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BlackPathBasicRule.java @@ -1,4 +1,8 @@ package edu.rpi.legup.puzzle.heyawake.rules; public class BlackPathBasicRule { + public BlackPathBasicRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BottleNeckBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BottleNeckBasicRule.java index 6f3d761a8..65d4919f0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BottleNeckBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/BottleNeckBasicRule.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.heyawake.rules; -public class BottleNeckBasicRule { +public class BottleNeckBasicRule +{ + public BottleNeckBasicRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/FillRoomBlackBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/FillRoomBlackBasicRule.java index 13f4bfc18..7820854ac 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/FillRoomBlackBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/FillRoomBlackBasicRule.java @@ -9,7 +9,7 @@ public class FillRoomBlackBasicRule extends BasicRule { public FillRoomBlackBasicRule() { - super("Fill Room Black", + super("HEYA-BASC-0003", "Fill Room Black", "", "edu/rpi/legup/images/heyawake/rules/FillRoomBlack.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/FillRoomWhiteBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/FillRoomWhiteBasicRule.java index e4480d77f..d804208d2 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/FillRoomWhiteBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/FillRoomWhiteBasicRule.java @@ -9,7 +9,7 @@ public class FillRoomWhiteBasicRule extends BasicRule { public FillRoomWhiteBasicRule() { - super("Fill Room White", + super("HEYA-BASC-0004", "Fill Room White", "", "edu/rpi/legup/images/heyawake/rules/FillRoomWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/OneRowBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/OneRowBasicRule.java index 148cf04c1..201cd8816 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/OneRowBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/OneRowBasicRule.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.heyawake.rules; -public class OneRowBasicRule { +public class OneRowBasicRule +{ + public OneRowBasicRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/PreventWhiteLineBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/PreventWhiteLineBasicRule.java index bb1c14cbd..5620ac457 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/PreventWhiteLineBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/PreventWhiteLineBasicRule.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.heyawake.rules; -public class PreventWhiteLineBasicRule { +public class PreventWhiteLineBasicRule +{ + public PreventWhiteLineBasicRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/RoomTooEmptyContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/RoomTooEmptyContradictionRule.java index 5da8885ed..3054033aa 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/RoomTooEmptyContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/RoomTooEmptyContradictionRule.java @@ -7,7 +7,7 @@ public class RoomTooEmptyContradictionRule extends ContradictionRule { public RoomTooEmptyContradictionRule() { - super("Room too Empty", + super("HEYA-CONT-0002", "Room too Empty", "", "edu/rpi/legup/images/heyawake/contradictions/RoomTooEmpty.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/RoomTooFullContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/RoomTooFullContradictionRule.java index 7cf493364..363f577c6 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/RoomTooFullContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/RoomTooFullContradictionRule.java @@ -7,7 +7,7 @@ public class RoomTooFullContradictionRule extends ContradictionRule { public RoomTooFullContradictionRule() { - super("Room too Full", + super("HEYA-CONT-0003", "Room too Full", "", "edu/rpi/legup/images/heyawake/contradictions/RoomTooFull.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ThreeByThreeBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ThreeByThreeBasicRule.java index b3329c486..54328de8b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ThreeByThreeBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ThreeByThreeBasicRule.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.heyawake.rules; -public class ThreeByThreeBasicRule { +public class ThreeByThreeBasicRule +{ + public ThreeByThreeBasicRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/TwoInCornerBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/TwoInCornerBasicRule.java index 461f33636..096273bc1 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/TwoInCornerBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/TwoInCornerBasicRule.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.heyawake.rules; -public class TwoInCornerBasicRule { +public class TwoInCornerBasicRule +{ + public TwoInCornerBasicRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteAreaContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteAreaContradictionRule.java index aef860576..2cfb0aaba 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteAreaContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteAreaContradictionRule.java @@ -7,7 +7,7 @@ public class WhiteAreaContradictionRule extends ContradictionRule { public WhiteAreaContradictionRule() { - super("White Area", + super("HEYA-CONT-0004", "White Area", "", "edu/rpi/legup/images/heyawake/contradictions/WhiteArea.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteAroundBlackBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteAroundBlackBasicRule.java index 3f3786fdd..eead60aee 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteAroundBlackBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteAroundBlackBasicRule.java @@ -9,7 +9,7 @@ public class WhiteAroundBlackBasicRule extends BasicRule { public WhiteAroundBlackBasicRule() { - super("White Around Black", + super("HEYA-BASC-0009", "White Around Black", "", "edu/rpi/legup/images/heyawake/rules/WhiteAroundBlack.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteEscapeBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteEscapeBasicRule.java index b69dad3f7..0a4a5fe1f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteEscapeBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteEscapeBasicRule.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.heyawake.rules; -public class WhiteEscapeBasicRule { +public class WhiteEscapeBasicRule +{ + public WhiteEscapeBasicRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteLineContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteLineContradictionRule.java index 55cdff6ac..f0336d79d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteLineContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/WhiteLineContradictionRule.java @@ -7,7 +7,7 @@ public class WhiteLineContradictionRule extends ContradictionRule { public WhiteLineContradictionRule() { - super("White Line", + super("HEYA-CONT-0005", "White Line", "", "edu/rpi/legup/images/heyawake/contradictions/WhiteLine.png"); diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ZigZagCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ZigZagCaseRule.java index 8f703dbac..8e553e623 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ZigZagCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ZigZagCaseRule.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.heyawake.rules; -public class ZigZagCaseRule { +public class ZigZagCaseRule +{ + public ZigZagCaseRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ZigZagWhiteBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ZigZagWhiteBasicRule.java index ffc3cba6a..7628116f4 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ZigZagWhiteBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/ZigZagWhiteBasicRule.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.heyawake.rules; -public class ZigZagWhiteBasicRule { +public class ZigZagWhiteBasicRule +{ + public ZigZagWhiteBasicRule() + { + throw new RuntimeException("This rule has not been implemented"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/heyawake_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/heyawake_reference_sheet.txt index 87b263fbc..5e05fbf56 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/heyawake_reference_sheet.txt +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/rules/heyawake_reference_sheet.txt @@ -1,19 +1,20 @@ -HEYA-BASC-0001 : BlackBetweenRegionsBasicRule -HEYA-BASC-0002 : BlackBottleNeckBasicRule -HEYA-BASC-0003 : CornerBlackBasicRule -HEYA-BASC-0004 : FillInBlackBasicRule -HEYA-BASC-0005 : FillInWhiteBasicRule -HEYA-BASC-0006 : PreventBlackSquareBasicRule -HEYA-BASC-0007 : SurroundRegionBasicRule -HEYA-BASC-0008 : UnreachableBasicRule -HEYA-BASC-0009 : WhiteBottleNeckBasicRule +HEYA-BASC-0001 : BlackPathBasicRule +HEYA-BASC-0002 : BottleNeckBasicRule +HEYA-BASC-0003 : FillRoomBlackBasicRule +HEYA-BASC-0004 : FillRoomWhiteBasicRule +HEYA-BASC-0005 : OneRowBasicRule +HEYA-BASC-0006 : PreventWhiteLineBasicRule +HEYA-BASC-0007 : ThreeByThreeBasicRule +HEYA-BASC-0008 : TwoInCornerBasicRule +HEYA-BASC-0009 : WhiteAroundBlackBasicRule +HEYA-BASC-0010 : WhiteEscapeBasicRule +HEYA-BASC-0011 : ZigZagWhiteBasicRule -HEYA-CONT-0001 : BlackSquareContradictionRule -HEYA-CONT-0002 : CantReachWhiteContradictionRule -HEYA-CONT-0003 : IsolateBlackContradictionRule -HEYA-CONT-0004 : MultipleNumbersContradictionRule -HEYA-CONT-0005 : NoNumberContradictionRule -HEYA-CONT-0006 : TooFewSpacesContradictionRule -HEYA-CONT-0007 : TooManySpacesContradictionRule +HEYA-CONT-0001 : AdjacentBlacksContradictionRule +HEYA-CONT-0002 : RoomTooEmptyContradictionRule +HEYA-CONT-0003 : RoomTooFullContradictionRule +HEYA-CONT-0004 : WhiteAreaContradictionRule +HEYA-CONT-0005 : WhiteLineContradictionRule -HEYA-CASE-0001 : BlackOrWhiteCaseRule \ No newline at end of file +HEYA-CASE-0001 : BlackOrWhiteCaseRule +HEYA-CASE-0002 : ZigZagCaseRule \ No newline at end of file From d1381ff0c382ce2d0c3c32d1e7421366f2ce3567 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 6 Mar 2022 16:57:03 -0500 Subject: [PATCH 10/32] Create masyu_reference_sheet.txt --- .../masyu/rules/masyu_reference_sheet.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/java/edu/rpi/legup/puzzle/masyu/rules/masyu_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/masyu_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/masyu_reference_sheet.txt new file mode 100644 index 000000000..a55042bcc --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/masyu_reference_sheet.txt @@ -0,0 +1,17 @@ +MASY-BASC-0001 : BlackEdgeBasicRule +MASY-BASC-0002 : BlockedBlackBasicRule +MASY-BASC-0003 : ConnectedCellsBasicRule +MASY-BASC-0004 : FinishPathBasicRule +MASY-BASC-0005 : NearWhiteBasicRule +MASY-BASC-0006 : OnlyOneChoiceBasicRule +MASY-BASC-0007 : WhiteEdgeBasicRule + +MASY-CONT-0001 : BadLoopingContradictionRule +MASY-CONT-0002 : BlackContradictionRule +MASY-CONT-0003 : NoOptionsContradictionRule +MASY-CONT-0004 : OnlyTwoContradictionRule +MASY-CONT-0005 : WhiteContradictionRule + +MASY-CASE-0001 : BlackSplitCaseRule +MASY-CASE-0002 : NormalSplitCaseRule +MASY-CASE-0003 : WhiteSplitCaseRule \ No newline at end of file From 1a4e1579d158f3354f9f8e6170954d5218952eac Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 6 Mar 2022 17:26:14 -0500 Subject: [PATCH 11/32] Added Masyu IDs --- .../legup/puzzle/masyu/rules/BadLoopingContradictionRule.java | 2 +- .../edu/rpi/legup/puzzle/masyu/rules/BlackEdgeBasicRule.java | 2 +- .../edu/rpi/legup/puzzle/masyu/rules/BlackSplitCaseRule.java | 2 +- .../edu/rpi/legup/puzzle/masyu/rules/BlockedBlackBasicRule.java | 2 +- .../rpi/legup/puzzle/masyu/rules/ConnectedCellsBasicRule.java | 2 +- .../edu/rpi/legup/puzzle/masyu/rules/FinishPathBasicRule.java | 2 +- .../edu/rpi/legup/puzzle/masyu/rules/NearWhiteBasicRule.java | 2 +- .../legup/puzzle/masyu/rules/NoOptionsContradictionRule.java | 2 +- .../edu/rpi/legup/puzzle/masyu/rules/NormalSplitCaseRule.java | 2 +- .../rpi/legup/puzzle/masyu/rules/OnlyOneChoiceBasicRule.java | 2 +- .../rpi/legup/puzzle/masyu/rules/OnlyTwoContradictionRule.java | 2 +- .../rpi/legup/puzzle/masyu/rules/WhiteContradictionRule.java | 2 +- .../edu/rpi/legup/puzzle/masyu/rules/WhiteEdgeBasicRule.java | 2 +- .../edu/rpi/legup/puzzle/masyu/rules/WhiteSplitCaseRule.java | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BadLoopingContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BadLoopingContradictionRule.java index cddc9f180..0da4dffe2 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BadLoopingContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BadLoopingContradictionRule.java @@ -7,7 +7,7 @@ public class BadLoopingContradictionRule extends ContradictionRule { public BadLoopingContradictionRule() { - super("Bad Looping", + super("MASY-CONT-0001", "Bad Looping", "", "edu/rpi/legup/images/masyu/ContradictionBadLooping.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackEdgeBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackEdgeBasicRule.java index ba2494d55..761cec8d8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackEdgeBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackEdgeBasicRule.java @@ -9,7 +9,7 @@ public class BlackEdgeBasicRule extends BasicRule { public BlackEdgeBasicRule() { - super("Black Edge", + super("MASY-BASC-0001", "Black Edge", "", "edu/rpi/legup/images/masyu/RuleBlackEdge.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackSplitCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackSplitCaseRule.java index 72194ee3b..3db89ef58 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackSplitCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackSplitCaseRule.java @@ -11,7 +11,7 @@ public class BlackSplitCaseRule extends CaseRule { public BlackSplitCaseRule() { - super("Black Split", + super("MASY-CASE-0001", "Black Split", "", "edu/rpi/legup/images/masyu/CaseBlackSplit.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlockedBlackBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlockedBlackBasicRule.java index 9f8829871..85e136210 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlockedBlackBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlockedBlackBasicRule.java @@ -9,7 +9,7 @@ public class BlockedBlackBasicRule extends BasicRule { public BlockedBlackBasicRule() { - super("Blocked Black", + super("MASY-BASC-0002","Blocked Black", "", "edu/rpi/legup/images/masyu/RuleBlockedBlack.gif"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/ConnectedCellsBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/ConnectedCellsBasicRule.java index ead21852a..b7174c209 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/ConnectedCellsBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/ConnectedCellsBasicRule.java @@ -9,7 +9,7 @@ public class ConnectedCellsBasicRule extends BasicRule { public ConnectedCellsBasicRule() { - super("Connected Cells", + super("MASY-BASC-0003", "Connected Cells", "", "edu/rpi/legup/images/masyu/RuleConnectedCells.gif"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/FinishPathBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/FinishPathBasicRule.java index ef0964238..3c2a00d4b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/FinishPathBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/FinishPathBasicRule.java @@ -9,7 +9,7 @@ public class FinishPathBasicRule extends BasicRule { public FinishPathBasicRule() { - super("Finished Path", + super("MASY-BASC-0004", "Finished Path", "", "edu/rpi/legup/images/masyu/RuleFinishPath.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NearWhiteBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NearWhiteBasicRule.java index 10653f1f1..e1d2bec67 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NearWhiteBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NearWhiteBasicRule.java @@ -9,7 +9,7 @@ public class NearWhiteBasicRule extends BasicRule { public NearWhiteBasicRule() { - super("Near White", + super("MASY-BASC-0005", "Near White", "", "edu/rpi/legup/images/masyu/RuleNearWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NoOptionsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NoOptionsContradictionRule.java index 8096bc553..84522d8ac 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NoOptionsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NoOptionsContradictionRule.java @@ -7,7 +7,7 @@ public class NoOptionsContradictionRule extends ContradictionRule { public NoOptionsContradictionRule() { - super("No Options", + super("MASY-CONT-0003","No Options", "", "edu/rpi/legup/images/masyu/ContradictionNoOptions.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NormalSplitCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NormalSplitCaseRule.java index bf38654f4..ab47adc1b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NormalSplitCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/NormalSplitCaseRule.java @@ -11,7 +11,7 @@ public class NormalSplitCaseRule extends CaseRule { public NormalSplitCaseRule() { - super("Normal Split", + super("MASY-CASE-0002", "Normal Split", "", "edu/rpi/legup/images/masyu/CaseNormalSplit.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/OnlyOneChoiceBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/OnlyOneChoiceBasicRule.java index b55259e1b..6c657e16d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/OnlyOneChoiceBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/OnlyOneChoiceBasicRule.java @@ -9,7 +9,7 @@ public class OnlyOneChoiceBasicRule extends BasicRule { public OnlyOneChoiceBasicRule() { - super("Only One Choice", + super("MASY-BASC-0006", "Only One Choice", "", "edu/rpi/legup/images/masyu/RuleOnlyOneChoice.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/OnlyTwoContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/OnlyTwoContradictionRule.java index c881ec5bc..ab587a0ec 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/OnlyTwoContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/OnlyTwoContradictionRule.java @@ -7,7 +7,7 @@ public class OnlyTwoContradictionRule extends ContradictionRule { public OnlyTwoContradictionRule() { - super("Only Two", + super("MASY-CONT-0004", "Only Two", "", "edu/rpi/legup/images/masyu/ContradictionOnly2.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteContradictionRule.java index 1606cfa34..091c2b039 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteContradictionRule.java @@ -7,7 +7,7 @@ public class WhiteContradictionRule extends ContradictionRule { public WhiteContradictionRule() { - super("White", + super("MASY-CONT-0005", "White", "", "edu/rpi/legup/images/masyu/ContradictionWhite.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteEdgeBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteEdgeBasicRule.java index cb9cd5267..3e8731e85 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteEdgeBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteEdgeBasicRule.java @@ -8,7 +8,7 @@ public class WhiteEdgeBasicRule extends BasicRule { public WhiteEdgeBasicRule() { - super("White Edge", + super("MASY-BASC-0007", "White Edge", "", "edu/rpi/legup/images/masyu/RuleWhiteEdge.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteSplitCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteSplitCaseRule.java index cdc9c2334..765a13f25 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteSplitCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/WhiteSplitCaseRule.java @@ -11,7 +11,7 @@ public class WhiteSplitCaseRule extends CaseRule { public WhiteSplitCaseRule() { - super("White Split", + super("MASY-CASE-0003","White Split", "", "edu/rpi/legup/images/masyu/CaseWhiteSplit.png"); } From 9d5143274e2f0d6139cfcaea224387e5a5751c26 Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 6 Mar 2022 17:28:17 -0500 Subject: [PATCH 12/32] Update BlackContradictionRule.java --- .../rpi/legup/puzzle/masyu/rules/BlackContradictionRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackContradictionRule.java index b30759ab6..b4d32a46a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/rules/BlackContradictionRule.java @@ -7,7 +7,7 @@ public class BlackContradictionRule extends ContradictionRule { public BlackContradictionRule() { - super("Black", + super("MASY-CONT-0002", "Black", "", "edu/rpi/legup/images/masyu/ContradictionBlack.png"); } From 36eb2cf815e2c9a8d8e37489359f68b4b30c83f8 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 14:03:47 -0500 Subject: [PATCH 13/32] Create lightup_reference_sheet.txt --- .../lightup/rules/lightup_reference_sheet.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/java/edu/rpi/legup/puzzle/lightup/rules/lightup_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/lightup_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/lightup_reference_sheet.txt new file mode 100644 index 000000000..a560b824e --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/lightup_reference_sheet.txt @@ -0,0 +1,14 @@ +LTUP-BASC-0001 : BulbsOutsideDiagonalBasicRule +LTUP-BASC-0002 : EmptyCellInLightBasicRule +LTUP-BASC-0003 : EmptyCornersBasicRule +LTUP-BASC-0004 : FinishWithBulbsBasicRule +LTUP-BASC-0005 : FinishWithEmptyBasicRule +LTUP-BASC-0006 : MustLightBasicRule + +LTUP-CONT-0001 : BulbsInPathContradictionRule +LTUP-CONT-0002 : CannotLightACellContradictionRule +LTUP-CONT-0003 : TooFewBulbsContradictionRule +LTUP-CONT-0004 : TooManyBulbsContradictionRule + +LTUP-CASE-0001 : LightOrEmptyCaseRule +LTUP-CASE-0002 : SatisfyNumberCaseRule \ No newline at end of file From 9e4b7d5704a4d3f25b1e823a534b36441b485dad Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 14:06:52 -0500 Subject: [PATCH 14/32] Assigned IDs to Nurikabe classes --- .../puzzle/lightup/rules/BulbsInPathContradictionRule.java | 2 +- .../puzzle/lightup/rules/BulbsOutsideDiagonalBasicRule.java | 2 +- .../puzzle/lightup/rules/CannotLightACellContradictionRule.java | 2 +- .../legup/puzzle/lightup/rules/EmptyCellinLightBasicRule.java | 2 +- .../rpi/legup/puzzle/lightup/rules/EmptyCornersBasicRule.java | 2 +- .../legup/puzzle/lightup/rules/FinishWithBulbsBasicRule.java | 2 +- .../legup/puzzle/lightup/rules/FinishWithEmptyBasicRule.java | 2 +- .../rpi/legup/puzzle/lightup/rules/LightOrEmptyCaseRule.java | 2 +- .../edu/rpi/legup/puzzle/lightup/rules/MustLightBasicRule.java | 2 +- .../rpi/legup/puzzle/lightup/rules/SatisfyNumberCaseRule.java | 2 +- .../puzzle/lightup/rules/TooFewBulbsContradictionRule.java | 2 +- .../puzzle/lightup/rules/TooManyBulbsContradictionRule.java | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/BulbsInPathContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/BulbsInPathContradictionRule.java index 93e7ff03e..523d85954 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/BulbsInPathContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/BulbsInPathContradictionRule.java @@ -12,7 +12,7 @@ public class BulbsInPathContradictionRule extends ContradictionRule { public BulbsInPathContradictionRule() { - super("Bulbs In Path", + super("LTUP-CONT-0001","Bulbs In Path", "A bulb cannot be placed in another bulb's path.", "edu/rpi/legup/images/lightup/contradictions/BulbsInPath.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/BulbsOutsideDiagonalBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/BulbsOutsideDiagonalBasicRule.java index fd3804d2a..4a5e73f47 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/BulbsOutsideDiagonalBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/BulbsOutsideDiagonalBasicRule.java @@ -9,7 +9,7 @@ public class BulbsOutsideDiagonalBasicRule extends BasicRule { public BulbsOutsideDiagonalBasicRule() { - super("Bulbs Outside Diagonal", + super("LTUP-BASC-0001", "Bulbs Outside Diagonal", "Cells on the external edges of a 3 diagonal to a numerical block must be bulbs.", "edu/rpi/legup/images/lightup/rules/BulbsOutsideDiagonal.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/CannotLightACellContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/CannotLightACellContradictionRule.java index 88d2f8788..44533f691 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/CannotLightACellContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/CannotLightACellContradictionRule.java @@ -12,7 +12,7 @@ public class CannotLightACellContradictionRule extends ContradictionRule { public CannotLightACellContradictionRule() { - super("Cannot Light A Cell", + super("LTUP-CONT-0002", "Cannot Light A Cell", "All cells must be able to be lit.", "edu/rpi/legup/images/lightup/contradictions/CannotLightACell.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/EmptyCellinLightBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/EmptyCellinLightBasicRule.java index b488b224b..6e1b64231 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/EmptyCellinLightBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/EmptyCellinLightBasicRule.java @@ -12,7 +12,7 @@ public class EmptyCellinLightBasicRule extends BasicRule { public EmptyCellinLightBasicRule() { - super("Empty Cells in Light", + super("LTUP-BASC-0002", "Empty Cells in Light", "Cells in light must be empty.", "edu/rpi/legup/images/lightup/rules/EmptyCellInLight.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/EmptyCornersBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/EmptyCornersBasicRule.java index 9aa3cb19b..1ca943f16 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/EmptyCornersBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/EmptyCornersBasicRule.java @@ -16,7 +16,7 @@ public class EmptyCornersBasicRule extends BasicRule { public EmptyCornersBasicRule() { - super("Empty Corners", + super("LTUP-BASC-0003", "Empty Corners", "Cells on the corners of a number must be empty if placing bulbs would prevent the number from being satisfied.", "edu/rpi/legup/images/lightup/rules/EmptyCorners.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithBulbsBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithBulbsBasicRule.java index e378812eb..c6ff1dfda 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithBulbsBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithBulbsBasicRule.java @@ -14,7 +14,7 @@ public class FinishWithBulbsBasicRule extends BasicRule { public FinishWithBulbsBasicRule() { - super("Finish with Bulbs", + super("LTUP-BASC-0004", "Finish with Bulbs", "The remaining unknowns around a block must be bulbs to satisfy the number.", "edu/rpi/legup/images/lightup/rules/FinishWithBulbs.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithEmptyBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithEmptyBasicRule.java index bbd68ec1e..348410f0a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithEmptyBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithEmptyBasicRule.java @@ -14,7 +14,7 @@ public class FinishWithEmptyBasicRule extends BasicRule { public FinishWithEmptyBasicRule() { - super("Finish with Empty", + super("LTUP-BASC-0005", "Finish with Empty", "The remaining unknowns around a block must be empty if the number is satisfied.", "edu/rpi/legup/images/lightup/rules/FinishWithEmpty.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/LightOrEmptyCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/LightOrEmptyCaseRule.java index 2dc7df88f..43337b405 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/LightOrEmptyCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/LightOrEmptyCaseRule.java @@ -15,7 +15,7 @@ public class LightOrEmptyCaseRule extends CaseRule { public LightOrEmptyCaseRule() { - super("Light or Empty", + super("LTUP-CASE-0001", "Light or Empty", "Each blank cell is either a light or empty.", "edu/rpi/legup/images/lightup/cases/LightOrEmpty.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/MustLightBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/MustLightBasicRule.java index f545a80c1..fdc64587d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/MustLightBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/MustLightBasicRule.java @@ -14,7 +14,7 @@ public class MustLightBasicRule extends BasicRule { public MustLightBasicRule() { - super("Must Light", + super("LTUP-BASC-0006", "Must Light", "A cell must be a bulb if it is the only cell to be able to light another.", "edu/rpi/legup/images/lightup/rules/MustLight.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/SatisfyNumberCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/SatisfyNumberCaseRule.java index 5f9d84287..1510cc567 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/SatisfyNumberCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/SatisfyNumberCaseRule.java @@ -19,7 +19,7 @@ public class SatisfyNumberCaseRule extends CaseRule { public SatisfyNumberCaseRule() { - super("Satisfy Number", + super("LTUP-CASE-0002", "Satisfy Number", "The different ways a blocks number can be satisfied.", "edu/rpi/legup/images/lightup/cases/SatisfyNumber.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/TooFewBulbsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/TooFewBulbsContradictionRule.java index 329b08e42..0454d7eca 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/TooFewBulbsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/TooFewBulbsContradictionRule.java @@ -12,7 +12,7 @@ public class TooFewBulbsContradictionRule extends ContradictionRule { public TooFewBulbsContradictionRule() { - super("Too Few Bulbs", + super("LTUP-CONT-0003", "Too Few Bulbs", "There cannot be less bulbs around a block than its number states.", "edu/rpi/legup/images/lightup/contradictions/TooFewBulbs.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/TooManyBulbsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/TooManyBulbsContradictionRule.java index 658d016a0..98fc5c4bc 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/TooManyBulbsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/TooManyBulbsContradictionRule.java @@ -12,7 +12,7 @@ public class TooManyBulbsContradictionRule extends ContradictionRule { public TooManyBulbsContradictionRule() { - super("Too Many Bulbs", + super("LTUP-CONT-0004", "Too Many Bulbs", "There cannot be more bulbs around a block than its number states.", "edu/rpi/legup/images/lightup/contradictions/TooManyBulbs.png"); } From 9553c8a26d293050c3c451a402c675aac90640bf Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 14:17:55 -0500 Subject: [PATCH 15/32] Create skyscrapers_reference_sheet.txt --- .../rules/skyscrapers_reference_sheet.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/skyscrapers_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/skyscrapers_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/skyscrapers_reference_sheet.txt new file mode 100644 index 000000000..083315bd1 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/skyscrapers_reference_sheet.txt @@ -0,0 +1,12 @@ +SKYS-BASC-0001 : FixedMaxBasicRule +SKYS-BASC-0001 : LastCellBasicRule +SKYS-BASC-0001 : LastNUmberBasicRule +SKYS-BASC-0001 : NEdgeBasicRule +SKYS-BASC-0001 : OneEdgeBasicRule + +SKYS-CONT-0001 : DuplicateNumbersContradictionRule +SKYS-CONT-0001 : ExceedingVisibilityContradictionRule +SKYS-CONT-0001 : InsufficientVisibilityContradictionRule +SKYS-CONT-0001 : UnresolvedCellContradictionRule + +SKYS-CASE-0001 : PossibleContentsCaseRule \ No newline at end of file From c3cb7853b2c9018046bd4aa7b1dcb6fdb45a7d17 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 14:18:22 -0500 Subject: [PATCH 16/32] Update skyscrapers_reference_sheet.txt --- .../rules/skyscrapers_reference_sheet.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/skyscrapers_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/skyscrapers_reference_sheet.txt index 083315bd1..9f2dd700f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/skyscrapers_reference_sheet.txt +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/skyscrapers_reference_sheet.txt @@ -1,12 +1,12 @@ SKYS-BASC-0001 : FixedMaxBasicRule -SKYS-BASC-0001 : LastCellBasicRule -SKYS-BASC-0001 : LastNUmberBasicRule -SKYS-BASC-0001 : NEdgeBasicRule -SKYS-BASC-0001 : OneEdgeBasicRule +SKYS-BASC-0002 : LastCellBasicRule +SKYS-BASC-0003 : LastNUmberBasicRule +SKYS-BASC-0004 : NEdgeBasicRule +SKYS-BASC-0005 : OneEdgeBasicRule SKYS-CONT-0001 : DuplicateNumbersContradictionRule -SKYS-CONT-0001 : ExceedingVisibilityContradictionRule -SKYS-CONT-0001 : InsufficientVisibilityContradictionRule -SKYS-CONT-0001 : UnresolvedCellContradictionRule +SKYS-CONT-0002 : ExceedingVisibilityContradictionRule +SKYS-CONT-0003 : InsufficientVisibilityContradictionRule +SKYS-CONT-0004 : UnresolvedCellContradictionRule SKYS-CASE-0001 : PossibleContentsCaseRule \ No newline at end of file From 21fdcfc0180595b1872e81f0f2f12f788249bae1 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 14:20:52 -0500 Subject: [PATCH 17/32] Assigned Skyscraper IDs --- .../skyscrapers/rules/DuplicateNumberContradictionRule.java | 2 +- .../skyscrapers/rules/ExceedingVisibilityContradictionRule.java | 2 +- .../rpi/legup/puzzle/skyscrapers/rules/FixedMaxBasicRule.java | 2 +- .../rules/InsufficientVisibilityContradictionRule.java | 2 +- .../rpi/legup/puzzle/skyscrapers/rules/LastCellBasicRule.java | 2 +- .../rpi/legup/puzzle/skyscrapers/rules/LastNumberBasicRule.java | 2 +- .../edu/rpi/legup/puzzle/skyscrapers/rules/NEdgeBasicRule.java | 2 +- .../rpi/legup/puzzle/skyscrapers/rules/OneEdgeBasicRule.java | 2 +- .../puzzle/skyscrapers/rules/PossibleContentsCaseRule.java | 2 +- .../skyscrapers/rules/UnresolvedCellContradictionRule.java | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/DuplicateNumberContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/DuplicateNumberContradictionRule.java index 82f08ce32..005ab481b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/DuplicateNumberContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/DuplicateNumberContradictionRule.java @@ -14,7 +14,7 @@ public class DuplicateNumberContradictionRule extends ContradictionRule { public DuplicateNumberContradictionRule() { - super("Duplicate Number", + super("SKYS-CONT-0001", "Duplicate Number", "Skyscrapers of same height cannot be placed in the same row or column.", "edu/rpi/legup/images/skyscrapers/DuplicateNumber.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/ExceedingVisibilityContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/ExceedingVisibilityContradictionRule.java index 2e891d231..6e887e59a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/ExceedingVisibilityContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/ExceedingVisibilityContradictionRule.java @@ -14,7 +14,7 @@ public class ExceedingVisibilityContradictionRule extends ContradictionRule { public ExceedingVisibilityContradictionRule() { - super("Exceeding Visibility", + super("SKYS-CONT-0002", "Exceeding Visibility", "More skyscrapers are visible than there should be.", "edu/rpi/legup/images/skyscrapers/ExceedingVisibility.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/FixedMaxBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/FixedMaxBasicRule.java index 269bd5359..806743a8a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/FixedMaxBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/FixedMaxBasicRule.java @@ -17,7 +17,7 @@ public class FixedMaxBasicRule extends BasicRule { public FixedMaxBasicRule() { - super("Fixed Max", + super("SKYS-BASC-0001","Fixed Max", "If the sum of two opposing edges is n+1, the maximum number appears at a position k spaces away from the edge, where k is the number at that edge.", "edu/rpi/legup/images/skyscrapers/FixedMax.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/InsufficientVisibilityContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/InsufficientVisibilityContradictionRule.java index 452ea1cc5..0e5dedc3e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/InsufficientVisibilityContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/InsufficientVisibilityContradictionRule.java @@ -14,7 +14,7 @@ public class InsufficientVisibilityContradictionRule extends ContradictionRule { public InsufficientVisibilityContradictionRule() { - super("Insufficient Visibility", + super("SKYS-CONT-0003", "Insufficient Visibility", "Less skyscrapers are visible than there should be.", "edu/rpi/legup/images/skyscrapers/InsufficientVisibility.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastCellBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastCellBasicRule.java index fff63fb80..820c89140 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastCellBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastCellBasicRule.java @@ -17,7 +17,7 @@ public class LastCellBasicRule extends BasicRule { public LastCellBasicRule() { - super("Last Cell", + super("SKYS-BASC-0002", "Last Cell", "A certain number must go in a certain cell, because that cell is the last place that number can appear in that row/column.", "edu/rpi/legup/images/skyscrapers/LastCell.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastNumberBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastNumberBasicRule.java index 609fcb1b8..edacda26d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastNumberBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastNumberBasicRule.java @@ -17,7 +17,7 @@ public class LastNumberBasicRule extends BasicRule { public LastNumberBasicRule() { - super("Last Number", + super("SKYS-BASC-0003", "Last Number", "A certain cell must contain a certain number since that number is the only one that can possibly appear in that cell.", "edu/rpi/legup/images/skyscrapers/LastNumber.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/NEdgeBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/NEdgeBasicRule.java index f75953891..8a7ff0dbc 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/NEdgeBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/NEdgeBasicRule.java @@ -17,7 +17,7 @@ public class NEdgeBasicRule extends BasicRule { public NEdgeBasicRule() { - super("N Edge", + super("SKYS-BASC-0004", "N Edge", "If the maximum number appears on an edge, the row or column¡¯s numbers appear in ascending order, starting at that edge.", "edu/rpi/legup/images/skyscrapers/NEdge.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/OneEdgeBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/OneEdgeBasicRule.java index 012c67e42..3c14aa13a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/OneEdgeBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/OneEdgeBasicRule.java @@ -17,7 +17,7 @@ public class OneEdgeBasicRule extends BasicRule { public OneEdgeBasicRule() { - super("One Edge", + super("SKYS-BASC-0005", "One Edge", "If you have a 1 on an edge, put n in the adjacent square.", "edu/rpi/legup/images/skyscrapers/OneEdge.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/PossibleContentsCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/PossibleContentsCaseRule.java index 0b6b36d4d..7064a45c4 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/PossibleContentsCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/PossibleContentsCaseRule.java @@ -17,7 +17,7 @@ public class PossibleContentsCaseRule extends CaseRule { public PossibleContentsCaseRule() { - super("Possible Contents", + super("SKYS-CASE-0001", "Possible Contents", "Each blank cell is could have height of 1 to n.", "edu/rpi/legup/images/skyscrapers/PossibleContents.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/UnresolvedCellContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/UnresolvedCellContradictionRule.java index 699c7509e..1870f18ea 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/UnresolvedCellContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/UnresolvedCellContradictionRule.java @@ -14,7 +14,7 @@ public class UnresolvedCellContradictionRule extends ContradictionRule { public UnresolvedCellContradictionRule() { - super("Unresolved Cell", + super("SKYS-CONT-0004", "Unresolved Cell", "Elimination leaves no possible number for a cell.", "edu/rpi/legup/images/skyscrapers/UnresolvedCell.png"); } From 1496b6a7833e09a8c61947a0f5e1dadf08b67f26 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 18:12:58 -0500 Subject: [PATCH 18/32] Create sudoku_reference_sheet.txt --- .../legup/puzzle/sudoku/rules/sudoku_reference_sheet.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/main/java/edu/rpi/legup/puzzle/sudoku/rules/sudoku_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/sudoku_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/sudoku_reference_sheet.txt new file mode 100644 index 000000000..4b17b705a --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/sudoku_reference_sheet.txt @@ -0,0 +1,9 @@ +SUDO-BASC-0001 : AdvancedDeductionBasicRule +SUDO-BASC-0002 : LastCellForNumberBasicRule +SUDO-BASC-0003 : LastNumberForCellBasicRule + +SUDO-CONT-0001 : NoSolutionContradictionRule +SUDO-CONT-0002 : RepeatedNumberContradictionRule + +SUDO-CASE-0001 : PossibleCellCaseRule +SUDO-CASE-0002 : PossibleNumberCaseRule \ No newline at end of file From bb3a62736241c286cc7ed2e3688d4bda1cd26d02 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 18:15:59 -0500 Subject: [PATCH 19/32] Added Sudoku IDs --- .../legup/puzzle/sudoku/rules/AdvancedDeductionBasicRule.java | 2 +- .../legup/puzzle/sudoku/rules/LastCellForNumberBasicRule.java | 2 +- .../legup/puzzle/sudoku/rules/LastNumberForCellBasicRule.java | 2 +- .../legup/puzzle/sudoku/rules/NoSolutionContradictionRule.java | 2 +- .../edu/rpi/legup/puzzle/sudoku/rules/PossibleCellCaseRule.java | 2 +- .../rpi/legup/puzzle/sudoku/rules/PossibleNumberCaseRule.java | 2 +- .../puzzle/sudoku/rules/RepeatedNumberContradictionRule.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/AdvancedDeductionBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/AdvancedDeductionBasicRule.java index e3eed592f..fb2088208 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/AdvancedDeductionBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/AdvancedDeductionBasicRule.java @@ -11,7 +11,7 @@ public class AdvancedDeductionBasicRule extends BasicRule { public AdvancedDeductionBasicRule() { - super("Advanced Deduction", + super("SUDO-BASC-0001", "Advanced Deduction", "Use of group logic deduces more answers by means of forced by Location and forced by Deduction", "edu/rpi/legup/images/sudoku/AdvancedDeduction.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/LastCellForNumberBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/LastCellForNumberBasicRule.java index ae4d41437..b610fe469 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/LastCellForNumberBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/LastCellForNumberBasicRule.java @@ -12,7 +12,7 @@ public class LastCellForNumberBasicRule extends BasicRule { public LastCellForNumberBasicRule() { - super("Last Cell for Number", + super("SUDO-BASC-0002", "Last Cell for Number", "This is the only cell open in its group for some number.", "edu/rpi/legup/images/sudoku/forcedByElimination.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/LastNumberForCellBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/LastNumberForCellBasicRule.java index 110da2033..ab8771ea8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/LastNumberForCellBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/LastNumberForCellBasicRule.java @@ -13,7 +13,7 @@ public class LastNumberForCellBasicRule extends BasicRule { public LastNumberForCellBasicRule() { - super("Last Number for Cell", + super("SUDO-BASC-0003", "Last Number for Cell", "This is the only number left that can fit in the cell of a group.", "edu/rpi/legup/images/sudoku/forcedByDeduction.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoSolutionContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoSolutionContradictionRule.java index 589a13a2c..5c1494792 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoSolutionContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/NoSolutionContradictionRule.java @@ -12,7 +12,7 @@ public class NoSolutionContradictionRule extends ContradictionRule { public NoSolutionContradictionRule() { - super("No Solution for Cell", + super("SUDO-CONT-0001", "No Solution for Cell", "Process of elimination yields no valid numbers for an empty cell.", "edu/rpi/legup/images/sudoku/NoSolution.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/PossibleCellCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/PossibleCellCaseRule.java index 6bdacc376..373b60457 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/PossibleCellCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/PossibleCellCaseRule.java @@ -14,7 +14,7 @@ public class PossibleCellCaseRule extends CaseRule { public PossibleCellCaseRule() { - super("Possible Cells for Number", + super("SUDO-CASE-0001", "Possible Cells for Number", "A number has a limited set of cells in which it can be placed.", "edu/rpi/legup/images/sudoku/possible_cells_number.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/PossibleNumberCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/PossibleNumberCaseRule.java index bb684c5a2..7a726270e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/PossibleNumberCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/PossibleNumberCaseRule.java @@ -17,7 +17,7 @@ public class PossibleNumberCaseRule extends CaseRule { public PossibleNumberCaseRule() { - super("Possible Numbers for Cell", + super("SUDO-CASE-0002", "Possible Numbers for Cell", "An empty cell has a limited set of possible numbers that can fill it.", "edu/rpi/legup/images/sudoku/PossibleValues.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/RepeatedNumberContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/RepeatedNumberContradictionRule.java index 36979f10a..675356ab0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/RepeatedNumberContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/rules/RepeatedNumberContradictionRule.java @@ -12,7 +12,7 @@ public class RepeatedNumberContradictionRule extends ContradictionRule { public RepeatedNumberContradictionRule() { - super("Repeated Numbers", + super("SUDO-CONT-0002", "Repeated Numbers", "Two identical numbers are placed in the same group.", "edu/rpi/legup/images/sudoku/RepeatedNumber.png"); } From 2e43eceb90900231e1e48c639774eadca3eca573 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 19:34:06 -0500 Subject: [PATCH 20/32] Create treetent_reference_sheet.txt --- .../rules/treetent_reference_sheet.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/main/java/edu/rpi/legup/puzzle/treetent/rules/treetent_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/treetent_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/treetent_reference_sheet.txt new file mode 100644 index 000000000..43135047a --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/treetent_reference_sheet.txt @@ -0,0 +1,18 @@ +TREE-BASC-0001 : EmptyFieldBasicRule +TREE-BASC-0002 : FinishWithGrassBasicRule +TREE-BASC-0003 : FinishWithTentsBasicRule +TREE-BASC-0004 : LastCampingSpotBasicRule +TREE-BASC-0005 : SurroundTentWithGrassBasicRule +TREE-BASC-0006 : TentForTreeBasicRule +TREE-BASC-0007 : TreeForTentBasicRule + +TREE-CONT-0001 : NoTentForTreeContradictionRule +TREE-CONT-0002 : NoTreeForTentContradictionRule +TREE-CONT-0003 : TooFewTentsContradictionRule +TREE-CONT-0004 : TooManyTentsContradictionRule +TREE-CONT-0005 : TouchingTentsContradictionRule + +TREE-CASE-0001 : FillInRowCaseRule +TREE-CASE-0002 : LinkTentCaseRule +TREE-CASE-0003 : LinkTreeCaseRule +TREE-CASE-0004 : TreeOrGrassCaseRule \ No newline at end of file From 16edbea11e173631bf9251208921e972e69c82b8 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 19:39:31 -0500 Subject: [PATCH 21/32] Added TreeTent IDs --- .../rpi/legup/puzzle/treetent/rules/EmptyFieldBasicRule.java | 2 +- .../edu/rpi/legup/puzzle/treetent/rules/FillinRowCaseRule.java | 2 +- .../legup/puzzle/treetent/rules/FinishWithGrassBasicRule.java | 2 +- .../legup/puzzle/treetent/rules/FinishWithTentsBasicRule.java | 2 +- .../legup/puzzle/treetent/rules/LastCampingSpotBasicRule.java | 2 +- .../edu/rpi/legup/puzzle/treetent/rules/LinkTentCaseRule.java | 2 +- .../edu/rpi/legup/puzzle/treetent/rules/LinkTreeCaseRule.java | 2 +- .../puzzle/treetent/rules/NoTentForTreeContradictionRule.java | 2 +- .../puzzle/treetent/rules/NoTreeForTentContradictionRule.java | 2 +- .../puzzle/treetent/rules/SurroundTentWithGrassBasicRule.java | 2 +- .../rpi/legup/puzzle/treetent/rules/TentForTreeBasicRule.java | 2 +- .../rpi/legup/puzzle/treetent/rules/TentOrGrassCaseRule.java | 2 +- .../puzzle/treetent/rules/TooFewTentsContradictionRule.java | 2 +- .../puzzle/treetent/rules/TooManyTentsContradictionRule.java | 2 +- .../puzzle/treetent/rules/TouchingTentsContradictionRule.java | 2 +- .../rpi/legup/puzzle/treetent/rules/TreeForTentBasicRule.java | 2 +- .../legup/puzzle/treetent/rules/treetent_reference_sheet.txt | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/EmptyFieldBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/EmptyFieldBasicRule.java index 0d3e7dde0..607b2d7ae 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/EmptyFieldBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/EmptyFieldBasicRule.java @@ -14,7 +14,7 @@ public class EmptyFieldBasicRule extends BasicRule { public EmptyFieldBasicRule() { - super("Empty Field", + super("TREE-BASC-0001", "Empty Field", "Blank cells not adjacent to an unlinked tree are grass.", "edu/rpi/legup/images/treetent/noTreesAround.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FillinRowCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FillinRowCaseRule.java index a9a12eca9..cac8aa31a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FillinRowCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FillinRowCaseRule.java @@ -11,7 +11,7 @@ public class FillinRowCaseRule extends CaseRule { public FillinRowCaseRule() { - super("Fill In row", + super("TREE-CASE-0001", "Fill In row", "A row must have the number of tents of its clue.", "edu/rpi/legup/images/treetent/case_rowcount.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FinishWithGrassBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FinishWithGrassBasicRule.java index 8b139478e..166c8a2ae 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FinishWithGrassBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FinishWithGrassBasicRule.java @@ -16,7 +16,7 @@ public class FinishWithGrassBasicRule extends BasicRule { public FinishWithGrassBasicRule() { - super("Finish with Grass", + super("TREE-BASC-0002", "Finish with Grass", "Grass can be added to finish a row or column that has reached its tent limit.", "edu/rpi/legup/images/treetent/finishGrass.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FinishWithTentsBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FinishWithTentsBasicRule.java index fe06c5d45..a8832dbbf 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FinishWithTentsBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/FinishWithTentsBasicRule.java @@ -16,7 +16,7 @@ public class FinishWithTentsBasicRule extends BasicRule { public FinishWithTentsBasicRule() { - super("Finish with Tents", + super("TREE-BASC-0003", "Finish with Tents", "Tents can be added to finish a row or column that has one open spot per required tent.", "edu/rpi/legup/images/treetent/finishTent.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LastCampingSpotBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LastCampingSpotBasicRule.java index 9fe91550a..7c18a3993 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LastCampingSpotBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LastCampingSpotBasicRule.java @@ -16,7 +16,7 @@ public class LastCampingSpotBasicRule extends BasicRule { public LastCampingSpotBasicRule() { - super("Last Camping Spot", + super("TREE-BASC-0004", "Last Camping Spot", "If an unlinked tree is adjacent to only one blank cell and not adjacent to any unlinked tents, the blank cell must be a tent.", "edu/rpi/legup/images/treetent/oneTentPosition.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LinkTentCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LinkTentCaseRule.java index 7bd8c3b9d..851e668fd 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LinkTentCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LinkTentCaseRule.java @@ -11,7 +11,7 @@ public class LinkTentCaseRule extends CaseRule { public LinkTentCaseRule() { - super("Links from tent", + super("TREE-CASE-0002", "Links from tent", "A tent must link to exactly one adjacent tree.", "edu/rpi/legup/images/treetent/caseLinkTent.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LinkTreeCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LinkTreeCaseRule.java index 4485563ae..094fde33a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LinkTreeCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/LinkTreeCaseRule.java @@ -17,7 +17,7 @@ public class LinkTreeCaseRule extends CaseRule { public LinkTreeCaseRule() { - super("Links from tree", + super("TREE-CASE-0003", "Links from tree", "A tree must link to exactly one adjacent tent.", "edu/rpi/legup/images/treetent/caseLinkTree.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/NoTentForTreeContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/NoTentForTreeContradictionRule.java index 803729ece..8b3b27e16 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/NoTentForTreeContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/NoTentForTreeContradictionRule.java @@ -10,7 +10,7 @@ public class NoTentForTreeContradictionRule extends ContradictionRule { public NoTentForTreeContradictionRule() { - super("No Tent For Tree", + super("TREE-CONT-0001", "No Tent For Tree", "Each tree must link to a tent.", "edu/rpi/legup/images/treetent/contra_NoTentForTree.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/NoTreeForTentContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/NoTreeForTentContradictionRule.java index 42c7f0709..428456a49 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/NoTreeForTentContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/NoTreeForTentContradictionRule.java @@ -10,7 +10,7 @@ public class NoTreeForTentContradictionRule extends ContradictionRule { public NoTreeForTentContradictionRule() { - super("No Tree For Tent", + super("TREE-CONT-0002", "No Tree For Tent", "Each tent must link to a tree.", "edu/rpi/legup/images/treetent/contra_NoTreeForTent.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/SurroundTentWithGrassBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/SurroundTentWithGrassBasicRule.java index 899045c87..c52003458 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/SurroundTentWithGrassBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/SurroundTentWithGrassBasicRule.java @@ -15,7 +15,7 @@ public class SurroundTentWithGrassBasicRule extends BasicRule { public SurroundTentWithGrassBasicRule() { - super("Surround Tent with Grass", + super("TREE-BASC-0005", "Surround Tent with Grass", "Blank cells adjacent or diagonal to a tent are grass.", "edu/rpi/legup/images/treetent/aroundTent.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TentForTreeBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TentForTreeBasicRule.java index 52a0f6d07..7294428a8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TentForTreeBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TentForTreeBasicRule.java @@ -15,7 +15,7 @@ public class TentForTreeBasicRule extends BasicRule { public TentForTreeBasicRule() { - super("Tent for Tree", + super("TREE-BASC-0006", "Tent for Tree", "If only one unlinked tent and no blank cells are adjacent to an unlinked tree, the unlinked tree must link to the unlinked tent.", "edu/rpi/legup/images/treetent/NewTreeLink.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TentOrGrassCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TentOrGrassCaseRule.java index f49b4ad7c..7c284de0b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TentOrGrassCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TentOrGrassCaseRule.java @@ -15,7 +15,7 @@ public class TentOrGrassCaseRule extends CaseRule { public TentOrGrassCaseRule() { - super("Tree or Grass", + super("TREE-CASE-0004", "Tree or Grass", "Each blank cell is either a tent or grass.", "edu/rpi/legup/images/treetent/caseTentOrGrass.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TooFewTentsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TooFewTentsContradictionRule.java index 1e4aa4dce..189a13764 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TooFewTentsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TooFewTentsContradictionRule.java @@ -12,7 +12,7 @@ public class TooFewTentsContradictionRule extends ContradictionRule { public TooFewTentsContradictionRule() { - super("Too Few Tents", + super("TREE-CONT-0003", "Too Few Tents", "Rows and columns cannot have fewer tents than their clue.", "edu/rpi/legup/images/treetent/too_few_tents.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TooManyTentsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TooManyTentsContradictionRule.java index d6445f0ee..f07ce286f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TooManyTentsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TooManyTentsContradictionRule.java @@ -12,7 +12,7 @@ public class TooManyTentsContradictionRule extends ContradictionRule { public TooManyTentsContradictionRule() { - super("Too Many Tents", + super("TREE-CONT-0004", "Too Many Tents", "Rows and columns cannot have more tents than their clue.", "edu/rpi/legup/images/treetent/too_many_tents.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TouchingTentsContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TouchingTentsContradictionRule.java index c6f7bd670..c68e8da2e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TouchingTentsContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TouchingTentsContradictionRule.java @@ -10,7 +10,7 @@ public class TouchingTentsContradictionRule extends ContradictionRule { public TouchingTentsContradictionRule() { - super("Touching Tents", + super("TREE-CONT-0005", "Touching Tents", "Tents cannot touch other tents.", "edu/rpi/legup/images/treetent/contra_adjacentTents.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TreeForTentBasicRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TreeForTentBasicRule.java index 0ebe8b635..d1cf01a9b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TreeForTentBasicRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/TreeForTentBasicRule.java @@ -8,7 +8,7 @@ public class TreeForTentBasicRule extends BasicRule { public TreeForTentBasicRule() { - super("Tree for Tent", + super("TREE-BASC-0007", "Tree for Tent", "If only one unlinked tree is adjacent to an unlinked tent, the unlinked tent must link to the unlinked tree.", "edu/rpi/legup/images/treetent/NewTentLink.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/treetent_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/treetent_reference_sheet.txt index 43135047a..c05f12924 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/treetent_reference_sheet.txt +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/treetent_reference_sheet.txt @@ -15,4 +15,4 @@ TREE-CONT-0005 : TouchingTentsContradictionRule TREE-CASE-0001 : FillInRowCaseRule TREE-CASE-0002 : LinkTentCaseRule TREE-CASE-0003 : LinkTreeCaseRule -TREE-CASE-0004 : TreeOrGrassCaseRule \ No newline at end of file +TREE-CASE-0004 : TentOrGrassCaseRule \ No newline at end of file From 3da23c54c65d1328744a1dcf92aaaffbd5815e8b Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 19:50:13 -0500 Subject: [PATCH 22/32] Added Short Truth Table IDs --- .../shorttruthtable/rules/basic/BasicRule_Generic.java | 2 +- .../shorttruthtable/rules/caserule/CaseRule_Generic.java | 2 +- .../contradiction/ContradictionRule_GenericStatement.java | 2 +- .../rules/shorttruthtable_reference_sheet.txt | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java index 6aea49b2c..4ed35f6c0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java @@ -21,7 +21,7 @@ public abstract class BasicRule_Generic extends BasicRule { final boolean eliminationRule; public BasicRule_Generic(String ruleName, String description, String imageName, ContradictionRule contraRule, boolean eliminationRule){ - super(ruleName, description, "edu/rpi/legup/images/shorttruthtable/ruleimages/basic/"+imageName+".png"); + super("STTT-BASC-0001", ruleName, description, "edu/rpi/legup/images/shorttruthtable/ruleimages/basic/"+imageName+".png"); this.correspondingContradictionRule = contraRule; this.eliminationRule = eliminationRule; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java index dd6a46417..7df03ffab 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java @@ -17,7 +17,7 @@ public abstract class CaseRule_Generic extends CaseRule { public CaseRule_Generic(String ruleName, String title, String description) { - super(title, description, "edu/rpi/legup/images/shorttruthtable/ruleimages/case/"+ruleName+".png"); + super("STTT-CASE-0001", title, description, "edu/rpi/legup/images/shorttruthtable/ruleimages/case/"+ruleName+".png"); System.out.println("Case Rule Generic constructor"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java index 1c46b09c1..9e8e9cecd 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java @@ -29,7 +29,7 @@ public abstract class ContradictionRule_GenericStatement extends ContradictionRu public ContradictionRule_GenericStatement(String ruleName, String description, String imageName, char operationSymbol, ShortTruthTableCellType[][] contradictionPatterns){ - super(ruleName, description, imageName); + super("STTT-CONT-0001", ruleName, description, imageName); this.operationSymbol = operationSymbol; this.contradictionPatterns = contradictionPatterns; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt new file mode 100644 index 000000000..048fb9b5a --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt @@ -0,0 +1,5 @@ +STTT-BASC-0001 : BasicRule_Generic + +STTT-CASE-0001 : CaseRule_Generic + +STTT-CONT-0001 : ContradictionRule_Generic \ No newline at end of file From e2e109521d9daae8019f63ba0d94d2725a89468a Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 20:36:33 -0500 Subject: [PATCH 23/32] Added missing Short Truth Table ID --- .../rules/contradiction/ContradictionRuleAtomic.java | 2 +- .../shorttruthtable/rules/shorttruthtable_reference_sheet.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAtomic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAtomic.java index b8f74cdf2..aec8effd0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAtomic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAtomic.java @@ -18,7 +18,7 @@ public class ContradictionRuleAtomic extends ContradictionRule{ public ContradictionRuleAtomic(){ - super("Contradicting Variable", + super("STTT-CONT-0002", "Contradicting Variable", "A single variable can not be both True and False", "edu/rpi/legup/images/shorttruthtable/ruleimages/contradiction/Atomic.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt index 048fb9b5a..884139aaa 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt @@ -2,4 +2,5 @@ STTT-BASC-0001 : BasicRule_Generic STTT-CASE-0001 : CaseRule_Generic -STTT-CONT-0001 : ContradictionRule_Generic \ No newline at end of file +STTT-CONT-0001 : ContradictionRule_Generic +STTT-CONT-0002 : ContradictionRuleAtomic \ No newline at end of file From d0bd0ab1eb0e538fd6cd604e54f387977fedc557 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Mar 2022 20:57:27 -0500 Subject: [PATCH 24/32] Update CantReachWhiteContradictionRule.java Renamed the rule to "Unreachables are Black" --- .../puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java index 395e15fea..2a2b02a0d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CantReachWhiteContradictionRule.java @@ -15,7 +15,7 @@ public class CantReachWhiteContradictionRule extends ContradictionRule { public CantReachWhiteContradictionRule() { super("NURI-CONT-0002", - "Cant Reach white cell", + "Unreachables are Black", "A white cell must be able to reach a white region", "edu/rpi/legup/images/nurikabe/contradictions/CantReach.png"); } From 41e869e97004dea71cfecc18bbea5dec20824561 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 9 Mar 2022 10:18:44 -0500 Subject: [PATCH 25/32] Generic Constructors modified Modified all the generic constructors so they accept a ruleID parameter --- .../shorttruthtable/rules/basic/BasicRule_Generic.java | 4 ++-- .../basic/elimination/BasicRule_GenericElimination.java | 4 ++-- .../basic/introduction/BasicRule_GenericIntroduction.java | 4 ++-- .../shorttruthtable/rules/caserule/CaseRule_Generic.java | 4 ++-- .../rules/caserule/CaseRule_GenericStatement.java | 8 ++++---- .../contradiction/ContradictionRule_GenericStatement.java | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java index 4ed35f6c0..ab7c3e9ad 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java @@ -20,8 +20,8 @@ public abstract class BasicRule_Generic extends BasicRule { final ContradictionRule correspondingContradictionRule; final boolean eliminationRule; - public BasicRule_Generic(String ruleName, String description, String imageName, ContradictionRule contraRule, boolean eliminationRule){ - super("STTT-BASC-0001", ruleName, description, "edu/rpi/legup/images/shorttruthtable/ruleimages/basic/"+imageName+".png"); + public BasicRule_Generic(String ruleID, String ruleName, String description, String imageName, ContradictionRule contraRule, boolean eliminationRule){ + super(ruleID, ruleName, description, "edu/rpi/legup/images/shorttruthtable/ruleimages/basic/"+imageName+".png"); this.correspondingContradictionRule = contraRule; this.eliminationRule = eliminationRule; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRule_GenericElimination.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRule_GenericElimination.java index c0c170923..53e6e90a0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRule_GenericElimination.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRule_GenericElimination.java @@ -5,9 +5,9 @@ public abstract class BasicRule_GenericElimination extends BasicRule_Generic { - public BasicRule_GenericElimination(String ruleName, ContradictionRule contradictionRule) { + public BasicRule_GenericElimination(String ruleID, String ruleName, ContradictionRule contradictionRule) { - super(ruleName+" Elimination", + super(ruleID,ruleName+" Elimination", ruleName+" statements must have a valid pattern", "elimination/"+ruleName, contradictionRule, diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRule_GenericIntroduction.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRule_GenericIntroduction.java index 57803d72d..bdd4033cc 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRule_GenericIntroduction.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRule_GenericIntroduction.java @@ -5,9 +5,9 @@ public abstract class BasicRule_GenericIntroduction extends BasicRule_Generic { - protected BasicRule_GenericIntroduction(String ruleName, ContradictionRule contradictionRule) { + protected BasicRule_GenericIntroduction(String ruleID, String ruleName, ContradictionRule contradictionRule) { - super(ruleName+" Introduction", + super(ruleID,ruleName+" Introduction", ruleName+" statements must have a valid pattern", "introduction/"+ruleName, contradictionRule, diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java index 7df03ffab..db25f0e04 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_Generic.java @@ -16,8 +16,8 @@ public abstract class CaseRule_Generic extends CaseRule { - public CaseRule_Generic(String ruleName, String title, String description) { - super("STTT-CASE-0001", title, description, "edu/rpi/legup/images/shorttruthtable/ruleimages/case/"+ruleName+".png"); + public CaseRule_Generic(String ruleID, String ruleName, String title, String description) { + super(ruleID, title, description, "edu/rpi/legup/images/shorttruthtable/ruleimages/case/"+ruleName+".png"); System.out.println("Case Rule Generic constructor"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_GenericStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_GenericStatement.java index f5bc61070..1c84cac9a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_GenericStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRule_GenericStatement.java @@ -18,12 +18,12 @@ public abstract class CaseRule_GenericStatement extends CaseRule_Generic { - public CaseRule_GenericStatement(char operation, String title, + public CaseRule_GenericStatement(String ruleID, char operation, String title, ShortTruthTableCellType[][] trueCases, ShortTruthTableCellType[][] falseCases) { - super(ShortTruthTableOperation.getRuleName(operation), + super(ruleID, ShortTruthTableOperation.getRuleName(operation), title+" case", - "A known "+title.toUpperCase()+" statment can have multiple forms"); + "A known "+title.toUpperCase()+" statement can have multiple forms"); this.operation = operation; @@ -43,7 +43,7 @@ public CaseRule_GenericStatement(char operation, String title, //Adds all elements that can be selected for this caserule @Override public CaseBoard getCaseBoard(Board board) { - //copy the board and add all ements that can be selected + //copy the board and add all elements that can be selected ShortTruthTableBoard sttBoard = (ShortTruthTableBoard) board.copy(); sttBoard.setModifiable(false); CaseBoard caseBoard = new CaseBoard(sttBoard, this); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java index 9e8e9cecd..5d54bf5fe 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRule_GenericStatement.java @@ -27,9 +27,9 @@ public abstract class ContradictionRule_GenericStatement extends ContradictionRu final static ShortTruthTableCellType F = ShortTruthTableCellType.FALSE; final static ShortTruthTableCellType n = null; - public ContradictionRule_GenericStatement(String ruleName, String description, String imageName, + public ContradictionRule_GenericStatement(String ruleID, String ruleName, String description, String imageName, char operationSymbol, ShortTruthTableCellType[][] contradictionPatterns){ - super("STTT-CONT-0001", ruleName, description, imageName); + super(ruleID, ruleName, description, imageName); this.operationSymbol = operationSymbol; this.contradictionPatterns = contradictionPatterns; } From 8ada7d1b3d437846a1dd2af1d3ff9ef27bdd215b Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 9 Mar 2022 10:23:17 -0500 Subject: [PATCH 26/32] Update shorttruthtable_reference_sheet.txt --- .../rules/shorttruthtable_reference_sheet.txt | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt index 884139aaa..077bce9ce 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt @@ -1,6 +1,24 @@ -STTT-BASC-0001 : BasicRule_Generic +STTT-BASC-0001 : BasicRuleAtomic +STTT-BASC-0002 : BasicRuleAndElimination +STTT-BASC-0003 : BasicRuleBiconditionalElimination +STTT-BASC-0004 : BasicRuleConditionalElimination +STTT-BASC-0005 : BasicRuleNotElimination +STTT-BASC-0006 : BasicRuleOrElimination +STTT-BASC-0007 : BasicRuleAndIntroduction +STTT-BASC-0008 : BasicRuleBiconditionalIntroduction +STTT-BASC-0009 : BasicRuleConditionalIntroduction +STTT-BASC-0010 : BasicRuleNotIntroduction +STTT-BASC-0011 : BasicRuleOrIntroduction -STTT-CASE-0001 : CaseRule_Generic +STTT-CASE-0001 : CaseRuleAnd +STTT-CASE-0002 : CaseRuleAtomic +STTT-CASE-0003 : CaseRuleBiconditional +STTT-CASE-0004 : CaseRuleConditional +STTT-CASE-0005 : CaseRuleOr -STTT-CONT-0001 : ContradictionRule_Generic -STTT-CONT-0002 : ContradictionRuleAtomic \ No newline at end of file +STTT-CONT-0001 : ContradictionRuleAnd +STTT-CONT-0002 : ContradictionRuleAtomic +STTT-CONT-0003 : ContradictionRuleBiconditional +STTT-CONT-0004 : ContradictionRuleConditional +STTT-CONT-0005 : ContradictionRuleNot +STTT-CONT-0006 : ContradictionRuleOr \ No newline at end of file From ad6a442c40260d42c394e9401a35415b3710e95b Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 9 Mar 2022 10:26:54 -0500 Subject: [PATCH 27/32] Elimination rule IDs added Added all the IDs from shorttruthtable_reference_sheet.txt for elimination rules --- .../rules/basic/elimination/BasicRuleAndElimination.java | 2 +- .../basic/elimination/BasicRuleBiconditionalElimination.java | 2 +- .../basic/elimination/BasicRuleConditionalElimination.java | 2 +- .../rules/basic/elimination/BasicRuleNotElimination.java | 2 +- .../rules/basic/elimination/BasicRuleOrElimination.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleAndElimination.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleAndElimination.java index f63b25f76..8985e1081 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleAndElimination.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleAndElimination.java @@ -5,7 +5,7 @@ public class BasicRuleAndElimination extends BasicRule_GenericElimination { public BasicRuleAndElimination() { - super("And", new ContradictionRuleAnd()); + super("STTT-BASC-0002", "And", new ContradictionRuleAnd()); System.out.println("and eliminatio constructor"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleBiconditionalElimination.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleBiconditionalElimination.java index 0368de31e..2b9d74b09 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleBiconditionalElimination.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleBiconditionalElimination.java @@ -5,7 +5,7 @@ public class BasicRuleBiconditionalElimination extends BasicRule_GenericElimination { public BasicRuleBiconditionalElimination() { - super("Biconditional", new ContradictionRuleBiconditional()); + super("STTT-BASC-0003", "Biconditional", new ContradictionRuleBiconditional()); } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleConditionalElimination.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleConditionalElimination.java index b42f9aee5..fb2bd6845 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleConditionalElimination.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleConditionalElimination.java @@ -5,7 +5,7 @@ public class BasicRuleConditionalElimination extends BasicRule_GenericElimination { public BasicRuleConditionalElimination() { - super("Conditional", new ContradictionRuleConditional()); + super("STTT-BASC-0004", "Conditional", new ContradictionRuleConditional()); } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleNotElimination.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleNotElimination.java index 707ae3734..78043b18a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleNotElimination.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleNotElimination.java @@ -5,7 +5,7 @@ public class BasicRuleNotElimination extends BasicRule_GenericElimination { public BasicRuleNotElimination() { - super("Not", new ContradictionRuleNot()); + super("STTT-BASC-0005", "Not", new ContradictionRuleNot()); } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleOrElimination.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleOrElimination.java index fab1be631..9a970cff8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleOrElimination.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/elimination/BasicRuleOrElimination.java @@ -5,7 +5,7 @@ public class BasicRuleOrElimination extends BasicRule_GenericElimination { public BasicRuleOrElimination() { - super("Or", new ContradictionRuleOr()); + super("STTT-BASC-0006", "Or", new ContradictionRuleOr()); } } \ No newline at end of file From 626d82440619a76939769072816175568f2a923b Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 9 Mar 2022 10:28:25 -0500 Subject: [PATCH 28/32] Introduction rule IDs added Added all the rule IDs for introduction rules from shorttruthtable_reference_sheet.txt --- .../rules/basic/introduction/BasicRuleAndIntroduction.java | 2 +- .../basic/introduction/BasicRuleBiconditionalIntroduction.java | 2 +- .../basic/introduction/BasicRuleConditionalIntroduction.java | 2 +- .../rules/basic/introduction/BasicRuleNotIntroduction.java | 2 +- .../rules/basic/introduction/BasicRuleOrIntroduction.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleAndIntroduction.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleAndIntroduction.java index 5659c88f2..07e4e672b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleAndIntroduction.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleAndIntroduction.java @@ -5,7 +5,7 @@ public class BasicRuleAndIntroduction extends BasicRule_GenericIntroduction { public BasicRuleAndIntroduction() { - super("And", new ContradictionRuleAnd()); + super("STTT-BASC-0007", "And", new ContradictionRuleAnd()); } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleBiconditionalIntroduction.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleBiconditionalIntroduction.java index 13b29d9fb..427b38c3b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleBiconditionalIntroduction.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleBiconditionalIntroduction.java @@ -5,7 +5,7 @@ public class BasicRuleBiconditionalIntroduction extends BasicRule_GenericIntroduction { public BasicRuleBiconditionalIntroduction() { - super("Biconditional", new ContradictionRuleBiconditional()); + super("STTT-BASC-0008", "Biconditional", new ContradictionRuleBiconditional()); } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleConditionalIntroduction.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleConditionalIntroduction.java index 2966b53bd..fe4979df7 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleConditionalIntroduction.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleConditionalIntroduction.java @@ -5,7 +5,7 @@ public class BasicRuleConditionalIntroduction extends BasicRule_GenericIntroduction { public BasicRuleConditionalIntroduction() { - super("Conditional", new ContradictionRuleConditional()); + super("STTT-BASC-0009", "Conditional", new ContradictionRuleConditional()); } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleNotIntroduction.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleNotIntroduction.java index a9935ef6f..d336101b8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleNotIntroduction.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleNotIntroduction.java @@ -5,7 +5,7 @@ public class BasicRuleNotIntroduction extends BasicRule_GenericIntroduction { public BasicRuleNotIntroduction() { - super("Not", new ContradictionRuleNot()); + super("STTT-BASC-0010", "Not", new ContradictionRuleNot()); } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleOrIntroduction.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleOrIntroduction.java index a4c0e3489..5a9a2ba41 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleOrIntroduction.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/introduction/BasicRuleOrIntroduction.java @@ -5,7 +5,7 @@ public class BasicRuleOrIntroduction extends BasicRule_GenericIntroduction { public BasicRuleOrIntroduction() { - super("Or", new ContradictionRuleOr()); + super("STTT-BASC-0011", "Or", new ContradictionRuleOr()); } } \ No newline at end of file From 4c7fc775016423781576d2c2aab3badca4559298 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 9 Mar 2022 10:33:15 -0500 Subject: [PATCH 29/32] Case rule IDs assigned Added all the IDs for case rules from shorttruthtable_reference_sheet.txt --- .../puzzle/shorttruthtable/rules/caserule/CaseRuleAnd.java | 2 +- .../puzzle/shorttruthtable/rules/caserule/CaseRuleAtomic.java | 2 +- .../shorttruthtable/rules/caserule/CaseRuleBiconditional.java | 2 +- .../shorttruthtable/rules/caserule/CaseRuleConditional.java | 2 +- .../legup/puzzle/shorttruthtable/rules/caserule/CaseRuleOr.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleAnd.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleAnd.java index 3c2b69b70..ddc84df16 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleAnd.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleAnd.java @@ -6,7 +6,7 @@ public class CaseRuleAnd extends CaseRule_GenericStatement { public CaseRuleAnd() { - super(ShortTruthTableOperation.AND, + super("STTT-CASE-0001", ShortTruthTableOperation.AND, "And", trueCases, falseCases); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleAtomic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleAtomic.java index 935b02a21..7fcbb7432 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleAtomic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleAtomic.java @@ -17,7 +17,7 @@ public class CaseRuleAtomic extends CaseRule_Generic { public CaseRuleAtomic() { - super("Atomic", + super("STTT-CASE-0002", "Atomic", "Atomic Case", "Each unknown cell must either be true or false"); System.out.println("Case Rule T/F constructor"); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleBiconditional.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleBiconditional.java index 73e5b8619..85c6f5447 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleBiconditional.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleBiconditional.java @@ -6,7 +6,7 @@ public class CaseRuleBiconditional extends CaseRule_GenericStatement { public CaseRuleBiconditional() { - super(ShortTruthTableOperation.BICONDITIONAL, + super("STTT-CASE-0003", ShortTruthTableOperation.BICONDITIONAL, "Biconditional", trueCases, falseCases); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleConditional.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleConditional.java index c55fb0053..867708729 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleConditional.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleConditional.java @@ -6,7 +6,7 @@ public class CaseRuleConditional extends CaseRule_GenericStatement { public CaseRuleConditional() { - super(ShortTruthTableOperation.CONDITIONAL, + super("STTT-CASE-0004", ShortTruthTableOperation.CONDITIONAL, "Conditional", trueCases, falseCases); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleOr.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleOr.java index aa7586660..e0bc9774c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleOr.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/caserule/CaseRuleOr.java @@ -6,7 +6,7 @@ public class CaseRuleOr extends CaseRule_GenericStatement { public CaseRuleOr() { - super(ShortTruthTableOperation.OR, + super("STTT-CASE-0005", ShortTruthTableOperation.OR, "Or", trueCases, falseCases); From d23c66a2ce488a174dc7bb4721d2c481be9d7c24 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 9 Mar 2022 10:40:24 -0500 Subject: [PATCH 30/32] Added contradiction rule IDs Added rule IDs for contradiction rules from shorttruthtable_reference_sheet.txt --- .../rules/contradiction/ContradictionRuleAnd.java | 2 +- .../rules/contradiction/ContradictionRuleBiconditional.java | 2 +- .../rules/contradiction/ContradictionRuleConditional.java | 2 +- .../rules/contradiction/ContradictionRuleNot.java | 2 +- .../rules/contradiction/ContradictionRuleOr.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAnd.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAnd.java index efddc4b6e..e33030144 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAnd.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleAnd.java @@ -6,7 +6,7 @@ public class ContradictionRuleAnd extends ContradictionRule_GenericStatement{ public ContradictionRuleAnd(){ - super("Contradicting And", + super("STTT-CONT-0001", "Contradicting And", "An AND statement must have a contradicting pattern", "edu/rpi/legup/images/shorttruthtable/ruleimages/contradiction/And.png", ShortTruthTableOperation.AND, diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleBiconditional.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleBiconditional.java index cb0069f71..b74888dbb 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleBiconditional.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleBiconditional.java @@ -6,7 +6,7 @@ public class ContradictionRuleBiconditional extends ContradictionRule_GenericStatement{ public ContradictionRuleBiconditional(){ - super("Contradicting Biconditional", + super("STTT-CONT-0002", "Contradicting Biconditional", "A Biconditional statement must have a contradicting pattern", "edu/rpi/legup/images/shorttruthtable/ruleimages/contradiction/Biconditional.png", ShortTruthTableOperation.BICONDITIONAL, diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleConditional.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleConditional.java index 34057c3b5..96a15282b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleConditional.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleConditional.java @@ -6,7 +6,7 @@ public class ContradictionRuleConditional extends ContradictionRule_GenericStatement{ public ContradictionRuleConditional(){ - super("Contradicting Conditional", + super("STTT-CONT-0004", "Contradicting Conditional", "A Conditional statement must have a contradicting pattern", "edu/rpi/legup/images/shorttruthtable/ruleimages/contradiction/Conditional.png", ShortTruthTableOperation.CONDITIONAL, diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleNot.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleNot.java index 70c9f52d3..e81e95218 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleNot.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleNot.java @@ -6,7 +6,7 @@ public class ContradictionRuleNot extends ContradictionRule_GenericStatement{ public ContradictionRuleNot(){ - super("Contradicting Negation", + super("STTT-CONT-0005", "Contradicting Negation", "A negation and its following statement can not have the same truth value", "edu/rpi/legup/images/shorttruthtable/ruleimages/contradiction/Not.png", ShortTruthTableOperation.NOT, diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleOr.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleOr.java index a82757ad2..6c903f76f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleOr.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/contradiction/ContradictionRuleOr.java @@ -6,7 +6,7 @@ public class ContradictionRuleOr extends ContradictionRule_GenericStatement{ public ContradictionRuleOr(){ - super("Contradicting Or", + super("STTT-CONT-0006", "Contradicting Or", "An OR statement must have a contradicting pattern", "edu/rpi/legup/images/shorttruthtable/ruleimages/contradiction/Or.png", ShortTruthTableOperation.OR, From 0471a5cebd3bab264926b257e18e6a4c694e8eec Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 9 Mar 2022 10:42:41 -0500 Subject: [PATCH 31/32] Update BasicRuleAtomic.java --- .../puzzle/shorttruthtable/rules/basic/BasicRuleAtomic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRuleAtomic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRuleAtomic.java index cedaa53f4..809251023 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRuleAtomic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRuleAtomic.java @@ -5,7 +5,7 @@ public class BasicRuleAtomic extends BasicRule_Generic{ public BasicRuleAtomic(){ - super("Atomic Rule", + super("STTT-BASC-0001", "Atomic Rule", "All identical atoms have the same T/F value", "Atomic", new ContradictionRuleAtomic(), From 0a6e8085229d36f607fafd36865ccad3e43213e4 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 9 Mar 2022 20:57:07 -0500 Subject: [PATCH 32/32] Update BasicRule_Generic.java --- .../puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java index ab7c3e9ad..7f1fb02c4 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/BasicRule_Generic.java @@ -12,9 +12,6 @@ import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableStatement; import edu.rpi.legup.model.rules.ContradictionRule; -import java.awt.*; -import java.util.List; - public abstract class BasicRule_Generic extends BasicRule { final ContradictionRule correspondingContradictionRule;