From 5b31506345e4a80643c96cb94760150f2e1d62e1 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Mon, 13 Feb 2023 11:01:14 -0500 Subject: [PATCH 01/54] Created files for STT elements --- .../rpi/legup/puzzle/shorttruthtable/elements/AndTile.java | 4 ++++ .../puzzle/shorttruthtable/elements/BiconditionalTile.java | 4 ++++ .../puzzle/shorttruthtable/elements/ConditionalTile.java | 4 ++++ .../rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java | 4 ++++ .../rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java | 4 ++++ .../legup/puzzle/shorttruthtable/elements/NegationTile.java | 4 ++++ .../edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java | 4 ++++ .../puzzle/shorttruthtable/elements/ParenthesisTile.java | 4 ++++ .../rpi/legup/puzzle/shorttruthtable/elements/RedTile.java | 4 ++++ 9 files changed, 36 insertions(+) create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java new file mode 100644 index 000000000..5c660ccb6 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class AndTile { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java new file mode 100644 index 000000000..d14aebc8d --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class BiconditionalTile { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java new file mode 100644 index 000000000..cf1b47caf --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class ConditionalTile { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java new file mode 100644 index 000000000..ed3ddd0e9 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class GreenTile { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java new file mode 100644 index 000000000..d2b16dc30 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class LetterTile { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java new file mode 100644 index 000000000..ab9fd8c20 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class NegationTile { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java new file mode 100644 index 000000000..63ea84d0e --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class OrTile { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java new file mode 100644 index 000000000..0459eea2b --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class ParenthesisTile { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java new file mode 100644 index 000000000..5ebad83e2 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class RedTile { +} From ec486d633afa24cec5e61672e01457c366cfdcf8 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Mon, 13 Feb 2023 13:07:36 -0500 Subject: [PATCH 02/54] Renamed Tiles classes to Elements to match package name Also added an elements reference sheet and renamed rules reference sheet accordingly --- .../elements/{LetterTile.java => AndElement.java} | 2 +- .../elements/BiconditionalElement.java | 4 ++++ ...BiconditionalTile.java => ConditionalElement.java} | 2 +- .../elements/{NegationTile.java => GreenElement.java} | 3 ++- .../elements/{GreenTile.java => LetterElement.java} | 3 ++- .../{ConditionalTile.java => NegationElement.java} | 2 +- .../elements/{AndTile.java => OrElement.java} | 2 +- .../shorttruthtable/elements/ParenthesisElement.java | 4 ++++ .../shorttruthtable/elements/ParenthesisTile.java | 4 ---- .../elements/{OrTile.java => RedElement.java} | 2 +- .../puzzle/shorttruthtable/elements/RedTile.java | 4 ---- .../shorttruthtable/elements/UnknownElement.java | 4 ++++ .../shorttruthtable_rules_reference_sheet.txt} | 0 .../elements/shorttruttable_elements_reference_sheet | 11 +++++++++++ 14 files changed, 32 insertions(+), 15 deletions(-) rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/{LetterTile.java => AndElement.java} (69%) create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/{BiconditionalTile.java => ConditionalElement.java} (63%) rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/{NegationTile.java => GreenElement.java} (67%) rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/{GreenTile.java => LetterElement.java} (66%) rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/{ConditionalTile.java => NegationElement.java} (65%) rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/{AndTile.java => OrElement.java} (69%) create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/{OrTile.java => RedElement.java} (69%) delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/{rules/shorttruthtable_reference_sheet.txt => elements/shorttruthtable_rules_reference_sheet.txt} (100%) create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruttable_elements_reference_sheet diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java similarity index 69% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java index d2b16dc30..d2b4a3953 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java @@ -1,4 +1,4 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class LetterTile { +public class AndElement { } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java new file mode 100644 index 000000000..860a1c92e --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class BiconditionalElement { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java similarity index 63% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java index d14aebc8d..3d07e7c66 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java @@ -1,4 +1,4 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class BiconditionalTile { +public class ConditionalElement { } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java similarity index 67% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java index ab9fd8c20..2a70d51ca 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java @@ -1,4 +1,5 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class NegationTile { +public class GreenElement +{ } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java similarity index 66% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java index ed3ddd0e9..8084d8fd3 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java @@ -1,4 +1,5 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class GreenTile { +public class LetterElement +{ } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java similarity index 65% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java index cf1b47caf..569850aa7 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java @@ -1,4 +1,4 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class ConditionalTile { +public class NegationElement { } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java similarity index 69% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java index 5c660ccb6..9bc8fc00f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java @@ -1,4 +1,4 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class AndTile { +public class OrElement { } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java new file mode 100644 index 000000000..19933026c --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class ParenthesisElement { +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java deleted file mode 100644 index 0459eea2b..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class ParenthesisTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java similarity index 69% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java index 63ea84d0e..fb5c46883 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java @@ -1,4 +1,4 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class OrTile { +public class RedElement { } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java deleted file mode 100644 index 5ebad83e2..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class RedTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java new file mode 100644 index 000000000..fce09fe12 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java @@ -0,0 +1,4 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +public class UnknownElement { +} 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/elements/shorttruthtable_rules_reference_sheet.txt similarity index 100% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_rules_reference_sheet.txt diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruttable_elements_reference_sheet b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruttable_elements_reference_sheet new file mode 100644 index 000000000..ca6a5d83d --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruttable_elements_reference_sheet @@ -0,0 +1,11 @@ +STTT-UNPL-0001 : AndElement +STTT-UNPL-0002 : BiconditionalElement +STTT-UNPL-0003 : ConditionalElement +STTT-UNPL-0004 : LetterElement +STTT-UNPL-0005 : NegationElement +STTT-UNPL-0006 : OrElement +STTT-UNPL-0007 : ParenthesisElement +STTT-UNPL-0008 : UnknownElement + +STTT-PLAC-0001 : GreenElement +STTT-PLAC-0002 : RedElement \ No newline at end of file From 14122c15d24c73fbd0e4e24961f68db44823994c Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Mon, 13 Feb 2023 14:57:12 -0500 Subject: [PATCH 03/54] More progress made This won't compile, just saving progress made --- .../shorttruthtable/elements/AndElement.java | 7 ++++++- .../elements/BiconditionalElement.java | 7 ++++++- .../elements/ConditionalElement.java | 4 +++- .../shorttruthtable/elements/GreenElement.java | 7 ++++++- .../shorttruthtable/elements/LetterElement.java | 7 ++++++- .../elements/NegationElement.java | 7 ++++++- .../shorttruthtable/elements/OrElement.java | 7 ++++++- .../elements/ParenthesisElement.java | 7 ++++++- .../shorttruthtable/elements/RedElement.java | 7 ++++++- .../shorttruthtable/elements/UnknownElement.java | 7 ++++++- .../shorttruthtable_rules_reference_sheet.txt | 0 .../images/shorttruthtable/tiles/GreenTile.png | Bin 0 -> 190 bytes .../images/shorttruthtable/tiles/RedTile.png | Bin 0 -> 152 bytes .../images/shorttruthtable/tiles/UnknownTile.png | Bin 0 -> 9733 bytes 14 files changed, 57 insertions(+), 10 deletions(-) rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/{elements => rules}/shorttruthtable_rules_reference_sheet.txt (100%) create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/RedTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java index d2b4a3953..5a2fe9ac2 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class AndElement { +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class AndElement extends NonPlaceableElement { + public AndElement() { + super("STTT-UNPL-0001", "And Element", "And logical element", imageName); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java index 860a1c92e..7d9618629 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class BiconditionalElement { +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class BiconditionalElement extends NonPlaceableElement { + public BiconditionalElement(String elementID, String elementName, String description, String imageName) { + super(elementID, elementName, description, imageName); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java index 3d07e7c66..6cbed5872 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java @@ -1,4 +1,6 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class ConditionalElement { +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class ConditionalElement extends NonPlaceableElement { } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java index 2a70d51ca..26bacec76 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java @@ -1,5 +1,10 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class GreenElement +import edu.rpi.legup.model.elements.PlaceableElement; + +public class GreenElement extends PlaceableElement { + public GreenElement() { + super("STTT-PLAC-0001", "Green Element", "A green tile to set certain tiles to true", "edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java index 8084d8fd3..968defd1d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java @@ -1,5 +1,10 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class LetterElement +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class LetterElement extends NonPlaceableElement { + public LetterElement(String elementID, String elementName, String description, String imageName) { + super(elementID, elementName, description, imageName); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java index 569850aa7..a310d68c2 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class NegationElement { +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class NegationElement extends NonPlaceableElement { + public NegationElement(String elementID, String elementName, String description, String imageName) { + super(elementID, elementName, description, imageName); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java index 9bc8fc00f..012340747 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class OrElement { +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class OrElement extends NonPlaceableElement { + public OrElement(String elementID, String elementName, String description, String imageName) { + super(elementID, elementName, description, imageName); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java index 19933026c..78519f88a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class ParenthesisElement { +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class ParenthesisElement extends NonPlaceableElement { + public ParenthesisElement(String elementID, String elementName, String description, String imageName) { + super(elementID, elementName, description, imageName); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java index fb5c46883..ecc7d5a02 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class RedElement { +import edu.rpi.legup.model.elements.PlaceableElement; + +public class RedElement extends PlaceableElement { + public RedElement() { + super("STTT-PLAC-0002", "Red Element", "A red tile to set certain tiles to false", "edu/rpi/legup/images/shorttruthtable/tiles/RedTile.png"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java index fce09fe12..a250d658e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java @@ -1,4 +1,9 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -public class UnknownElement { +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class UnknownElement extends NonPlaceableElement { + public UnknownElement() { + super("STTT-UNPL-0008", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_rules_reference_sheet.txt b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_rules_reference_sheet.txt similarity index 100% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_rules_reference_sheet.txt rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_rules_reference_sheet.txt diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png new file mode 100644 index 0000000000000000000000000000000000000000..a438e30375f0598657b2a7e3873d3d03655a5b31 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=G^tAk28_ZrvZCV6dl)V@QPi(G!M@K;u{zuFosdJy64^lau~k lJFPP^Y1#}`(x|jD`L~l9qAz|@;AI@!lvI6;>1s;*b3=G_YAk0{w5C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6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23 Date: Mon, 13 Feb 2023 17:34:36 -0500 Subject: [PATCH 04/54] More progress being made --- .../elements/ArgumentElement.java | 19 +++++++++++++++++++ .../elements/BiconditionalElement.java | 4 ++-- .../elements/ConditionalElement.java | 3 +++ .../elements/LetterElement.java | 10 ---------- .../elements/NegationElement.java | 4 ++-- .../shorttruthtable/elements/OrElement.java | 4 ++-- .../elements/ParenthesisElement.java | 18 ++++++++++++++++-- 7 files changed, 44 insertions(+), 18 deletions(-) create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java new file mode 100644 index 000000000..1f45ada47 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java @@ -0,0 +1,19 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class ArgumentElement extends NonPlaceableElement +{ + private char letter = 'A'; + public ArgumentElement() { + super("STTT-UNPL-0004", "Argument Element", "Argument of logic statement element", imageName); + } + + public char getLetter() { + return letter; + } + + public void setLetter(char letter) { + this.letter = letter; + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java index 7d9618629..f9c723d62 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java @@ -3,7 +3,7 @@ import edu.rpi.legup.model.elements.NonPlaceableElement; public class BiconditionalElement extends NonPlaceableElement { - public BiconditionalElement(String elementID, String elementName, String description, String imageName) { - super(elementID, elementName, description, imageName); + public BiconditionalElement() { + super("STTT-UNPL-0002", "Biconditional Element", "Biconditional logic element", imageName); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java index 6cbed5872..4750845f9 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java @@ -3,4 +3,7 @@ import edu.rpi.legup.model.elements.NonPlaceableElement; public class ConditionalElement extends NonPlaceableElement { + public ConditionalElement() { + super("STTT-UNPL-0003", "Conditional Element", "Conditional logic element", imageName); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java deleted file mode 100644 index 968defd1d..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterElement.java +++ /dev/null @@ -1,10 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class LetterElement extends NonPlaceableElement -{ - public LetterElement(String elementID, String elementName, String description, String imageName) { - super(elementID, elementName, description, imageName); - } -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java index a310d68c2..5a2da7ea6 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java @@ -3,7 +3,7 @@ import edu.rpi.legup.model.elements.NonPlaceableElement; public class NegationElement extends NonPlaceableElement { - public NegationElement(String elementID, String elementName, String description, String imageName) { - super(elementID, elementName, description, imageName); + public NegationElement() { + super("STTT-UNPL-0005", "Negation Element", "Negation logic element", imageName); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java index 012340747..18bea17a4 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java @@ -3,7 +3,7 @@ import edu.rpi.legup.model.elements.NonPlaceableElement; public class OrElement extends NonPlaceableElement { - public OrElement(String elementID, String elementName, String description, String imageName) { - super(elementID, elementName, description, imageName); + public OrElement() { + super("STTT-UNPL-0006", "Or Element", "Or logic element", imageName); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java index 78519f88a..d0759a9ba 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java @@ -3,7 +3,21 @@ import edu.rpi.legup.model.elements.NonPlaceableElement; public class ParenthesisElement extends NonPlaceableElement { - public ParenthesisElement(String elementID, String elementName, String description, String imageName) { - super(elementID, elementName, description, imageName); + + private char parenthesis = '('; + public ParenthesisElement() { + super("STTT-UNPL-0007", "Parenthesis Element", "Parenthesis element", imageName); + } + + public char getParenthesis() { + return parenthesis; + } + + public void setOpenParenthesis() { + this.parenthesis = '('; + } + + public void setClosedParenthesis() { + this.parenthesis = ')'; } } From 4c680ddd9063f25a5a959292fade9c81504f1d13 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 14 Feb 2023 09:47:57 -0500 Subject: [PATCH 05/54] Fixed file name typo and added placeholder tiles --- ... => shorttruthtable_elements_reference_sheet} | 0 .../images/shorttruthtable/tiles/AndTile.png | Bin 0 -> 9733 bytes .../shorttruthtable/tiles/BiconditionalTile.png | Bin 0 -> 9733 bytes .../shorttruthtable/tiles/ConditionalTile.png | Bin 0 -> 9733 bytes .../images/shorttruthtable/tiles/LetterTile.png | Bin 0 -> 9733 bytes .../shorttruthtable/tiles/NegationTile.png | Bin 0 -> 9733 bytes .../images/shorttruthtable/tiles/OrTile.png | Bin 0 -> 9733 bytes .../shorttruthtable/tiles/ParenthesisTile.png | Bin 0 -> 9733 bytes 8 files changed, 0 insertions(+), 0 deletions(-) rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/{shorttruttable_elements_reference_sheet => shorttruthtable_elements_reference_sheet} (100%) create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruttable_elements_reference_sheet b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet similarity index 100% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruttable_elements_reference_sheet rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_d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rZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71JTw$u`85t7w9`&1}$ zLV%cYr}?eqF8h<$VR6%!zwsxBTwlC4f7m!$wgpLj$gQ#E6_0HAgXsu4+5Rftm(M^` zb9ZXQ+BZvr# zz6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x*;kvrInlOYW0s#dypv*uT3(tYln2M_q zKQM44CV@fmV^Qcd@G2(WgC4-bLLk66_^Q^Z*8dWORf?V=4X$K_vWb?-#)ET?>au&?NbisDLUH z@CyIUrHPrP)!!DY6nIjoerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N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k_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71JTw$u`85t7w9`&1}$ zLV%cYr}?eqF8h<$VR6%!zwsxBTwlC4f7m!$wgpLj$gQ#E6_0HAgXsu4+5Rftm(M^` zb9ZXQ+BZvr# zz6Mt1Dw9>;B2vV(;j$@!%fGoAce8kh*a27nlBfO(Cj>orwEy|>NlRdub1;7b73%CLB?4~x%*w1=ytE@?bobt?62fI7@wAl3qRU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&?NbisDLUH z@CyIUrHPrP)!!DY6nIjoerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4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6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71JTw$u`85t7w9`&1}$ zLV%cYr}?eqF8h<$VR6%!zwsxBTwlC4f7m!$wgpLj$gQ#E6_0HAgXsu4+5Rftm(M^` zb9ZXQ+BZvr# zz6Mt1Dw9>;B2vV(;j$@!%fGoAce8kh*a27nlBfO(Cj>orwEy|>NlRdub1;7b73%CLB?4~x%*w1=ytE@?bobt?62fI7@wAl3qRUwq+r+~OEB+7 zK4d%^xSRxTJZE|L73rd3=Qid}(~BOl>QxcBO6TqJ(oWsT`6_q4)4}%rNjvYm4~Cty z^PzV;5`5mWUb`+}S(C+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l~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*a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001 From: charlestian23 Date: Tue, 14 Feb 2023 10:06:40 -0500 Subject: [PATCH 06/54] Added image paths --- .../rpi/legup/puzzle/shorttruthtable/elements/AndElement.java | 2 +- .../legup/puzzle/shorttruthtable/elements/ArgumentElement.java | 2 +- .../puzzle/shorttruthtable/elements/BiconditionalElement.java | 2 +- .../puzzle/shorttruthtable/elements/ConditionalElement.java | 2 +- .../legup/puzzle/shorttruthtable/elements/NegationElement.java | 2 +- .../rpi/legup/puzzle/shorttruthtable/elements/OrElement.java | 2 +- .../puzzle/shorttruthtable/elements/ParenthesisElement.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java index 5a2fe9ac2..f1caaec30 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java @@ -4,6 +4,6 @@ public class AndElement extends NonPlaceableElement { public AndElement() { - super("STTT-UNPL-0001", "And Element", "And logical element", imageName); + super("STTT-UNPL-0001", "And Element", "And logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndTile"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java index 1f45ada47..a1eb8103d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java @@ -6,7 +6,7 @@ public class ArgumentElement extends NonPlaceableElement { private char letter = 'A'; public ArgumentElement() { - super("STTT-UNPL-0004", "Argument Element", "Argument of logic statement element", imageName); + super("STTT-UNPL-0004", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile"); } public char getLetter() { diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java index f9c723d62..a062ffd91 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java @@ -4,6 +4,6 @@ public class BiconditionalElement extends NonPlaceableElement { public BiconditionalElement() { - super("STTT-UNPL-0002", "Biconditional Element", "Biconditional logic element", imageName); + super("STTT-UNPL-0002", "Biconditional Element", "Biconditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java index 4750845f9..845d9ec41 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java @@ -4,6 +4,6 @@ public class ConditionalElement extends NonPlaceableElement { public ConditionalElement() { - super("STTT-UNPL-0003", "Conditional Element", "Conditional logic element", imageName); + super("STTT-UNPL-0003", "Conditional Element", "Conditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java index 5a2da7ea6..a0069e7f4 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java @@ -4,6 +4,6 @@ public class NegationElement extends NonPlaceableElement { public NegationElement() { - super("STTT-UNPL-0005", "Negation Element", "Negation logic element", imageName); + super("STTT-UNPL-0005", "Negation Element", "Negation logic element", "edu/rpi/legup/images/shorttruthtable/tiles/NegationTile"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java index 18bea17a4..723e68103 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java @@ -4,6 +4,6 @@ public class OrElement extends NonPlaceableElement { public OrElement() { - super("STTT-UNPL-0006", "Or Element", "Or logic element", imageName); + super("STTT-UNPL-0006", "Or Element", "Or logic element", "edu/rpi/legup/images/shorttruthtable/tiles/OrTile"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java index d0759a9ba..ca7310037 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java @@ -6,7 +6,7 @@ public class ParenthesisElement extends NonPlaceableElement { private char parenthesis = '('; public ParenthesisElement() { - super("STTT-UNPL-0007", "Parenthesis Element", "Parenthesis element", imageName); + super("STTT-UNPL-0007", "Parenthesis Element", "Parenthesis element", "edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile"); } public char getParenthesis() { From c206a5d33c97a8602901b4bc3ea129a66fc28746 Mon Sep 17 00:00:00 2001 From: Charles Tian <46334090+charlestian23@users.noreply.github.com> Date: Tue, 14 Feb 2023 10:08:55 -0500 Subject: [PATCH 07/54] Created element classes and added placeholder tile images (#452) * Renamed Tiles classes to Elements to match package name Also added an elements reference sheet and renamed rules reference sheet accordingly * More progress made This won't compile, just saving progress made * More progress being made * Fixed file name typo and added placeholder tiles * Added image paths --- .../shorttruthtable/elements/AndElement.java | 9 +++++++ .../shorttruthtable/elements/AndTile.java | 4 --- .../elements/ArgumentElement.java | 19 +++++++++++++++ .../elements/BiconditionalElement.java | 9 +++++++ .../elements/BiconditionalTile.java | 4 --- .../elements/ConditionalElement.java | 9 +++++++ .../elements/ConditionalTile.java | 4 --- .../elements/GreenElement.java | 10 ++++++++ .../shorttruthtable/elements/GreenTile.java | 4 --- .../shorttruthtable/elements/LetterTile.java | 4 --- .../elements/NegationElement.java | 9 +++++++ .../elements/NegationTile.java | 4 --- .../shorttruthtable/elements/OrElement.java | 9 +++++++ .../shorttruthtable/elements/OrTile.java | 4 --- .../elements/ParenthesisElement.java | 23 ++++++++++++++++++ .../elements/ParenthesisTile.java | 4 --- .../shorttruthtable/elements/RedElement.java | 9 +++++++ .../shorttruthtable/elements/RedTile.java | 4 --- .../elements/UnknownElement.java | 9 +++++++ .../shorttruthtable_elements_reference_sheet | 11 +++++++++ ...shorttruthtable_rules_reference_sheet.txt} | 0 .../images/shorttruthtable/tiles/AndTile.png | Bin 0 -> 9733 bytes .../tiles/BiconditionalTile.png | Bin 0 -> 9733 bytes .../shorttruthtable/tiles/ConditionalTile.png | Bin 0 -> 9733 bytes .../shorttruthtable/tiles/GreenTile.png | Bin 0 -> 190 bytes .../shorttruthtable/tiles/LetterTile.png | Bin 0 -> 9733 bytes .../shorttruthtable/tiles/NegationTile.png | Bin 0 -> 9733 bytes .../images/shorttruthtable/tiles/OrTile.png | Bin 0 -> 9733 bytes .../shorttruthtable/tiles/ParenthesisTile.png | Bin 0 -> 9733 bytes .../images/shorttruthtable/tiles/RedTile.png | Bin 0 -> 152 bytes .../shorttruthtable/tiles/UnknownTile.png | Bin 0 -> 9733 bytes 31 files changed, 126 insertions(+), 36 deletions(-) create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet rename src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/{shorttruthtable_reference_sheet.txt => shorttruthtable_rules_reference_sheet.txt} (100%) create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/RedTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java new file mode 100644 index 000000000..f1caaec30 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class AndElement extends NonPlaceableElement { + public AndElement() { + super("STTT-UNPL-0001", "And Element", "And logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndTile"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java deleted file mode 100644 index 5c660ccb6..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class AndTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java new file mode 100644 index 000000000..a1eb8103d --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java @@ -0,0 +1,19 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class ArgumentElement extends NonPlaceableElement +{ + private char letter = 'A'; + public ArgumentElement() { + super("STTT-UNPL-0004", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile"); + } + + public char getLetter() { + return letter; + } + + public void setLetter(char letter) { + this.letter = letter; + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java new file mode 100644 index 000000000..a062ffd91 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class BiconditionalElement extends NonPlaceableElement { + public BiconditionalElement() { + super("STTT-UNPL-0002", "Biconditional Element", "Biconditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java deleted file mode 100644 index d14aebc8d..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class BiconditionalTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java new file mode 100644 index 000000000..845d9ec41 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class ConditionalElement extends NonPlaceableElement { + public ConditionalElement() { + super("STTT-UNPL-0003", "Conditional Element", "Conditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java deleted file mode 100644 index cf1b47caf..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class ConditionalTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java new file mode 100644 index 000000000..26bacec76 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java @@ -0,0 +1,10 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.PlaceableElement; + +public class GreenElement extends PlaceableElement +{ + public GreenElement() { + super("STTT-PLAC-0001", "Green Element", "A green tile to set certain tiles to true", "edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java deleted file mode 100644 index ed3ddd0e9..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class GreenTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java deleted file mode 100644 index d2b16dc30..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LetterTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class LetterTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java new file mode 100644 index 000000000..a0069e7f4 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class NegationElement extends NonPlaceableElement { + public NegationElement() { + super("STTT-UNPL-0005", "Negation Element", "Negation logic element", "edu/rpi/legup/images/shorttruthtable/tiles/NegationTile"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java deleted file mode 100644 index ab9fd8c20..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class NegationTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java new file mode 100644 index 000000000..723e68103 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class OrElement extends NonPlaceableElement { + public OrElement() { + super("STTT-UNPL-0006", "Or Element", "Or logic element", "edu/rpi/legup/images/shorttruthtable/tiles/OrTile"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java deleted file mode 100644 index 63ea84d0e..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class OrTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java new file mode 100644 index 000000000..ca7310037 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java @@ -0,0 +1,23 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class ParenthesisElement extends NonPlaceableElement { + + private char parenthesis = '('; + public ParenthesisElement() { + super("STTT-UNPL-0007", "Parenthesis Element", "Parenthesis element", "edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile"); + } + + public char getParenthesis() { + return parenthesis; + } + + public void setOpenParenthesis() { + this.parenthesis = '('; + } + + public void setClosedParenthesis() { + this.parenthesis = ')'; + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java deleted file mode 100644 index 0459eea2b..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class ParenthesisTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java new file mode 100644 index 000000000..ecc7d5a02 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.PlaceableElement; + +public class RedElement extends PlaceableElement { + public RedElement() { + super("STTT-PLAC-0002", "Red Element", "A red tile to set certain tiles to false", "edu/rpi/legup/images/shorttruthtable/tiles/RedTile.png"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java deleted file mode 100644 index 5ebad83e2..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/RedTile.java +++ /dev/null @@ -1,4 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -public class RedTile { -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java new file mode 100644 index 000000000..a250d658e --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class UnknownElement extends NonPlaceableElement { + public UnknownElement() { + super("STTT-UNPL-0008", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet new file mode 100644 index 000000000..ca6a5d83d --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet @@ -0,0 +1,11 @@ +STTT-UNPL-0001 : AndElement +STTT-UNPL-0002 : BiconditionalElement +STTT-UNPL-0003 : ConditionalElement +STTT-UNPL-0004 : LetterElement +STTT-UNPL-0005 : NegationElement +STTT-UNPL-0006 : OrElement +STTT-UNPL-0007 : ParenthesisElement +STTT-UNPL-0008 : UnknownElement + +STTT-PLAC-0001 : GreenElement +STTT-PLAC-0002 : RedElement \ No newline at end of file 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_rules_reference_sheet.txt similarity index 100% rename from src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_reference_sheet.txt rename to src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/shorttruthtable_rules_reference_sheet.txt diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71JTw$u`85t7w9`&1}$ zLV%cYr}?eqF8h<$VR6%!zwsxBTwlC4f7m!$wgpLj$gQ#E6_0HAgXsu4+5Rftm(M^` zb9ZXQ+BZvr# zz6Mt1Dw9>;B2vV(;j$@!%fGoAce8kh*a27nlB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V@fmV^Qcd@G2(WgC4-bLLk66_^Q^Z*8dWORf?V=4X$K_vWb?-#)ET?>au&?NbisDLUH z@CyIUrHPrP)!!DY6nIjoerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)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PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71JTw$u`85t7w9`&1}$ zLV%cYr}?eqF8h<$VR6%!zwsxBTwlC4f7m!$wgpLj$gQ#E6_0HAgXsu4+5Rftm(M^` zb9ZXQ+BZvr# zz6Mt1Dw9>;B2vV(;j$@!%fGoAce8kh*a27nlBfO(Cj>orwEy|>NlRdub1;7b73%CLB?4~x%*w1=ytE@?bobt?62fI7@wAl3qRUwq+r+~OEB+7 zK4d%^xSRxTJZE|L73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oerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png new file mode 100644 index 0000000000000000000000000000000000000000..a438e30375f0598657b2a7e3873d3d03655a5b31 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=G^tAk28_ZrvZCV6dl)V@QPi(G!M@K;u{zuFosdJy64^lau~k lJFPP^Y1#}`(x|jD`L~l9qAz|@;AI@C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZE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UiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71JTw$u`85t7w9`&1}$ zLV%cYr}?eqF8h<$VR6%!zwsxBTwlC4f7m!$wgpLj$gQ#E6_0HAgXsu4+5Rftm(M^` zb9ZXQ+BZvr# zz6Mt1Dw9>;B2vV(;j$@!%fGoAce8kh*a27nlBfO(Cj>orwEy|>NlRdub1;7b73%CLB?4~x%*w1=ytE@?bobt?62fI7@wAl3qRUwq+r+~OEB+7 zK4d%^xSRxTJZE|L73rd3=Qid}(~BOl>QxcBO6TqJ(oWsT`6_q4)4}%rNjvYm4~Cty z^PzV;5`5mWUb`+}S(C+A!tcbty!TbOlS8mnwl&n;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u-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U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98$P=^U-U?DcPx@K9h=zsjc5bm#yZk zrwCmt)dxgn+NGtx^KMA}{7rkCXghEQl%)V?JqJq*41rG7z!T{nBn=ML4>${gK)dxh zet3cpi3Ro`c~WRt$W(bX1WX}fA@*99FiSr}k{87^h(WRq+HXe)@*(IFA^LhkyEzyD zfJ$QF!5peDjfvr4A#1o8;C@xC2?4LEuzau(2TLokA)P@2qcl(&FsKoSas&a<69VsM z5Xl%DobgWx;0X)yVzK-%nwo4jTZ4_%pffx*;kvrInlOYW0s#dypv*uT3(tYln2M_q zKQM44CV@fmV^Qcd@G2(WgC4-bLLk66_^Q^Z*8dWORf?V=4X$K_vWb?-#)ET?>au&?NbisDLUH z@CyIUrHPrP)!!DY6nIjoerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png new file mode 100644 index 0000000000000000000000000000000000000000..850fbf127f04020fe83c6a4f6db75078967916ea GIT binary patch literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71JTw$u`85t7w9`&1}$ zLV%cYr}?eqF8h<$VR6%!zwsxBTwlC4f7m!$wgpLj$gQ#E6_0HAgXsu4+5Rftm(M^` zb9ZXQ+BZvr# zz6Mt1Dw9>;B2vV(;j$@!%fGoAce8kh*a27nlBfO(Cj>orwEy|>NlRdub1;7b73%CLB?4~x%*w1=ytE@?bobt?62fI7@wAl3qRUwq+r+~OEB+7 zK4d%^xSRxTJZE|L73rd3=Qid}(~BOl>QxcBO6TqJ(oWsT`6_q4)4}%rNjvYm4~Cty z^PzV;5`5mWUb`+}S(C+A!tcbty!TbOlS8mnwl&n;Rz zdq7z5XUQN&WuCCGN|L=r(pNUDEiY05)+W$_hPBm4(o?;Zru3A{CYptndp3`2D3^)9 zQ?ZyeojIC1Dm|uR!P4UZ7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c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/RedTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/RedTile.png new file mode 100644 index 0000000000000000000000000000000000000000..7955c8f922c2d81dca29fc6bece9d2351971c219 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=G_YAk0{w5C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71J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EzyD zfJ$QF!5peDjfvr4A#1o8;C@xC2?4LEuzau(2TLokA)P@2qcl(&FsKoSas&a<69VsM z5Xl%DobgWx;0X)yVzK-%nwo4jTZ4_%pffx*;kvrInlOYW0s#dypv*uT3(tYln2M_q zKQM44CV@fmV^Qcd@G2(WgC4-bLLk66_^Q^Z*8dWORf?V=4X$K_vWb?-#)ET?>au&?NbisDLUH z@CyIUrHPrP)!!DY6nIjoerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB literal 0 HcmV?d00001 From a32904dfe1b3a99d10f7121ac6205fcbe61c10cc Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Wed, 8 Mar 2023 20:48:05 -0500 Subject: [PATCH 08/54] Set the current board on boardView --- .../edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java index 3ce185b6c..762092655 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java @@ -25,6 +25,7 @@ public ShortTruthTable() { public void initializeView() { ShortTruthTableBoard sttBoard = (ShortTruthTableBoard) currentBoard; boardView = new ShortTruthTableView(sttBoard); + boardView.setBoard(currentBoard); addBoardListener(boardView); } From 0266d7f77468b547fb3b20f614858e94b147d10a Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Wed, 8 Mar 2023 21:03:59 -0500 Subject: [PATCH 09/54] Fixed typo and turned on STT puzzle editor for testing --- bin/main/edu/rpi/legup/legup/config | 2 +- .../legup/puzzle/shorttruthtable/ShortTruthTableController.java | 2 +- src/main/resources/edu/rpi/legup/legup/config | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/main/edu/rpi/legup/legup/config b/bin/main/edu/rpi/legup/legup/config index 8e3b4b84c..7257407f0 100644 --- a/bin/main/edu/rpi/legup/legup/config +++ b/bin/main/edu/rpi/legup/legup/config @@ -27,7 +27,7 @@ + fileCreationDisabled="false"/> diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java index a870f38cd..bddde44a5 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java @@ -12,7 +12,7 @@ public void changeCell(MouseEvent e, PuzzleElement data) { System.out.println("STTController: Cell change"); - //cast the data to a short truth tablce cell + // cast the data to a short truth table cell ShortTruthTableCell cell = (ShortTruthTableCell) data; if (e.getButton() == MouseEvent.BUTTON1) { diff --git a/src/main/resources/edu/rpi/legup/legup/config b/src/main/resources/edu/rpi/legup/legup/config index bb7da871a..24fdcf365 100644 --- a/src/main/resources/edu/rpi/legup/legup/config +++ b/src/main/resources/edu/rpi/legup/legup/config @@ -27,7 +27,7 @@ + fileCreationDisabled="false"/> From dd882c850342f9035628275aa9ffce6c637ffd2d Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Wed, 8 Mar 2023 21:13:42 -0500 Subject: [PATCH 10/54] Added preliminary valid dimensions checker This will most definitely change in the future, hopefully can change to accept a number of statements --- .../rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java index 762092655..3907a67ef 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java @@ -49,8 +49,11 @@ public Board generatePuzzle(int difficulty) { * @return true if the given dimensions are valid for Short Truth Table, false otherwise */ public boolean isValidDimensions(int rows, int columns) { - // This is a placeholder, this method needs to be implemented - throw new UnsupportedOperationException(); + // Number of rows must be odd to allow for proper spacing between the statements + if (rows % 2 != 1) + return false; + + return true; } /** From 198cbcc3ca0726386a0dda427ad3bdcc91f74cde Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Wed, 8 Mar 2023 21:25:37 -0500 Subject: [PATCH 11/54] Fixed image file paths --- .../rpi/legup/puzzle/shorttruthtable/elements/AndElement.java | 2 +- .../legup/puzzle/shorttruthtable/elements/ArgumentElement.java | 2 +- .../puzzle/shorttruthtable/elements/BiconditionalElement.java | 2 +- .../puzzle/shorttruthtable/elements/ConditionalElement.java | 2 +- .../legup/puzzle/shorttruthtable/elements/NegationElement.java | 2 +- .../rpi/legup/puzzle/shorttruthtable/elements/OrElement.java | 2 +- .../puzzle/shorttruthtable/elements/ParenthesisElement.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java index f1caaec30..72093490c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java @@ -4,6 +4,6 @@ public class AndElement extends NonPlaceableElement { public AndElement() { - super("STTT-UNPL-0001", "And Element", "And logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndTile"); + super("STTT-UNPL-0001", "And Element", "And logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java index a1eb8103d..666cf21d0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java @@ -6,7 +6,7 @@ public class ArgumentElement extends NonPlaceableElement { private char letter = 'A'; public ArgumentElement() { - super("STTT-UNPL-0004", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile"); + super("STTT-UNPL-0004", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png"); } public char getLetter() { diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java index a062ffd91..e29749582 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java @@ -4,6 +4,6 @@ public class BiconditionalElement extends NonPlaceableElement { public BiconditionalElement() { - super("STTT-UNPL-0002", "Biconditional Element", "Biconditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile"); + super("STTT-UNPL-0002", "Biconditional Element", "Biconditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java index 845d9ec41..cb89e4efb 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java @@ -4,6 +4,6 @@ public class ConditionalElement extends NonPlaceableElement { public ConditionalElement() { - super("STTT-UNPL-0003", "Conditional Element", "Conditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile"); + super("STTT-UNPL-0003", "Conditional Element", "Conditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java index a0069e7f4..4be1bc612 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java @@ -4,6 +4,6 @@ public class NegationElement extends NonPlaceableElement { public NegationElement() { - super("STTT-UNPL-0005", "Negation Element", "Negation logic element", "edu/rpi/legup/images/shorttruthtable/tiles/NegationTile"); + super("STTT-UNPL-0005", "Negation Element", "Negation logic element", "edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java index 723e68103..709a5e962 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java @@ -4,6 +4,6 @@ public class OrElement extends NonPlaceableElement { public OrElement() { - super("STTT-UNPL-0006", "Or Element", "Or logic element", "edu/rpi/legup/images/shorttruthtable/tiles/OrTile"); + super("STTT-UNPL-0006", "Or Element", "Or logic element", "edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java index ca7310037..cb3ba9e19 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java @@ -6,7 +6,7 @@ public class ParenthesisElement extends NonPlaceableElement { private char parenthesis = '('; public ParenthesisElement() { - super("STTT-UNPL-0007", "Parenthesis Element", "Parenthesis element", "edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile"); + super("STTT-UNPL-0007", "Parenthesis Element", "Parenthesis element", "edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png"); } public char getParenthesis() { From 9f8cb967c36f13549cc32d176557c03c00570018 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 17 Mar 2023 10:25:09 -0400 Subject: [PATCH 12/54] Added ActionListener Allows us to determine what puzzle is selected by the user --- src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java index 0805a78cf..bd79073ea 100644 --- a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java +++ b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java @@ -15,6 +15,14 @@ public class CreatePuzzleDialog extends JDialog { private String[] games; private JComboBox gameBox; + private ActionListener gameBoxListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + JComboBox comboBox = (JComboBox) e.getSource(); + String puzzleName = (String) comboBox.getSelectedItem(); + System.out.println(puzzleName); + } + }; private JLabel puzzleLabel = new JLabel("Puzzle:"); private JTextField rows; @@ -105,6 +113,8 @@ public CreatePuzzleDialog(JFrame parent, HomePanel homePanel) { c.add(ok); c.add(cancel); + ActionListener cursorSelectedGame = CursorController.createListener(this, gameBoxListener); + gameBox.addActionListener(cursorSelectedGame); ActionListener cursorPressedOk = CursorController.createListener(this, okButtonListener); ok.addActionListener(cursorPressedOk); ActionListener cursorPressedCancel = CursorController.createListener(this, cancelButtonListener); From 51e6d95da892eb1cac8cf03ff787254686555dd6 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 17 Mar 2023 10:36:27 -0400 Subject: [PATCH 13/54] Hide rows and columns input for Short Truth Table --- .../edu/rpi/legup/ui/CreatePuzzleDialog.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java index bd79073ea..0ef600b80 100644 --- a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java +++ b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java @@ -20,12 +20,25 @@ public class CreatePuzzleDialog extends JDialog { public void actionPerformed(ActionEvent e) { JComboBox comboBox = (JComboBox) e.getSource(); String puzzleName = (String) comboBox.getSelectedItem(); - System.out.println(puzzleName); + if (puzzleName.equals("ShortTruthTable")) { + rowsLabel.setVisible(false); + rows.setVisible(false); + columnsLabel.setVisible(false); + columns.setVisible(false); + } + else { + rowsLabel.setVisible(true); + rows.setVisible(true); + columnsLabel.setVisible(true); + columns.setVisible(true); + } } }; private JLabel puzzleLabel = new JLabel("Puzzle:"); + private JLabel rowsLabel; private JTextField rows; + private JLabel columnsLabel; private JTextField columns; private JButton ok = new JButton("Ok"); @@ -95,8 +108,8 @@ public CreatePuzzleDialog(JFrame parent, HomePanel homePanel) { rows = new JTextField(); columns = new JTextField(); - JLabel rowsLabel = new JLabel("Rows:"); - JLabel columnsLabel = new JLabel("Columns:"); + rowsLabel = new JLabel("Rows:"); + columnsLabel = new JLabel("Columns:"); rowsLabel.setBounds(30, 70, 60, 25); columnsLabel.setBounds(30, 95, 60, 25); From 23566acd18708c35629519f2ab172c75155b0c79 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 17 Mar 2023 11:03:10 -0400 Subject: [PATCH 14/54] Added text area for Short Truth Table --- .../edu/rpi/legup/ui/CreatePuzzleDialog.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java index 0ef600b80..1823ba4bd 100644 --- a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java +++ b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java @@ -21,12 +21,14 @@ public void actionPerformed(ActionEvent e) { JComboBox comboBox = (JComboBox) e.getSource(); String puzzleName = (String) comboBox.getSelectedItem(); if (puzzleName.equals("ShortTruthTable")) { + shortTruthTableTextArea.setVisible(true); rowsLabel.setVisible(false); rows.setVisible(false); columnsLabel.setVisible(false); columns.setVisible(false); } else { + shortTruthTableTextArea.setVisible(false); rowsLabel.setVisible(true); rows.setVisible(true); columnsLabel.setVisible(true); @@ -35,12 +37,14 @@ public void actionPerformed(ActionEvent e) { } }; - private JLabel puzzleLabel = new JLabel("Puzzle:"); + private JLabel puzzleLabel; private JLabel rowsLabel; private JTextField rows; private JLabel columnsLabel; private JTextField columns; + private JTextArea shortTruthTableTextArea; + private JButton ok = new JButton("Ok"); private ActionListener okButtonListener = new ActionListener() { /** @@ -96,6 +100,7 @@ public CreatePuzzleDialog(JFrame parent, HomePanel homePanel) { Container c = getContentPane(); c.setLayout(null); + puzzleLabel = new JLabel("Puzzle:"); puzzleLabel.setBounds(10, 30, 70, 25); gameBox.setBounds(80, 30, 190, 25); @@ -123,9 +128,28 @@ public CreatePuzzleDialog(JFrame parent, HomePanel homePanel) { c.add(rows); c.add(columns); + shortTruthTableTextArea = new JTextArea(); + shortTruthTableTextArea.setBounds(10, 70, this.getWidth() - 30, 50); + c.add(shortTruthTableTextArea); + c.add(ok); c.add(cancel); + if (this.gameBox.getSelectedItem().equals("ShortTruthTable")) { + this.shortTruthTableTextArea.setVisible(true); + rowsLabel.setVisible(false); + rows.setVisible(false); + columnsLabel.setVisible(false); + columns.setVisible(false); + } + else { + shortTruthTableTextArea.setVisible(false); + rowsLabel.setVisible(true); + rows.setVisible(true); + columnsLabel.setVisible(true); + columns.setVisible(true); + } + ActionListener cursorSelectedGame = CursorController.createListener(this, gameBoxListener); gameBox.addActionListener(cursorSelectedGame); ActionListener cursorPressedOk = CursorController.createListener(this, okButtonListener); From 007a569eedda43c7a38533e820ebb0028e38a490 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 17 Mar 2023 11:08:45 -0400 Subject: [PATCH 15/54] Added scrollbars to show up as needed --- .../java/edu/rpi/legup/ui/CreatePuzzleDialog.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java index 1823ba4bd..3b392a275 100644 --- a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java +++ b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java @@ -1,5 +1,6 @@ package edu.rpi.legup.ui; +import com.sun.org.apache.bcel.internal.generic.JSR; import edu.rpi.legup.app.Config; import edu.rpi.legup.app.GameBoardFacade; import edu.rpi.legup.controller.CursorController; @@ -21,14 +22,14 @@ public void actionPerformed(ActionEvent e) { JComboBox comboBox = (JComboBox) e.getSource(); String puzzleName = (String) comboBox.getSelectedItem(); if (puzzleName.equals("ShortTruthTable")) { - shortTruthTableTextArea.setVisible(true); + shortTruthTableStatementsScrollPane.setVisible(true); rowsLabel.setVisible(false); rows.setVisible(false); columnsLabel.setVisible(false); columns.setVisible(false); } else { - shortTruthTableTextArea.setVisible(false); + shortTruthTableStatementsScrollPane.setVisible(false); rowsLabel.setVisible(true); rows.setVisible(true); columnsLabel.setVisible(true); @@ -44,6 +45,7 @@ public void actionPerformed(ActionEvent e) { private JTextField columns; private JTextArea shortTruthTableTextArea; + private JScrollPane shortTruthTableStatementsScrollPane; private JButton ok = new JButton("Ok"); private ActionListener okButtonListener = new ActionListener() { @@ -129,21 +131,22 @@ public CreatePuzzleDialog(JFrame parent, HomePanel homePanel) { c.add(columns); shortTruthTableTextArea = new JTextArea(); - shortTruthTableTextArea.setBounds(10, 70, this.getWidth() - 30, 50); - c.add(shortTruthTableTextArea); + shortTruthTableStatementsScrollPane = new JScrollPane (shortTruthTableTextArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + shortTruthTableStatementsScrollPane.setBounds(10, 70, this.getWidth() - 30, 50); + c.add(shortTruthTableStatementsScrollPane); c.add(ok); c.add(cancel); if (this.gameBox.getSelectedItem().equals("ShortTruthTable")) { - this.shortTruthTableTextArea.setVisible(true); + shortTruthTableStatementsScrollPane.setVisible(true); rowsLabel.setVisible(false); rows.setVisible(false); columnsLabel.setVisible(false); columns.setVisible(false); } else { - shortTruthTableTextArea.setVisible(false); + shortTruthTableStatementsScrollPane.setVisible(false); rowsLabel.setVisible(true); rows.setVisible(true); columnsLabel.setVisible(true); From 28c424fe1ad6df538afc9d7d05506b894ce16b2f Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 17 Mar 2023 11:34:45 -0400 Subject: [PATCH 16/54] Reformatted code --- .../edu/rpi/legup/ui/CreatePuzzleDialog.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java index 3b392a275..f00c21d47 100644 --- a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java +++ b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java @@ -56,24 +56,24 @@ public void actionPerformed(ActionEvent e) { @Override public void actionPerformed(ActionEvent ae) { String game = Config.convertDisplayNameToClassName((String) gameBox.getSelectedItem()); - + // Check if all 3 TextFields are filled if (game.equals("") || rows.getText().equals("") || columns.getText().equals("")) { System.out.println("Unfilled fields"); return; } - + try { homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(rows.getText()), Integer.valueOf(columns.getText())); setVisible(false); } - catch (IllegalArgumentException e) { + catch (IllegalArgumentException e) { System.out.println("Failed to open editor with new puzzle"); e.printStackTrace(System.out); } } }; - + private JButton cancel = new JButton("Cancel"); private ActionListener cancelButtonListener = new ActionListener() { /** @@ -131,7 +131,7 @@ public CreatePuzzleDialog(JFrame parent, HomePanel homePanel) { c.add(columns); shortTruthTableTextArea = new JTextArea(); - shortTruthTableStatementsScrollPane = new JScrollPane (shortTruthTableTextArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + shortTruthTableStatementsScrollPane = new JScrollPane(shortTruthTableTextArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); shortTruthTableStatementsScrollPane.setBounds(10, 70, this.getWidth() - 30, 50); c.add(shortTruthTableStatementsScrollPane); @@ -171,20 +171,22 @@ public void initPuzzles() { public void actionPerformed(ActionEvent e) { if (e.getSource() == ok) { String game = Config.convertDisplayNameToClassName((String) gameBox.getSelectedItem()); - + try { this.homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(this.rows.getText()), Integer.valueOf(this.columns.getText())); this.setVisible(false); } - catch (IllegalArgumentException exception) { + catch (IllegalArgumentException exception) { // Don't do anything. This is here to prevent the dialog from closing if the dimensions are invalid. } } - else if (e.getSource() == cancel) { - this.setVisible(false); - } - else { - // Unknown Action Event + else { + if (e.getSource() == cancel) { + this.setVisible(false); + } + else { + // Unknown Action Event + } } } } \ No newline at end of file From 1866116236d2e510e6d522e942537c6b54bbfad1 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 17 Mar 2023 11:39:34 -0400 Subject: [PATCH 17/54] More code reformatting --- .../puzzle/shorttruthtable/elements/ArgumentElement.java | 5 ++--- .../legup/puzzle/shorttruthtable/elements/GreenElement.java | 3 +-- .../puzzle/shorttruthtable/elements/ParenthesisElement.java | 2 +- .../puzzle/shorttruthtable/elements/UnknownElement.java | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java index 6d50e6137..fbc7b0a8b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java @@ -2,10 +2,9 @@ import edu.rpi.legup.model.elements.NonPlaceableElement; -public class ArgumentElement extends NonPlaceableElement -{ +public class ArgumentElement extends NonPlaceableElement { private char letter = 'A'; - + public ArgumentElement() { super("STTT-UNPL-0004", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java index 26bacec76..605f6a207 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/GreenElement.java @@ -2,8 +2,7 @@ import edu.rpi.legup.model.elements.PlaceableElement; -public class GreenElement extends PlaceableElement -{ +public class GreenElement extends PlaceableElement { public GreenElement() { super("STTT-PLAC-0001", "Green Element", "A green tile to set certain tiles to true", "edu/rpi/legup/images/shorttruthtable/tiles/GreenTile.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java index 1267ba3bf..91fd5760a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java @@ -5,7 +5,7 @@ public class ParenthesisElement extends NonPlaceableElement { private char parenthesis = '('; - + public ParenthesisElement() { super("STTT-UNPL-0007", "Parenthesis Element", "Parenthesis element", "edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java index a250d658e..016dad75c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java @@ -3,7 +3,7 @@ import edu.rpi.legup.model.elements.NonPlaceableElement; public class UnknownElement extends NonPlaceableElement { - public UnknownElement() { + public UnknownElement() { super("STTT-UNPL-0008", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); } } From 3b8797ec3b081555776dd141082438144028feb9 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 17 Mar 2023 11:41:28 -0400 Subject: [PATCH 18/54] Even more reformatting --- .../rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java | 3 ++- .../shorttruthtable/rules/basic/DirectRule_Generic.java | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java index 3907a67ef..1ee73f076 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java @@ -50,8 +50,9 @@ public Board generatePuzzle(int difficulty) { */ public boolean isValidDimensions(int rows, int columns) { // Number of rows must be odd to allow for proper spacing between the statements - if (rows % 2 != 1) + if (rows % 2 != 1) { return false; + } return true; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/DirectRule_Generic.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/DirectRule_Generic.java index bafdb6daa..a9b9ab651 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/DirectRule_Generic.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/rules/basic/DirectRule_Generic.java @@ -40,13 +40,13 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement element) { PuzzleElement checkElement = this.ELIMINATION_RULE - ? parentCell.getStatementReference().getParentStatement().getCell() - : element; + ? parentCell.getStatementReference().getParentStatement().getCell() + : element; ShortTruthTableCell checkCell = this.ELIMINATION_RULE - ? (ShortTruthTableCell) modifiedBoard.getCell(parentCell.getX(), parentCell.getY()) - : (ShortTruthTableCell) modifiedBoard.getPuzzleElement(element); + ? (ShortTruthTableCell) modifiedBoard.getCell(parentCell.getX(), parentCell.getY()) + : (ShortTruthTableCell) modifiedBoard.getPuzzleElement(element); checkCell.setType(finalCell.getType().getNegation()); From 8addfb1bb450b3bfce9a58958edd631bb0baa6e4 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Mon, 20 Mar 2023 08:58:24 -0400 Subject: [PATCH 19/54] Separate the data from the TextArea into different lines --- .../edu/rpi/legup/ui/CreatePuzzleDialog.java | 23 +++++++++++++++---- src/main/java/edu/rpi/legup/ui/HomePanel.java | 8 +++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java index f00c21d47..82c941e33 100644 --- a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java +++ b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java @@ -51,20 +51,29 @@ public void actionPerformed(ActionEvent e) { private ActionListener okButtonListener = new ActionListener() { /** * Attempts to open the puzzle editor interface for the given game with the given dimensions - * @param e the event to be processed + * @param ae the event to be processed */ @Override public void actionPerformed(ActionEvent ae) { String game = Config.convertDisplayNameToClassName((String) gameBox.getSelectedItem()); // Check if all 3 TextFields are filled - if (game.equals("") || rows.getText().equals("") || columns.getText().equals("")) { + if (game.equals("ShortTruthTable") && shortTruthTableTextArea.getText().equals("")) { + System.out.println("Unfilled fields"); + return; + } + if (!game.equals("ShortTruthTable") && (game.equals("") || rows.getText().equals("") || columns.getText().equals(""))) { System.out.println("Unfilled fields"); return; } try { - homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(rows.getText()), Integer.valueOf(columns.getText())); + if (game.equals("ShortTruthTable")) { + homePanel.openEditorWithShortTruthTable(shortTruthTableTextArea.getText().split("\n")); + } + else { + homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(rows.getText()), Integer.valueOf(columns.getText())); + } setVisible(false); } catch (IllegalArgumentException e) { @@ -173,7 +182,13 @@ public void actionPerformed(ActionEvent e) { String game = Config.convertDisplayNameToClassName((String) gameBox.getSelectedItem()); try { - this.homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(this.rows.getText()), Integer.valueOf(this.columns.getText())); + if (game.equals("ShortTruthTable")) { + this.homePanel.openEditorWithShortTruthTable(this.shortTruthTableTextArea.getText().split("\n")); + } + else { + this.homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(this.rows.getText()), Integer.valueOf(this.columns.getText())); + + } this.setVisible(false); } catch (IllegalArgumentException exception) { diff --git a/src/main/java/edu/rpi/legup/ui/HomePanel.java b/src/main/java/edu/rpi/legup/ui/HomePanel.java index ebcada652..b601970e2 100644 --- a/src/main/java/edu/rpi/legup/ui/HomePanel.java +++ b/src/main/java/edu/rpi/legup/ui/HomePanel.java @@ -703,4 +703,12 @@ public void openEditorWithNewPuzzle(String game, int rows, int columns) throws I this.legupUI.displayPanel(2); this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, rows, columns); } + + public void openEditorWithShortTruthTable(String[] statements) { + GameBoardFacade facade = GameBoardFacade.getInstance(); + + // Set game type on the puzzle editor + this.legupUI.displayPanel(2); + this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, rows, columns); + } } From 7b2d2f7ce16edebe0639b78eeda616845fde18b6 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Mon, 20 Mar 2023 09:13:22 -0400 Subject: [PATCH 20/54] Did some researching/testing Tested certain variable values with a STT file with no true/false values --- puzzles files/shorttruthtable/empty_test.xml | 14 ++++++++++++++ .../shorttruthtable/ShortTruthTableImporter.java | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 puzzles files/shorttruthtable/empty_test.xml diff --git a/puzzles files/shorttruthtable/empty_test.xml b/puzzles files/shorttruthtable/empty_test.xml new file mode 100644 index 000000000..2d8e4b6c8 --- /dev/null +++ b/puzzles files/shorttruthtable/empty_test.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index 347175867..93acd73e8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -65,7 +65,10 @@ private int parseAllStatmentsAndCells(final NodeList statementData, //Get the atributes from the statement i in the file NamedNodeMap attributeList = statementData.item(i).getAttributes(); + String statementRep = attributeList.getNamedItem("representation").getNodeValue(); + System.out.println("STATEMENT REP: " + statementRep); + System.out.println("ROW INDEX: " + attributeList.getNamedItem("row_index").getNodeValue()); //parser time (on statementRep) //if (!validGrammar(statementRep)) throw some error if (!validGrammar(statementRep)) { From 69e45627805bf5e7457c806bb197d0a955abce22 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 21 Mar 2023 10:09:00 -0400 Subject: [PATCH 21/54] Made more progress Added new methods to handle creating Short Truth Table boards from an array of strings --- .../ShortTruthTableImporter.java | 47 +++++++++++++++++-- src/main/java/edu/rpi/legup/ui/HomePanel.java | 4 +- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index 93acd73e8..b695d3563 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -54,9 +54,9 @@ private List getCells(String statement, int y) { * @param statements returns all the statements * @return the length, in chars, of the longest statement */ - private int parseAllStatmentsAndCells(final NodeList statementData, - List> allCells, - List statements) throws InvalidFileFormatException { + private int parseAllStatementsAndCells(final NodeList statementData, + List> allCells, + List statements) throws InvalidFileFormatException { int maxStatementLength = 0; @@ -88,7 +88,29 @@ private int parseAllStatmentsAndCells(final NodeList statementData, } return maxStatementLength; + } + + private int parseAllStatementsAndCells(String[] statementData, + List> allCells, + List statements) { + int maxStatementLength = 0; + + for (int i = 0; i < statementData.length; i++) { + if (!validGrammar(statementData[i])) { + JOptionPane.showMessageDialog(null, "ERROR: Invalid file syntax"); + throw new InvalidFileFormatException("shorttruthtable importer: invalid sentence syntax"); + } + + //get the cells for the statement + List rowOfCells = getCells(statementData[i], i * 2); + allCells.add(rowOfCells); + statements.add(new ShortTruthTableStatement(statementData[i], rowOfCells)); + //keep track of the length of the longest statement + maxStatementLength = Math.max(maxStatementLength, statementData[i].length()); + } + + return maxStatementLength; } private boolean validGrammar(String sentence) { @@ -267,7 +289,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { //Parse the data - int maxStatementLength = parseAllStatmentsAndCells(statementData, allCells, statements); + int maxStatementLength = parseAllStatementsAndCells(statementData, allCells, statements); //generate the board ShortTruthTableBoard sttBoard = generateBoard(allCells, statements, maxStatementLength); @@ -281,9 +303,24 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { catch (NumberFormatException e) { throw new InvalidFileFormatException("short truth table Importer: unknown value where integer expected"); } + } + public void initializeBoard(String[] statementData) throws InvalidFileFormatException { + // TODO: finish this method, check exception handling + + if (statementData.length == 0) { + throw new InvalidFileFormatException("short truth table Importer: no statements found for board"); + } - } + // Store all cells and statements + List> allCells = new ArrayList>() + List statements = new ArrayList(); + // Parse the data + int maxStatementLength = parseAllStatementsAndCells(statementData, allCells, statements);\ + // Generate and set the board - don't set given cell values since none are given + ShortTruthTableBoard sttBoard = generateBoard(allCells, statements, maxStatementLength); + puzzle.setCurrentBoard(sttBoard); + } } diff --git a/src/main/java/edu/rpi/legup/ui/HomePanel.java b/src/main/java/edu/rpi/legup/ui/HomePanel.java index b601970e2..c84a68b15 100644 --- a/src/main/java/edu/rpi/legup/ui/HomePanel.java +++ b/src/main/java/edu/rpi/legup/ui/HomePanel.java @@ -708,7 +708,7 @@ public void openEditorWithShortTruthTable(String[] statements) { GameBoardFacade facade = GameBoardFacade.getInstance(); // Set game type on the puzzle editor - this.legupUI.displayPanel(2); - this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, rows, columns); + //this.legupUI.displayPanel(2); + //this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, rows, columns); } } From 563d928b909c97d65c55881a4adfd9afe6343c51 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 21 Mar 2023 17:00:59 -0400 Subject: [PATCH 22/54] Added a bunch of TODOs - Implemented a couple functions to be used later - Added a bunch of TODO comments for future work --- .../java/edu/rpi/legup/app/GameBoardFacade.java | 10 +++++++++- .../java/edu/rpi/legup/model/PuzzleImporter.java | 4 ++++ .../shorttruthtable/ShortTruthTableImporter.java | 10 +++++----- .../java/edu/rpi/legup/ui/CreatePuzzleDialog.java | 5 ++--- src/main/java/edu/rpi/legup/ui/HomePanel.java | 12 ++++-------- .../java/edu/rpi/legup/ui/PuzzleEditorPanel.java | 15 +++++++++++++++ 6 files changed, 39 insertions(+), 17 deletions(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index a8a0bce6d..ba14268c5 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -150,12 +150,16 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti LOGGER.debug("Loading " + qualifiedClassName); try { + // TODO: test and make sure this doesn't break anything + PuzzleImporter importer = puzzle.getImporter(); + if (!importer.acceptsRowsAndColumnsInput()) + throw new IllegalArgumentException(puzzle.getName() + " does not accept rows and columns input"); + Class c = Class.forName(qualifiedClassName); Constructor cons = c.getConstructor(); Puzzle puzzle = (Puzzle) cons.newInstance(); setWindowTitle(puzzle.getName(), "New " + puzzle.getName() + " Puzzle"); - PuzzleImporter importer = puzzle.getImporter(); if (importer == null) { LOGGER.error("Puzzle importer is null"); throw new RuntimeException("Puzzle importer null"); @@ -177,6 +181,10 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti } } + public void loadPuzzle(String game, String[] statements) { + // TODO: implement this method + } + /** * Loads a puzzle file * diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index b72beac68..3009aef3f 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -29,6 +29,10 @@ public PuzzleImporter(Puzzle puzzle) { this.puzzle = puzzle; } + // TODO: add these methods to all importers + public abstract boolean acceptsRowsAndColumnsInput(); + public abstract boolean acceptsTextInput(); + /** * Initializes an empty puzzle * diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index b695d3563..aab4190b0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -92,7 +92,7 @@ private int parseAllStatementsAndCells(final NodeList statementData, private int parseAllStatementsAndCells(String[] statementData, List> allCells, - List statements) { + List statements) throws InvalidFileFormatException { int maxStatementLength = 0; for (int i = 0; i < statementData.length; i++) { @@ -307,17 +307,17 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { public void initializeBoard(String[] statementData) throws InvalidFileFormatException { // TODO: finish this method, check exception handling - + if (statementData.length == 0) { throw new InvalidFileFormatException("short truth table Importer: no statements found for board"); } // Store all cells and statements - List> allCells = new ArrayList>() - List statements = new ArrayList(); + List> allCells = new ArrayList<>(); + List statements = new ArrayList<>(); // Parse the data - int maxStatementLength = parseAllStatementsAndCells(statementData, allCells, statements);\ + int maxStatementLength = parseAllStatementsAndCells(statementData, allCells, statements); // Generate and set the board - don't set given cell values since none are given ShortTruthTableBoard sttBoard = generateBoard(allCells, statements, maxStatementLength); diff --git a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java index 82c941e33..d943e2f82 100644 --- a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java +++ b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java @@ -1,6 +1,5 @@ package edu.rpi.legup.ui; -import com.sun.org.apache.bcel.internal.generic.JSR; import edu.rpi.legup.app.Config; import edu.rpi.legup.app.GameBoardFacade; import edu.rpi.legup.controller.CursorController; @@ -69,7 +68,7 @@ public void actionPerformed(ActionEvent ae) { try { if (game.equals("ShortTruthTable")) { - homePanel.openEditorWithShortTruthTable(shortTruthTableTextArea.getText().split("\n")); + homePanel.openEditorWithNewPuzzle("ShortTruthTable", shortTruthTableTextArea.getText().split("\n")); } else { homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(rows.getText()), Integer.valueOf(columns.getText())); @@ -183,7 +182,7 @@ public void actionPerformed(ActionEvent e) { try { if (game.equals("ShortTruthTable")) { - this.homePanel.openEditorWithShortTruthTable(this.shortTruthTableTextArea.getText().split("\n")); + this.homePanel.openEditorWithNewPuzzle("ShortTruthTable", this.shortTruthTableTextArea.getText().split("\n")); } else { this.homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(this.rows.getText()), Integer.valueOf(this.columns.getText())); diff --git a/src/main/java/edu/rpi/legup/ui/HomePanel.java b/src/main/java/edu/rpi/legup/ui/HomePanel.java index c84a68b15..7ece9efce 100644 --- a/src/main/java/edu/rpi/legup/ui/HomePanel.java +++ b/src/main/java/edu/rpi/legup/ui/HomePanel.java @@ -1,11 +1,9 @@ package edu.rpi.legup.ui; -import edu.rpi.legup.Legup; import edu.rpi.legup.app.GameBoardFacade; import edu.rpi.legup.app.LegupPreferences; import edu.rpi.legup.controller.CursorController; import edu.rpi.legup.save.InvalidFileFormatException; -import edu.rpi.legup.app.LegupPreferences; import edu.rpi.legup.model.Puzzle; import javax.swing.*; @@ -28,7 +26,6 @@ import java.io.FileWriter; import java.net.URI; import java.net.URL; -import java.util.Objects; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -704,11 +701,10 @@ public void openEditorWithNewPuzzle(String game, int rows, int columns) throws I this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, rows, columns); } - public void openEditorWithShortTruthTable(String[] statements) { - GameBoardFacade facade = GameBoardFacade.getInstance(); - + public void openEditorWithNewPuzzle(String game, String[] statements) { // Set game type on the puzzle editor - //this.legupUI.displayPanel(2); - //this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, rows, columns); + this.legupUI.displayPanel(2); + // TODO: finish testing this function + this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, statements); } } diff --git a/src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java b/src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java index 156bc2405..72b2901d9 100644 --- a/src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java +++ b/src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java @@ -304,6 +304,21 @@ public void loadPuzzleFromHome(String game, int rows, int columns) throws Illega } } + public void loadPuzzleFromHome(String game, String[] statements) { + GameBoardFacade facade = GameBoardFacade.getInstance(); + try { + // TODO: finish implementing this function and testing this part + facade.loadPuzzle(game, statements); + } + catch (IllegalArgumentException exception) { + throw new IllegalArgumentException(exception.getMessage()); + } + catch (RuntimeException e) { + e.printStackTrace(); + LOGGER.error(e.getMessage()); + } + } + // File opener public Object[] promptPuzzle() { GameBoardFacade facade = GameBoardFacade.getInstance(); From da92e36c821185b3e5bf5296bf41683fd784dbbe Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 24 Mar 2023 17:06:31 -0400 Subject: [PATCH 23/54] Made some more progress --- .../edu/rpi/legup/app/GameBoardFacade.java | 36 ++++++++++++++++++- .../edu/rpi/legup/model/PuzzleImporter.java | 7 ++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index ba14268c5..71f68bca2 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -182,7 +182,41 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti } public void loadPuzzle(String game, String[] statements) { - // TODO: implement this method + // TODO: Make sure this method isn't broken + String qualifiedClassName = config.getPuzzleClassForName(game); + LOGGER.debug("Loading " + qualifiedClassName); + + try { + // TODO: test and make sure this doesn't break anything + PuzzleImporter importer = puzzle.getImporter(); + if (!importer.acceptsTextInput()) + throw new IllegalArgumentException(puzzle.getName() + " does not accept rows and columns input"); + + Class c = Class.forName(qualifiedClassName); + Constructor cons = c.getConstructor(); + Puzzle puzzle = (Puzzle) cons.newInstance(); + setWindowTitle(puzzle.getName(), "New " + puzzle.getName() + " Puzzle"); + + if (importer == null) { + LOGGER.error("Puzzle importer is null"); + throw new RuntimeException("Puzzle importer null"); + } + + importer.initializePuzzle(statements); + + puzzle.initializeView(); +// puzzle.getBoardView().onTreeElementChanged(puzzle.getTree().getRootNode()); + setPuzzleEditor(puzzle); + } + catch (IllegalArgumentException exception) { + throw new IllegalArgumentException(exception.getMessage()); + } + catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | + IllegalAccessException | InstantiationException e) { + LOGGER.error(e); + throw new RuntimeException("Puzzle creation error"); + } + } /** diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index 3009aef3f..28efaa1cf 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -49,6 +49,11 @@ public void initializePuzzle(int rows, int columns) throws RuntimeException { } } + public void initializePuzzle(String[] statements) { + // TODO: implement this + initializeBoard(statements); + } + /** * Initializes the puzzle attributes * @@ -119,6 +124,8 @@ public void initializePuzzle(Node node) throws InvalidFileFormatException { */ public abstract void initializeBoard(Node node) throws InvalidFileFormatException; + public abstract void initializeBoard(String[] statements); + /** * Creates the proof for building * From 93b13f4486eb32ea069a0c285f6606ff47595853 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Wed, 29 Mar 2023 13:19:24 -0400 Subject: [PATCH 24/54] Implemented abstract methods from PuzzleImporter --- .../edu/rpi/legup/model/PuzzleImporter.java | 10 ++++------ .../puzzle/battleship/BattleshipImporter.java | 16 +++++++++++++++ .../puzzle/heyawake/HeyawakeImporter.java | 16 +++++++++++++++ .../legup/puzzle/lightup/LightUpImporter.java | 16 +++++++++++++++ .../rpi/legup/puzzle/masyu/MasyuImporter.java | 16 +++++++++++++++ .../puzzle/nurikabe/NurikabeImporter.java | 16 +++++++++++++++ .../ShortTruthTableImporter.java | 20 +++++++++++++++---- .../skyscrapers/SkyscrapersImporter.java | 17 ++++++++++++++++ .../legup/puzzle/sudoku/SudokuImporter.java | 17 ++++++++++++++++ .../puzzle/treetent/TreeTentImporter.java | 17 ++++++++++++++++ 10 files changed, 151 insertions(+), 10 deletions(-) diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index 28efaa1cf..9c34643d7 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -1,5 +1,6 @@ package edu.rpi.legup.model; +import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.gameboard.Board; import edu.rpi.legup.model.gameboard.PuzzleElement; import edu.rpi.legup.model.rules.MergeRule; @@ -12,10 +13,7 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public abstract class PuzzleImporter { private static final Logger LOGGER = LogManager.getLogger(PuzzleImporter.class.getName()); @@ -49,7 +47,7 @@ public void initializePuzzle(int rows, int columns) throws RuntimeException { } } - public void initializePuzzle(String[] statements) { + public void initializePuzzle(String[] statements) throws InputMismatchException { // TODO: implement this initializeBoard(statements); } @@ -124,7 +122,7 @@ public void initializePuzzle(Node node) throws InvalidFileFormatException { */ public abstract void initializeBoard(Node node) throws InvalidFileFormatException; - public abstract void initializeBoard(String[] statements); + public abstract void initializeBoard(String[] statements) throws InputMismatchException, InvalidFormatException; /** * Creates the proof for building diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipImporter.java b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipImporter.java index e63f915e1..cb68382f3 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipImporter.java @@ -7,12 +7,23 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class BattleshipImporter extends PuzzleImporter { public BattleshipImporter(Battleship battleShip) { super(battleShip); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -177,4 +188,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { "unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Battleship cannot accept text input"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java index 2ec326ee0..690d3cf4b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java @@ -7,6 +7,7 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class HeyawakeImporter extends PuzzleImporter { @@ -14,6 +15,16 @@ public HeyawakeImporter(Heyawake heyawake) { super(heyawake); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -91,4 +102,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { throw new InvalidFileFormatException("Heyawake Importer: unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Hey Awake cannot accept text input"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java b/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java index fce5c53ed..b38c62424 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java @@ -7,12 +7,23 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class LightUpImporter extends PuzzleImporter { public LightUpImporter(LightUp lightUp) { super(lightUp); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -102,4 +113,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { throw new InvalidFileFormatException("lightup Importer: unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Light Up cannot accept text input"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java b/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java index 0f439a780..1c795cd49 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java @@ -7,12 +7,23 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class MasyuImporter extends PuzzleImporter { public MasyuImporter(Masyu masyu) { super(masyu); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -90,4 +101,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { throw new InvalidFileFormatException("Masyu Importer: unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Masyu cannot accept text input"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java index 0253291c5..bfefd95dd 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java @@ -7,12 +7,23 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class NurikabeImporter extends PuzzleImporter { public NurikabeImporter(Nurikabe nurikabe) { super(nurikabe); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -100,4 +111,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { throw new InvalidFileFormatException("nurikabe Importer: unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Nurikabe cannot accept text input"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index aab4190b0..f86aa614f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -1,5 +1,6 @@ package edu.rpi.legup.puzzle.shorttruthtable; +import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; @@ -9,6 +10,7 @@ import java.awt.*; +import java.util.InputMismatchException; import java.util.List; import java.util.ArrayList; @@ -92,13 +94,13 @@ private int parseAllStatementsAndCells(final NodeList statementData, private int parseAllStatementsAndCells(String[] statementData, List> allCells, - List statements) throws InvalidFileFormatException { + List statements) throws InvalidFormatException { int maxStatementLength = 0; for (int i = 0; i < statementData.length; i++) { if (!validGrammar(statementData[i])) { JOptionPane.showMessageDialog(null, "ERROR: Invalid file syntax"); - throw new InvalidFileFormatException("shorttruthtable importer: invalid sentence syntax"); + throw new InvalidFormatException("shorttruthtable importer: invalid sentence syntax"); } //get the cells for the statement @@ -242,6 +244,16 @@ private void setGivenCells(ShortTruthTableBoard sttBoard, } + @Override + public boolean acceptsRowsAndColumnsInput() { + return false; + } + + @Override + public boolean acceptsTextInput() { + return true; + } + /** * Creates an empty board for building * @@ -305,11 +317,11 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } } - public void initializeBoard(String[] statementData) throws InvalidFileFormatException { + public void initializeBoard(String[] statementData) throws InputMismatchException, InvalidFormatException { // TODO: finish this method, check exception handling if (statementData.length == 0) { - throw new InvalidFileFormatException("short truth table Importer: no statements found for board"); + throw new InvalidFormatException("short truth table Importer: no statements found for board"); } // Store all cells and statements diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java index 95098c7e3..8d31b98ae 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java @@ -1,5 +1,6 @@ package edu.rpi.legup.puzzle.skyscrapers; +import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; @@ -7,12 +8,23 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class SkyscrapersImporter extends PuzzleImporter { public SkyscrapersImporter(Skyscrapers skyscrapers) { super(skyscrapers); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -151,4 +163,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { throw new InvalidFileFormatException("Skyscraper Importer: unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Skyscrapers cannot accept text input"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java index dcce56946..cb5a6ce0c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java @@ -1,5 +1,6 @@ package edu.rpi.legup.puzzle.sudoku; +import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; @@ -7,12 +8,23 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class SudokuImporter extends PuzzleImporter { public SudokuImporter(Sudoku sudoku) { super(sudoku); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -112,4 +124,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { throw new InvalidFileFormatException("Sudoku Importer: unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Sudoku cannot accept text input"); + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java index acd094a1b..c216889c9 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java @@ -1,5 +1,6 @@ package edu.rpi.legup.puzzle.treetent; +import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; @@ -7,12 +8,23 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class TreeTentImporter extends PuzzleImporter { public TreeTentImporter(TreeTent treeTent) { super(treeTent); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -174,4 +186,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { throw new InvalidFileFormatException("TreeTent Importer: unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Tree Tent cannot accept text input"); + } } From 20204a23a2444521d52f0754b72ce255ec7461eb Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Wed, 29 Mar 2023 13:47:50 -0400 Subject: [PATCH 25/54] Added abstract methods to Fillapix and added other exception reporting --- .../java/edu/rpi/legup/app/GameBoardFacade.java | 3 ++- .../edu/rpi/legup/model/PuzzleImporter.java | 2 +- .../legup/puzzle/fillapix/FillapixImporter.java | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index 71f68bca2..6a904d41a 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -1,5 +1,6 @@ package edu.rpi.legup.app; +import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.history.IHistoryListener; import edu.rpi.legup.history.IHistorySubject; import edu.rpi.legup.model.PuzzleImporter; @@ -212,7 +213,7 @@ public void loadPuzzle(String game, String[] statements) { throw new IllegalArgumentException(exception.getMessage()); } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | - IllegalAccessException | InstantiationException e) { + IllegalAccessException | InstantiationException | InvalidFormatException e) { LOGGER.error(e); throw new RuntimeException("Puzzle creation error"); } diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index 9c34643d7..41cdb98e3 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -47,7 +47,7 @@ public void initializePuzzle(int rows, int columns) throws RuntimeException { } } - public void initializePuzzle(String[] statements) throws InputMismatchException { + public void initializePuzzle(String[] statements) throws InputMismatchException, InvalidFormatException { // TODO: implement this initializeBoard(statements); } diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java b/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java index 819e56fe7..0c61ba29a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java @@ -1,5 +1,6 @@ package edu.rpi.legup.puzzle.fillapix; +import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; @@ -7,12 +8,23 @@ import org.w3c.dom.NodeList; import java.awt.*; +import java.util.InputMismatchException; public class FillapixImporter extends PuzzleImporter { public FillapixImporter(Fillapix fillapix) { super(fillapix); } + @Override + public boolean acceptsRowsAndColumnsInput() { + return true; + } + + @Override + public boolean acceptsTextInput() { + return false; + } + /** * Creates an empty board for building * @@ -88,4 +100,9 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { throw new InvalidFileFormatException("Fillapix Importer: unknown value where integer expected"); } } + + @Override + public void initializeBoard(String[] statements) throws InputMismatchException { + throw new InputMismatchException("Fillapix cannot accept text input"); + } } From 5d05a816d6dbc18ddce2d93823787bc02cc5f562 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Wed, 29 Mar 2023 13:59:48 -0400 Subject: [PATCH 26/54] CheckStyle formatting --- .../edu/rpi/legup/app/GameBoardFacade.java | 10 +- .../legup/history/AutoCaseRuleCommand.java | 2 +- .../edu/rpi/legup/model/PuzzleImporter.java | 1 + .../java/edu/rpi/legup/model/rules/Rule.java | 2 +- .../battleship/BattleshipCellController.java | 5 +- .../puzzle/battleship/BattleshipClue.java | 4 + .../puzzle/battleship/BattleshipExporter.java | 1 + .../legup/puzzle/lightup/LightUpBoard.java | 6 +- .../puzzle/lightup/elements/NumberTile.java | 2 +- .../rules/FinishWithBulbsDirectRule.java | 3 +- .../rules/FinishWithEmptyDirectRule.java | 10 +- .../lightup/rules/MustLightDirectRule.java | 2 +- .../lightup/rules/SatisfyNumberCaseRule.java | 1 + .../legup/puzzle/masyu/MasyuController.java | 7 +- .../puzzle/nurikabe/NurikabeUtilities.java | 32 +-- .../rules/CannotReachCellDirectRule.java | 2 +- .../rules/NoNumberContradictionRule.java | 2 +- ...UnreachableWhiteCellContradictionRule.java | 26 +- .../ShortTruthTableElementView.java | 9 +- .../puzzle/skyscrapers/SkyscrapersBoard.java | 46 ++-- .../skyscrapers/SkyscrapersClueView.java | 14 +- .../skyscrapers/SkyscrapersElementView.java | 2 +- .../skyscrapers/SkyscrapersImporter.java | 7 +- .../rules/CellForNumberCaseRule.java | 44 ++-- .../DuplicateNumberContradictionRule.java | 2 +- .../ExceedingVisibilityContradictionRule.java | 180 +++++++------- ...sufficientVisibilityContradictionRule.java | 178 ++++++------- .../rules/LastSingularCellDirectRule.java | 16 +- .../rules/LastSingularNumberDirectRule.java | 6 +- .../rules/LastVisibleCellDirectRule.java | 24 +- .../rules/LastVisibleNumberDirectRule.java | 6 +- .../rules/NumberForCellCaseRule.java | 16 +- ...PreemptiveVisibilityContradictionRule.java | 33 ++- .../legup/puzzle/skyscrapers/rules/TODO.md | 20 +- .../UnresolvedCellContradictionRule.java | 4 +- .../UnresolvedNumberContradictionRule.java | 20 +- .../rpi/legup/puzzle/treetent/TreeTent.java | 2 +- .../legup/puzzle/treetent/TreeTentBoard.java | 5 +- .../puzzle/treetent/TreeTentElementView.java | 1 + .../puzzle/treetent/TreeTentExporter.java | 1 + .../treetent/rules/EmptyFieldDirectRule.java | 3 +- .../treetent/rules/FillinRowCaseRule.java | 1 + src/main/java/edu/rpi/legup/ui/HomePanel.java | 235 +++++++++--------- src/main/java/edu/rpi/legup/ui/LegupUI.java | 2 +- .../edu/rpi/legup/ui/PreferencesDialog.java | 5 +- .../edu/rpi/legup/ui/ProofEditorPanel.java | 30 ++- .../edu/rpi/legup/ui/PuzzleEditorPanel.java | 68 +++-- .../ui/proofeditorui/rulesview/RuleFrame.java | 1 + .../ui/proofeditorui/rulesview/RulePanel.java | 94 +++---- .../rulesview/SearchBarPanel.java | 4 +- .../treeview/TreeTransitionView.java | 20 +- .../java/edu/rpi/legup/utility/Logger.java | 2 +- .../rpi/legup/images/Legup/Legup_new_logo.svg | 126 +++++----- .../rules/NoNumbersContradictionRuleTest.java | 2 +- 54 files changed, 696 insertions(+), 651 deletions(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index 6a904d41a..8db0aff8f 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -78,7 +78,7 @@ public synchronized static GameBoardFacade getInstance() { } public void initializeUI() { - EventQueue.invokeLater(() ->{ + EventQueue.invokeLater(() -> { legupUI = new LegupUI(); puzzleSolver = legupUI.getProofEditor(); puzzleEditor = legupUI.getPuzzleEditor(); @@ -153,8 +153,9 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti try { // TODO: test and make sure this doesn't break anything PuzzleImporter importer = puzzle.getImporter(); - if (!importer.acceptsRowsAndColumnsInput()) + if (!importer.acceptsRowsAndColumnsInput()) { throw new IllegalArgumentException(puzzle.getName() + " does not accept rows and columns input"); + } Class c = Class.forName(qualifiedClassName); Constructor cons = c.getConstructor(); @@ -190,8 +191,9 @@ public void loadPuzzle(String game, String[] statements) { try { // TODO: test and make sure this doesn't break anything PuzzleImporter importer = puzzle.getImporter(); - if (!importer.acceptsTextInput()) + if (!importer.acceptsTextInput()) { throw new IllegalArgumentException(puzzle.getName() + " does not accept rows and columns input"); + } Class c = Class.forName(qualifiedClassName); Constructor cons = c.getConstructor(); @@ -278,7 +280,7 @@ public void loadPuzzleEditor(InputStream inputStream) throws InvalidFileFormatEx break; } } - if (!isEditablePuzzle){ + if (!isEditablePuzzle) { LOGGER.error("Puzzle is not editable"); throw new InvalidFileFormatException("Puzzle is not editable"); } diff --git a/src/main/java/edu/rpi/legup/history/AutoCaseRuleCommand.java b/src/main/java/edu/rpi/legup/history/AutoCaseRuleCommand.java index f6f67c8d7..8bc423334 100644 --- a/src/main/java/edu/rpi/legup/history/AutoCaseRuleCommand.java +++ b/src/main/java/edu/rpi/legup/history/AutoCaseRuleCommand.java @@ -105,7 +105,7 @@ public String getErrorString() { return "The selected data element is not pickable with this case rule."; } - if(caseRule.getCases(caseBoard.getBaseBoard(), elementView.getPuzzleElement()).size() == 0){ + if (caseRule.getCases(caseBoard.getBaseBoard(), elementView.getPuzzleElement()).size() == 0) { return "The selection must produce at least one case"; } diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index 41cdb98e3..b8a66b9b0 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -29,6 +29,7 @@ public PuzzleImporter(Puzzle puzzle) { // TODO: add these methods to all importers public abstract boolean acceptsRowsAndColumnsInput(); + public abstract boolean acceptsTextInput(); /** 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 9ad026fa1..2e3c4da60 100644 --- a/src/main/java/edu/rpi/legup/model/rules/Rule.java +++ b/src/main/java/edu/rpi/legup/model/rules/Rule.java @@ -87,7 +87,7 @@ public Rule(String ruleID, String ruleName, String description, String imageName private void loadImage() { if (imageName != null) { LegupPreferences prefs = LegupPreferences.getInstance(); - if(imageName.contains("shorttruthtable") && prefs.getUserPref(LegupPreferences.COLOR_BLIND).equals("true")) { + if (imageName.contains("shorttruthtable") && prefs.getUserPref(LegupPreferences.COLOR_BLIND).equals("true")) { imageName = imageName.replace("ruleimages", "ruleimages_cb"); } this.image = new ImageIcon(ClassLoader.getSystemClassLoader().getResource(imageName)); diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipCellController.java b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipCellController.java index 1ff91f0bc..fc50351cb 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipCellController.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipCellController.java @@ -7,10 +7,11 @@ public class BattleshipCellController extends ElementController { /** - * Controller class for the Battleship puzzle - + * Controller class for the Battleship puzzle - * receives user mouse input and changes what's shown on the GUI + * * @param data the PuzzleElement to be changed - * @param e the user mouse input + * @param e the user mouse input */ @Override public void changeCell(MouseEvent e, PuzzleElement data) { diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipClue.java b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipClue.java index a2633549c..6b5856639 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipClue.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipClue.java @@ -14,6 +14,7 @@ public BattleshipClue(int value, int index, BattleshipType type) { /** * Returns the column number as a string + * * @param col the column number that is to be converted and returned * @return int value */ @@ -30,6 +31,7 @@ public static String colNumToString(int col) { /** * Returns the column string as an integer + * * @param col the column number as a string that is to be converted and returned * @return string value */ @@ -54,6 +56,7 @@ public Integer getData() { /** * Returns the type of the battleship object (ship or clue) + * * @return BattleshipType type */ public BattleshipType getType() { @@ -62,6 +65,7 @@ public BattleshipType getType() { /** * Sets the type of the battleship object (ship or clue) to the given type + * * @param type given Battleship type */ public void setType(BattleshipType type) { diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipExporter.java b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipExporter.java index e5c5ec1a9..b954a1065 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipExporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipExporter.java @@ -12,6 +12,7 @@ public BattleshipExporter(Battleship battleShip) { /** * Creates and returns a new board element in the XML document specified + * * @param newDocument the XML document to append to * @return the new board element */ diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpBoard.java b/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpBoard.java index 93985865d..b15f49919 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpBoard.java @@ -66,7 +66,8 @@ public void fillWithLight() { /** * Gets adjancent cells to the specified cell - * @param cell LightUpCell + * + * @param cell LightUpCell * @return Set of adjacent LightUpCells */ public Set getAdj(LightUpCell cell) { @@ -95,6 +96,7 @@ public Set getAdj(LightUpCell cell) { /** * Gets the number of adjacent cells of the specified type + * * @param cell base cell * @param type specified type * @return the number of adjacent cells @@ -112,6 +114,7 @@ public int getNumAdj(LightUpCell cell, LightUpCellType type) { /** * Gets the number of adjacent cells + * * @param cell LightUpCell * @return number of adjacent cells */ @@ -128,6 +131,7 @@ public int getNumAdjLite(LightUpCell cell) { /** * Gets the number of adjacent cells that are placable + * * @param cell specified cell * @return number of adjacent cells that are placable */ diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/elements/NumberTile.java b/src/main/java/edu/rpi/legup/puzzle/lightup/elements/NumberTile.java index 843be71a2..e96a969e5 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/elements/NumberTile.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/elements/NumberTile.java @@ -10,7 +10,7 @@ public class NumberTile extends NonPlaceableElement { public NumberTile() { super("LTUP-UNPL-0001", "Number Tile", "The number tile", "edu/rpi/legup/images/lightup/1.gif"); } - + public NumberTile(int num) { super("LTUP-UNPL-0001", "Number Tile", "The number tile", "edu/rpi/legup/images/lightup/" + num + ".gif"); if (num > 3 || num < 1) num = 1; diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithBulbsDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithBulbsDirectRule.java index 40707d388..cdea7880f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithBulbsDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithBulbsDirectRule.java @@ -57,8 +57,9 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem /** * Determines whether the specified cell is forced to be a bulb or not + * * @param board the entire board - * @param cell specified cell + * @param cell specified cell * @return whether cell is forced to be a bulb or not */ private boolean isForced(LightUpBoard board, LightUpCell cell) { diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithEmptyDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithEmptyDirectRule.java index 65cbd17e4..f7433150c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithEmptyDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/FinishWithEmptyDirectRule.java @@ -45,7 +45,8 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem /** * Checks whether a certain cell is forced to not be a bulb - * @param board specified board + * + * @param board specified board * @param location location of cell to check * @return boolean value based on whether a certain cell has an adjacent cell that has the required amount of adjacent bulbs */ @@ -57,10 +58,11 @@ private boolean isForced(LightUpBoard board, Point location) { } /** - * Checks whether a certain cell has the required amount of adjacent bulbs + * Checks whether a certain cell has the required amount of adjacent bulbs + * * @param board specified board - * @param loc location of cell to check - * @return boolean value based on whether a certain cell has the required amount of adjacent bulbs + * @param loc location of cell to check + * @return boolean value based on whether a certain cell has the required amount of adjacent bulbs */ private boolean isForcedEmpty(LightUpBoard board, Point loc) { LightUpCell cell = board.getCell(loc.x, loc.y); diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/MustLightDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/MustLightDirectRule.java index a03d653a9..f0f943401 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/rules/MustLightDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/rules/MustLightDirectRule.java @@ -58,7 +58,7 @@ private boolean isForcedBulb(LightUpBoard board, Point loc) { modifiedCell.setData(LightUpCellType.EMPTY.value); //Check if this cell itself (the one with the bulb) has no other lighting option if ((modifiedCell.getType() == LightUpCellType.EMPTY || modifiedCell.getType() == LightUpCellType.UNKNOWN) && - !modifiedCell.isLite() && cannotLite.checkContradictionAt(modifiedBoard, modifiedCell) == null) { + !modifiedCell.isLite() && cannotLite.checkContradictionAt(modifiedBoard, modifiedCell) == null) { return true; } //Look right 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 95e077861..2fbcf3826 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 @@ -243,6 +243,7 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem /** * Gets all cells in the TreeTransition board that are adjacent to all modified cells + * * @param transition TreeTransition object * @return list of cells that are adjacent to all modified cells, returns null if the number of modified cells is =0 || >4 */ diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuController.java b/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuController.java index cccdea047..02328c691 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuController.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuController.java @@ -82,16 +82,17 @@ public void mouseReleased(MouseEvent e) { /** * Alters the cells as they are being dragged over or clicked - * @param e Mouse event being used + * + * @param e Mouse event being used * @param data Data of selected cell */ @Override public void changeCell(MouseEvent e, PuzzleElement data) { MasyuCell cell = (MasyuCell) data; - if(cell.getData() == MasyuType.BLACK || cell.getData() == MasyuType.WHITE) { + if (cell.getData() == MasyuType.BLACK || cell.getData() == MasyuType.WHITE) { return; } - if(cell.getData() == MasyuType.UNKNOWN) { + if (cell.getData() == MasyuType.UNKNOWN) { data.setData(3); } else { diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeUtilities.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeUtilities.java index d3fea6a21..34278ff9f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeUtilities.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeUtilities.java @@ -173,25 +173,25 @@ public static DisjointSets getPossibleWhiteRegions(NurikabeBoard b * @param board nurikabe board * @return a map of cell keys to integer values */ - public static HashMap getWhiteRegionMap(NurikabeBoard board) { + public static HashMap getWhiteRegionMap(NurikabeBoard board) { int width = board.getWidth(); int height = board.getHeight(); Set numberedCells = getNurikabeNumberedCells(board); // Final mapping of cell to size - HashMap whiteRegionMap = new HashMap<>(); - for (NurikabeCell center: numberedCells) { + HashMap whiteRegionMap = new HashMap<>(); + for (NurikabeCell center : numberedCells) { //BFS for each center to find the size of the region int size = 1; // Mark all the vertices as not visited(By default // set as false) - HashMap visited= new HashMap<>(); + HashMap visited = new HashMap<>(); // Create a queue for BFS LinkedList queue = new LinkedList<>(); // Mark the current node as visited and enqueue it - visited.put(center,true); + visited.put(center, true); queue.add(center); // Set of cells in the current region @@ -201,7 +201,7 @@ public static HashMap getWhiteRegionMap(NurikabeBoard boar // Dequeue a vertex from queue and print it // s is the source node in the graph NurikabeCell s = queue.poll(); - System.out.print(s+" "); + System.out.print(s + " "); // Make a linked list of all adjacent squares Set adj = new HashSet<>(); @@ -209,34 +209,34 @@ public static HashMap getWhiteRegionMap(NurikabeBoard boar Point loc = s.getLocation(); // First check if the side is on the board if (loc.x >= 1) { - adj.add(board.getCell(loc.x-1, loc.y)); + adj.add(board.getCell(loc.x - 1, loc.y)); } - if (loc.x < width-1) { - adj.add(board.getCell(loc.x+1, loc.y)); + if (loc.x < width - 1) { + adj.add(board.getCell(loc.x + 1, loc.y)); } if (loc.y >= 1) { - adj.add(board.getCell(loc.x, loc.y-1)); + adj.add(board.getCell(loc.x, loc.y - 1)); } - if (loc.y < height-1) { - adj.add(board.getCell(loc.x, loc.y+1)); + if (loc.y < height - 1) { + adj.add(board.getCell(loc.x, loc.y + 1)); } // Get all adjacent vertices of the dequeued vertex s // If a adjacent has not been visited, then mark it // visited and enqueue it for (NurikabeCell n : adj) { - if (!visited.getOrDefault(n,false) + if (!visited.getOrDefault(n, false) && n.getType() == NurikabeType.WHITE) { connected.add(n); - visited.put(n,true); + visited.put(n, true); queue.add(n); ++size; } } } // Map the cells to the center-size (including the center) - whiteRegionMap.put(center,center.getData()-size); + whiteRegionMap.put(center, center.getData() - size); for (NurikabeCell member : connected) { - whiteRegionMap.put(member,center.getData()-size); + whiteRegionMap.put(member, center.getData() - size); } } return whiteRegionMap; diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CannotReachCellDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CannotReachCellDirectRule.java index 4fbb20b4d..e86724ed9 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CannotReachCellDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/CannotReachCellDirectRule.java @@ -42,7 +42,7 @@ protected String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleE NurikabeCell modifiedCell = (NurikabeCell) modified.getPuzzleElement(puzzleElement); modifiedCell.setData(NurikabeType.WHITE.toValue()); - if (contraRule.checkContradictionAt(modified,modifiedCell) == null) { + if (contraRule.checkContradictionAt(modified, modifiedCell) == null) { return null; } return super.getInvalidUseOfRuleMessage() + ": Cell at this index can be reached"; 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 687a6f1ba..06eb9d2eb 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 @@ -52,7 +52,7 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { numberExists = true; } } - if(!numberExists) { + if (!numberExists) { return null; } } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/UnreachableWhiteCellContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/UnreachableWhiteCellContradictionRule.java index cdad16bcb..ec16475f1 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/UnreachableWhiteCellContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/rules/UnreachableWhiteCellContradictionRule.java @@ -44,7 +44,7 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { int width = nurikabeBoard.getWidth(); // Get regions - HashMap whiteRegionMap = NurikabeUtilities.getWhiteRegionMap(nurikabeBoard); + HashMap whiteRegionMap = NurikabeUtilities.getWhiteRegionMap(nurikabeBoard); if (whiteRegionMap.containsKey(cell)) { return super.getNoContradictionMessage() + ": " + this.NO_CONTRADICTION_MESSAGE; } @@ -54,8 +54,8 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { LinkedList queue = new LinkedList<>(); // Mark the current node as visited and enqueue it - HashMap visited= new HashMap<>(); - visited.put(cell,true); + HashMap visited = new HashMap<>(); + visited.put(cell, true); queue.add(cell); int pathLength = 1; while (queue.size() != 0) { @@ -68,20 +68,20 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { Point loc = s.getLocation(); // First check if the side is on the board if (loc.x >= 1) { - adj.add(nurikabeBoard.getCell(loc.x-1, loc.y)); + adj.add(nurikabeBoard.getCell(loc.x - 1, loc.y)); } - if (loc.x < width-1) { - adj.add(nurikabeBoard.getCell(loc.x+1, loc.y)); + if (loc.x < width - 1) { + adj.add(nurikabeBoard.getCell(loc.x + 1, loc.y)); } if (loc.y >= 1) { - adj.add(nurikabeBoard.getCell(loc.x, loc.y-1)); + adj.add(nurikabeBoard.getCell(loc.x, loc.y - 1)); } - if (loc.y < height-1) { - adj.add(nurikabeBoard.getCell(loc.x, loc.y+1)); + if (loc.y < height - 1) { + adj.add(nurikabeBoard.getCell(loc.x, loc.y + 1)); } - for (NurikabeCell n :adj) { - int regionNeed = whiteRegionMap.getOrDefault(n,-1); + for (NurikabeCell n : adj) { + int regionNeed = whiteRegionMap.getOrDefault(n, -1); if (pathLength <= regionNeed) { return super.getNoContradictionMessage() + ": " + this.NO_CONTRADICTION_MESSAGE; } @@ -89,10 +89,10 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { } for (NurikabeCell n : adj) { - if (!visited.getOrDefault(n,false) + if (!visited.getOrDefault(n, false) && (n.getType() == NurikabeType.UNKNOWN || n.getType() == NurikabeType.WHITE)) { - visited.put(n,true); + visited.put(n, true); queue.add(n); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableElementView.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableElementView.java index 399406eb9..b787921ad 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableElementView.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableElementView.java @@ -2,6 +2,7 @@ import edu.rpi.legup.ui.boardview.GridElementView; import edu.rpi.legup.app.LegupPreferences; + import java.awt.*; public class ShortTruthTableElementView extends GridElementView { @@ -12,10 +13,10 @@ public class ShortTruthTableElementView extends GridElementView { //Square Colors private static final Color TRUE_COLOR = new Color(0, 130, 0);//green - private static final Color TRUE_COLOR_COLORBLIND = new Color(0,0,255); + private static final Color TRUE_COLOR_COLORBLIND = new Color(0, 0, 255); private static final Color FALSE_COLOR = new Color(200, 0, 0);//red - private static final Color FALSE_COLOR_COLORBLIND = new Color(255,0,0); + private static final Color FALSE_COLOR_COLORBLIND = new Color(255, 0, 0); private static final Color UNKNOWN_COLOR = Color.WHITE; public ShortTruthTableElementView(ShortTruthTableCell cell) { @@ -48,14 +49,14 @@ public void drawElement(Graphics2D graphics2D) { LegupPreferences prefs = LegupPreferences.getInstance(); switch (type) { case TRUE: - if(prefs.getUserPref(LegupPreferences.COLOR_BLIND).equals("true")) { + if (prefs.getUserPref(LegupPreferences.COLOR_BLIND).equals("true")) { graphics2D.setColor(TRUE_COLOR_COLORBLIND); break; } graphics2D.setColor(TRUE_COLOR); break; case FALSE: - if(prefs.getUserPref(LegupPreferences.COLOR_BLIND).equals("true")) { + if (prefs.getUserPref(LegupPreferences.COLOR_BLIND).equals("true")) { graphics2D.setColor(FALSE_COLOR_COLORBLIND); break; } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersBoard.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersBoard.java index c23d2c46f..8d9e13166 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersBoard.java @@ -51,8 +51,8 @@ public ArrayList getLines() { } /** - * Returns a list of the eastern clues ordered from loc.y = 0->max - */ + * Returns a list of the eastern clues ordered from loc.y = 0->max + */ public ArrayList getEastClues() { return eastClues; } @@ -78,23 +78,27 @@ public ArrayList getNorthClues() { return northClues; } - public boolean getDupeFlag(){ + public boolean getDupeFlag() { return dupeFlag; } - public boolean getViewFlag(){ + + public boolean getViewFlag() { return viewFlag; } - public void setDupeFlag(boolean newFlag){ + + public void setDupeFlag(boolean newFlag) { dupeFlag = newFlag; } - public void setViewFlag(boolean newFlag){ + + public void setViewFlag(boolean newFlag) { viewFlag = newFlag; } - public SkyscrapersClue getmodClue(){ + public SkyscrapersClue getmodClue() { return modClue; } - public void setModClue(SkyscrapersClue newClue){ + + public void setModClue(SkyscrapersClue newClue) { modClue = newClue; } @@ -160,7 +164,7 @@ public void notifyDeletion(PuzzleElement puzzleElement) { * Gets the cells of a certain type directly adjacent to a given cell * * @param cell at the center, - * type of cell to collect + * type of cell to collect * @return list of cells of the given type */ public List getAdjacent(SkyscrapersCell cell, SkyscrapersType type) { @@ -189,7 +193,7 @@ public List getAdjacent(SkyscrapersCell cell, SkyscrapersType t * Gets the cells of a certain type directly diagonal to a given cell * * @param cell at the center, - * type of cell to collect + * type of cell to collect * @return list of cells of the given type */ public List getDiagonals(SkyscrapersCell cell, SkyscrapersType type) { @@ -218,8 +222,8 @@ public List getDiagonals(SkyscrapersCell cell, SkyscrapersType * Gets the cells of a certain type in a given row/column * * @param index: y pos of row or x pos of col, - * type of cell to collect, - * boolean true if row, false if col + * type of cell to collect, + * boolean true if row, false if col * @return list of cells of the given type, ordered west to east or north to south */ public List getRowCol(int index, SkyscrapersType type, boolean isRow) { @@ -243,14 +247,14 @@ public List getRowCol(int index, SkyscrapersType type, boolean /** * Prints a semblance of the board to console (helps in debugging) */ - public void printBoard(){ - for(int i =0; i getCasesFor(Board board, PuzzleElement puzzleElement, Integer number){ + public ArrayList getCasesFor(Board board, PuzzleElement puzzleElement, Integer number) { ArrayList cases = new ArrayList<>(); SkyscrapersClue clue = (SkyscrapersClue) puzzleElement; SkyscrapersBoard skyscrapersboard = (SkyscrapersBoard) board; - List openCells = skyscrapersboard.getRowCol(clue.getClueIndex(),SkyscrapersType.UNKNOWN,clue.getType()==SkyscrapersType.CLUE_WEST); - for(SkyscrapersCell cell : openCells){ + List openCells = skyscrapersboard.getRowCol(clue.getClueIndex(), SkyscrapersType.UNKNOWN, clue.getType() == SkyscrapersType.CLUE_WEST); + for (SkyscrapersCell cell : openCells) { SkyscrapersBoard newCase = skyscrapersboard.copy(); PuzzleElement newCell = newCase.getPuzzleElement(cell); newCell.setData(number); newCase.addModifiedData(newCell); - newCase.setModClue((SkyscrapersClue)newCase.getPuzzleElement(clue)); + newCase.setModClue((SkyscrapersClue) newCase.getPuzzleElement(clue)); //if flags boolean passed = true; - if(skyscrapersboard.getDupeFlag()){ + if (skyscrapersboard.getDupeFlag()) { DuplicateNumberContradictionRule DupeRule = new DuplicateNumberContradictionRule(); - passed = passed && DupeRule.checkContradictionAt(newCase,newCell)!=null; + passed = passed && DupeRule.checkContradictionAt(newCase, newCell) != null; } - if(skyscrapersboard.getViewFlag()){ + if (skyscrapersboard.getViewFlag()) { PreemptiveVisibilityContradictionRule ViewRule = new PreemptiveVisibilityContradictionRule(); - passed = passed && ViewRule.checkContradictionAt(newCase,newCell)!=null; + passed = passed && ViewRule.checkContradictionAt(newCase, newCell) != null; } - if(passed){ + if (passed) { cases.add(newCase); } @@ -92,7 +92,7 @@ public ArrayList getCasesFor(Board board, PuzzleElement puzzleElement, In @Override public ArrayList getCases(Board board, PuzzleElement puzzleElement) { - return getCasesFor(board,puzzleElement,selectedNumber); + return getCasesFor(board, puzzleElement, selectedNumber); } @Override @@ -104,23 +104,23 @@ public String checkRuleRaw(TreeTransition transition) { } //find changed row/col - SkyscrapersClue modClue = ((SkyscrapersBoard)childTransitions.get(0).getBoard()).getmodClue(); + SkyscrapersClue modClue = ((SkyscrapersBoard) childTransitions.get(0).getBoard()).getmodClue(); //System.out.println(modClue.getType()); //System.out.println(modClue.getClueIndex()); - if(childTransitions.size() != getCasesFor(oldBoard,modClue,(Integer) childTransitions.get(0).getBoard().getModifiedData().iterator().next().getData()).size()){ + if (childTransitions.size() != getCasesFor(oldBoard, modClue, (Integer) childTransitions.get(0).getBoard().getModifiedData().iterator().next().getData()).size()) { //System.out.println("Wrong number of cases."); return "Wrong number of cases."; } - for(TreeTransition newTree : childTransitions){ + for (TreeTransition newTree : childTransitions) { SkyscrapersBoard newBoard = (SkyscrapersBoard) newTree.getBoard(); - if(newBoard.getModifiedData().size()!=1){ - //System.out.println("Only one cell should be modified."); + if (newBoard.getModifiedData().size() != 1) { + //System.out.println("Only one cell should be modified."); return "Only one cell should be modified."; } SkyscrapersCell newCell = (SkyscrapersCell) newBoard.getModifiedData().iterator().next(); - if(newCell.getType() != SkyscrapersType.Number){ + if (newCell.getType() != SkyscrapersType.Number) { //System.out.println("Changed value should be a number."); return "Changed value should be a number."; } 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 c0508bf67..db5357fbe 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 @@ -30,7 +30,7 @@ public DuplicateNumberContradictionRule() { @Override public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { //TODO:? Refactor to count each row/col once rather than per cell (override checkContradiction) - SkyscrapersCell cell = (SkyscrapersCell) puzzleElement; + SkyscrapersCell cell = (SkyscrapersCell) puzzleElement; SkyscrapersBoard skyscrapersboard = (SkyscrapersBoard) board; Point loc = cell.getLocation(); 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 8f24609cc..0d882c18b 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 @@ -34,106 +34,106 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { SkyscrapersCell cell = (SkyscrapersCell) puzzleElement; SkyscrapersBoard skyscrapersboard = (SkyscrapersBoard) board; Point loc = cell.getLocation(); - + //get borders - int west = skyscrapersboard.getWestClues().get(loc.y).getData(); - int east = skyscrapersboard.getEastClues().get(loc.y).getData(); - int north = skyscrapersboard.getNorthClues().get(loc.x).getData(); - int south = skyscrapersboard.getSouthClues().get(loc.x).getData(); + int west = skyscrapersboard.getWestClues().get(loc.y).getData(); + int east = skyscrapersboard.getEastClues().get(loc.y).getData(); + int north = skyscrapersboard.getNorthClues().get(loc.x).getData(); + int south = skyscrapersboard.getSouthClues().get(loc.x).getData(); + + //check row + int max = 0; + int count = 0; + List row = skyscrapersboard.getRowCol(loc.y, SkyscrapersType.Number, true); + if (row.size() == skyscrapersboard.getWidth()) { + //from west border + for (SkyscrapersCell c : row) { + if (c.getData().value > max) { + System.out.print(c.getData()); + //System.out.println(cell.getData()); + max = c.getData().value; + count++; + } + } + if (count > west) { + return null; + } - //check row - int max = 0; - int count = 0; - List row = skyscrapersboard.getRowCol(loc.y,SkyscrapersType.Number,true); - if(row.size()==skyscrapersboard.getWidth()){ - //from west border - for(SkyscrapersCell c : row){ - if (c.getData().value > max) { - System.out.print(c.getData()); - //System.out.println(cell.getData()); - max = c.getData().value; - count++; - } - } - if (count > west) { - return null; - } + max = 0; + count = 0; + //from east border + Collections.reverse(row); + for (SkyscrapersCell c : row) { + if (c.getData().value > max) { + System.out.print(c.getData()); + //System.out.println(cell.getData()); + max = c.getData().value; + count++; + } + } + if (count > east) { + return null; + } + } - max = 0; - count = 0; - //from east border - Collections.reverse(row); - for(SkyscrapersCell c : row){ - if (c.getData().value > max) { - System.out.print(c.getData()); - //System.out.println(cell.getData()); - max = c.getData().value; - count++; - } - } - if (count > east) { - return null; - } - } - //check column - List col = skyscrapersboard.getRowCol(loc.x,SkyscrapersType.Number,false); - if(col.size()==skyscrapersboard.getHeight()){ - //from north border - max = 0; - count = 0; - for(SkyscrapersCell c : col){ - System.out.println(c.getData()); - if (c.getData().value > max) { + List col = skyscrapersboard.getRowCol(loc.x, SkyscrapersType.Number, false); + if (col.size() == skyscrapersboard.getHeight()) { + //from north border + max = 0; + count = 0; + for (SkyscrapersCell c : col) { + System.out.println(c.getData()); + if (c.getData().value > max) { - //System.out.println(cell.getData()); - max = c.getData().value; - count++; - } - } - if (count > north) { - return null; - } + //System.out.println(cell.getData()); + max = c.getData().value; + count++; + } + } + if (count > north) { + return null; + } - //from south border - max = 0; - count = 0; - Collections.reverse(col); - for(SkyscrapersCell c : col){ - System.out.println(c.getData()); - if (c.getData().value > max) { + //from south border + max = 0; + count = 0; + Collections.reverse(col); + for (SkyscrapersCell c : col) { + System.out.println(c.getData()); + if (c.getData().value > max) { + + //System.out.println(cell.getData()); + max = c.getData().value; + count++; + } + } + if (count > south) { + return null; + } + } - //System.out.println(cell.getData()); - max = c.getData().value; - count++; - } - } - if (count > south) { - return null; - } - } - //System.out.print("Does not contain a contradiction at this index"); return super.getNoContradictionMessage(); } - /** - * Checks whether the Skyscraper cell has a contradiction using this rule - * - * @param board board to check contradiction - * @return null if the Skyscraper cell contains a contradiction, otherwise error message - */ - @Override - public String checkContradiction(Board board) { - SkyscrapersBoard skyscrapersBoard = (SkyscrapersBoard) board; - for (int i = 0; i < skyscrapersBoard.getWidth(); i++) { - //checks the middle diagonal (checkContradictionAt checks row/col off each) - String checkStr = checkContradictionAt(board, skyscrapersBoard.getCell(i,i)); - if (checkStr == null) { - return checkStr; - } - } - return "No instance of the contradiction " + this.ruleName + " here"; - } + /** + * Checks whether the Skyscraper cell has a contradiction using this rule + * + * @param board board to check contradiction + * @return null if the Skyscraper cell contains a contradiction, otherwise error message + */ + @Override + public String checkContradiction(Board board) { + SkyscrapersBoard skyscrapersBoard = (SkyscrapersBoard) board; + for (int i = 0; i < skyscrapersBoard.getWidth(); i++) { + //checks the middle diagonal (checkContradictionAt checks row/col off each) + String checkStr = checkContradictionAt(board, skyscrapersBoard.getCell(i, i)); + if (checkStr == null) { + return checkStr; + } + } + return "No instance of the contradiction " + this.ruleName + " here"; + } } 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 5b6b09f80..615b53705 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 @@ -36,103 +36,103 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { Point loc = cell.getLocation(); //get borders - int west = skyscrapersboard.getWestClues().get(loc.y).getData(); - int east = skyscrapersboard.getEastClues().get(loc.y).getData(); - int north = skyscrapersboard.getNorthClues().get(loc.x).getData(); - int south = skyscrapersboard.getSouthClues().get(loc.x).getData(); + int west = skyscrapersboard.getWestClues().get(loc.y).getData(); + int east = skyscrapersboard.getEastClues().get(loc.y).getData(); + int north = skyscrapersboard.getNorthClues().get(loc.x).getData(); + int south = skyscrapersboard.getSouthClues().get(loc.x).getData(); - //check row - int max = 0; - int count = 0; - java.util.List row = skyscrapersboard.getRowCol(loc.y,SkyscrapersType.Number,true); - if(row.size()==skyscrapersboard.getWidth()){ - //from west border - for(SkyscrapersCell c : row){ - if (c.getData().value > max) { - System.out.print(c.getData()); - //System.out.println(cell.getData()); - max = c.getData().value; - count++; - } - } - if (count < west) { - return null; - } + //check row + int max = 0; + int count = 0; + java.util.List row = skyscrapersboard.getRowCol(loc.y, SkyscrapersType.Number, true); + if (row.size() == skyscrapersboard.getWidth()) { + //from west border + for (SkyscrapersCell c : row) { + if (c.getData().value > max) { + System.out.print(c.getData()); + //System.out.println(cell.getData()); + max = c.getData().value; + count++; + } + } + if (count < west) { + return null; + } - max = 0; - count = 0; - //from east border - Collections.reverse(row); - for(SkyscrapersCell c : row){ - if (c.getData().value > max) { - System.out.print(c.getData()); - //System.out.println(cell.getData()); - max = c.getData().value; - count++; - } - } - if (count < east) { - return null; - } - } + max = 0; + count = 0; + //from east border + Collections.reverse(row); + for (SkyscrapersCell c : row) { + if (c.getData().value > max) { + System.out.print(c.getData()); + //System.out.println(cell.getData()); + max = c.getData().value; + count++; + } + } + if (count < east) { + return null; + } + } - //check column - List col = skyscrapersboard.getRowCol(loc.x,SkyscrapersType.Number,false); - if(col.size()==skyscrapersboard.getHeight()){ - //from north border - max = 0; - count = 0; - for(SkyscrapersCell c : col){ - System.out.println(c.getData()); - if (c.getData().value > max) { + //check column + List col = skyscrapersboard.getRowCol(loc.x, SkyscrapersType.Number, false); + if (col.size() == skyscrapersboard.getHeight()) { + //from north border + max = 0; + count = 0; + for (SkyscrapersCell c : col) { + System.out.println(c.getData()); + if (c.getData().value > max) { - //System.out.println(cell.getData()); - max = c.getData().value; - count++; - } - } - if (count < north) { - return null; - } + //System.out.println(cell.getData()); + max = c.getData().value; + count++; + } + } + if (count < north) { + return null; + } - //from south border - max = 0; - count = 0; - Collections.reverse(col); - for(SkyscrapersCell c : col){ - System.out.println(c.getData()); - if (c.getData().value > max) { + //from south border + max = 0; + count = 0; + Collections.reverse(col); + for (SkyscrapersCell c : col) { + System.out.println(c.getData()); + if (c.getData().value > max) { + + //System.out.println(cell.getData()); + max = c.getData().value; + count++; + } + } + if (count < south) { + return null; + } + } - //System.out.println(cell.getData()); - max = c.getData().value; - count++; - } - } - if (count < south) { - return null; - } - } - //System.out.print("Does not contain a contradiction at this index"); return super.getNoContradictionMessage(); } - /** - * Checks whether the Skyscraper cell has a contradiction using this rule - * - * @param board board to check contradiction - * @return null if the Skyscraper cell contains a contradiction, otherwise error message - */ - @Override - public String checkContradiction(Board board) { - SkyscrapersBoard skyscrapersBoard = (SkyscrapersBoard) board; - for (int i = 0; i < skyscrapersBoard.getWidth(); i++) { - //checks the middle diagonal (checkContradictionAt checks row/col off each) - String checkStr = checkContradictionAt(board, skyscrapersBoard.getCell(i,i)); - if (checkStr == null) { - return checkStr; - } - } - return "No instance of the contradiction " + this.ruleName + " here"; - } + /** + * Checks whether the Skyscraper cell has a contradiction using this rule + * + * @param board board to check contradiction + * @return null if the Skyscraper cell contains a contradiction, otherwise error message + */ + @Override + public String checkContradiction(Board board) { + SkyscrapersBoard skyscrapersBoard = (SkyscrapersBoard) board; + for (int i = 0; i < skyscrapersBoard.getWidth(); i++) { + //checks the middle diagonal (checkContradictionAt checks row/col off each) + String checkStr = checkContradictionAt(board, skyscrapersBoard.getCell(i, i)); + if (checkStr == null) { + return checkStr; + } + } + return "No instance of the contradiction " + this.ruleName + " here"; + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastSingularCellDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastSingularCellDirectRule.java index 23885724c..02f53fc13 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastSingularCellDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastSingularCellDirectRule.java @@ -44,8 +44,8 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem initialBoard.setDupeFlag(true); initialBoard.setViewFlag(false); CellForNumberCaseRule caseRule = new CellForNumberCaseRule(); - ArrayList XCandidates = caseRule.getCasesFor(initialBoard,initialBoard.getWestClues().get(finalCell.getLocation().y),(Integer)finalCell.getData().value); - ArrayList YCandidates = caseRule.getCasesFor(initialBoard,initialBoard.getNorthClues().get(finalCell.getLocation().x),(Integer)finalCell.getData().value); + ArrayList XCandidates = caseRule.getCasesFor(initialBoard, initialBoard.getWestClues().get(finalCell.getLocation().y), (Integer) finalCell.getData().value); + ArrayList YCandidates = caseRule.getCasesFor(initialBoard, initialBoard.getNorthClues().get(finalCell.getLocation().x), (Integer) finalCell.getData().value); initialBoard.setDupeFlag(dupeTemp); initialBoard.setViewFlag(viewTemp); @@ -53,18 +53,18 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem System.out.println(YCandidates.size()); //return null if either pass, both messages otherwise - String xCheck = candidateCheck(XCandidates,puzzleElement,finalCell); - String yCheck = candidateCheck(YCandidates,puzzleElement,finalCell); - if(xCheck==null || yCheck==null){ + String xCheck = candidateCheck(XCandidates, puzzleElement, finalCell); + String yCheck = candidateCheck(YCandidates, puzzleElement, finalCell); + if (xCheck == null || yCheck == null) { return null; } return super.getInvalidUseOfRuleMessage() + "\nRow" + xCheck + "\nCol" + yCheck; } //helper to check if candidate list is valid - private String candidateCheck(ArrayList candidates,PuzzleElement puzzleElement, SkyscrapersCell finalCell){ - if(candidates.size() == 1){ - if(((SkyscrapersCell) candidates.get(0).getPuzzleElement(puzzleElement)).getType() == SkyscrapersType.Number) { + private String candidateCheck(ArrayList candidates, PuzzleElement puzzleElement, SkyscrapersCell finalCell) { + if (candidates.size() == 1) { + if (((SkyscrapersCell) candidates.get(0).getPuzzleElement(puzzleElement)).getType() == SkyscrapersType.Number) { if (candidates.get(0).getPuzzleElement(puzzleElement).getData() == finalCell.getData()) { return null; } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastSingularNumberDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastSingularNumberDirectRule.java index 08d3f4589..c3c08e8e6 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastSingularNumberDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastSingularNumberDirectRule.java @@ -44,13 +44,13 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem initialBoard.setDupeFlag(true); initialBoard.setViewFlag(false); NumberForCellCaseRule caseRule = new NumberForCellCaseRule(); - ArrayList candidates = caseRule.getCases(initialBoard,puzzleElement); + ArrayList candidates = caseRule.getCases(initialBoard, puzzleElement); initialBoard.setDupeFlag(dupeTemp); initialBoard.setViewFlag(viewTemp); //check if given value is the only remaining value - if(candidates.size() == 1){ - if(candidates.get(0).getPuzzleElement(puzzleElement).getData() == finalCell.getData()){ + if (candidates.size() == 1) { + if (candidates.get(0).getPuzzleElement(puzzleElement).getData() == finalCell.getData()) { return null; } return super.getInvalidUseOfRuleMessage() + ": Wrong number in the cell."; diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastVisibleCellDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastVisibleCellDirectRule.java index a72400a1b..87db1dbe9 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastVisibleCellDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastVisibleCellDirectRule.java @@ -45,8 +45,8 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem initialBoard.setDupeFlag(false); initialBoard.setViewFlag(true); CellForNumberCaseRule caseRule = new CellForNumberCaseRule(); - ArrayList XCandidates = caseRule.getCasesFor(initialBoard,initialBoard.getWestClues().get(finalCell.getLocation().y),(Integer)finalCell.getData().value); - ArrayList YCandidates = caseRule.getCasesFor(initialBoard,initialBoard.getNorthClues().get(finalCell.getLocation().x),(Integer)finalCell.getData().value); + ArrayList XCandidates = caseRule.getCasesFor(initialBoard, initialBoard.getWestClues().get(finalCell.getLocation().y), (Integer) finalCell.getData().value); + ArrayList YCandidates = caseRule.getCasesFor(initialBoard, initialBoard.getNorthClues().get(finalCell.getLocation().x), (Integer) finalCell.getData().value); initialBoard.setDupeFlag(dupeTemp); initialBoard.setViewFlag(viewTemp); @@ -54,18 +54,18 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem System.out.println(YCandidates.size()); //return null if either pass, both messages otherwise - String xCheck = candidateCheck(XCandidates,puzzleElement,finalCell); - String yCheck = candidateCheck(YCandidates,puzzleElement,finalCell); - if(xCheck==null || yCheck==null){ + String xCheck = candidateCheck(XCandidates, puzzleElement, finalCell); + String yCheck = candidateCheck(YCandidates, puzzleElement, finalCell); + if (xCheck == null || yCheck == null) { return null; } return super.getInvalidUseOfRuleMessage() + "\nRow" + xCheck + "\nCol" + yCheck; } //helper to check if candidate list is valid - private String candidateCheck(ArrayList candidates,PuzzleElement puzzleElement, SkyscrapersCell finalCell){ - if(candidates.size() == 1){ - if(((SkyscrapersCell) candidates.get(0).getPuzzleElement(puzzleElement)).getType() == SkyscrapersType.Number) { + private String candidateCheck(ArrayList candidates, PuzzleElement puzzleElement, SkyscrapersCell finalCell) { + if (candidates.size() == 1) { + if (((SkyscrapersCell) candidates.get(0).getPuzzleElement(puzzleElement)).getType() == SkyscrapersType.Number) { if (candidates.get(0).getPuzzleElement(puzzleElement).getData() == finalCell.getData()) { return null; } @@ -95,12 +95,12 @@ private boolean isForced(SkyscrapersBoard board, SkyscrapersCell cell) { */ @Override public Board getDefaultBoard(TreeNode node) { - SkyscrapersBoard initialBoard = (SkyscrapersBoard) node.getBoard(); - SkyscrapersBoard modBoard = (SkyscrapersBoard) node.getBoard().copy(); - System.out.println(modBoard.getPuzzleElements().size()); + SkyscrapersBoard initialBoard = (SkyscrapersBoard) node.getBoard(); + SkyscrapersBoard modBoard = (SkyscrapersBoard) node.getBoard().copy(); + System.out.println(modBoard.getPuzzleElements().size()); for (PuzzleElement element : modBoard.getPuzzleElements()) { System.out.println("123"); - SkyscrapersCell cell = (SkyscrapersCell) element; + SkyscrapersCell cell = (SkyscrapersCell) element; if (cell.getType() == SkyscrapersType.UNKNOWN && isForced(initialBoard, cell)) { //cell.setData(SkyscrapersType.BULB.value); modBoard.addModifiedData(cell); diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastVisibleNumberDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastVisibleNumberDirectRule.java index 85a5068c6..53cf5305e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastVisibleNumberDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/LastVisibleNumberDirectRule.java @@ -45,13 +45,13 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem initialBoard.setDupeFlag(false); initialBoard.setViewFlag(true); NumberForCellCaseRule caseRule = new NumberForCellCaseRule(); - ArrayList candidates = caseRule.getCases(initialBoard,puzzleElement); + ArrayList candidates = caseRule.getCases(initialBoard, puzzleElement); initialBoard.setDupeFlag(dupeTemp); initialBoard.setViewFlag(viewTemp); //check if given value is the only remaining value - if(candidates.size() == 1){ - if(candidates.get(0).getPuzzleElement(puzzleElement).getData() == finalCell.getData()){ + if (candidates.size() == 1) { + if (candidates.get(0).getPuzzleElement(puzzleElement).getData() == finalCell.getData()) { return null; } return super.getInvalidUseOfRuleMessage() + ": Wrong number in the cell."; diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/NumberForCellCaseRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/NumberForCellCaseRule.java index abf6a10b0..a061c62a3 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/NumberForCellCaseRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/NumberForCellCaseRule.java @@ -60,16 +60,16 @@ public ArrayList getCases(Board board, PuzzleElement puzzleElement) { //if flags boolean passed = true; - if(skyscrapersboard.getDupeFlag()){ + if (skyscrapersboard.getDupeFlag()) { DuplicateNumberContradictionRule DupeRule = new DuplicateNumberContradictionRule(); - passed = passed && DupeRule.checkContradictionAt(newCase,newCell)!=null; + passed = passed && DupeRule.checkContradictionAt(newCase, newCell) != null; } - if(skyscrapersboard.getViewFlag()){ + if (skyscrapersboard.getViewFlag()) { PreemptiveVisibilityContradictionRule ViewRule = new PreemptiveVisibilityContradictionRule(); - passed = passed && ViewRule.checkContradictionAt(newCase,newCell)!=null; + passed = passed && ViewRule.checkContradictionAt(newCase, newCell) != null; } //how should unresolved be handled? should it be? - if(passed){ + if (passed) { cases.add(newCase); } } @@ -90,8 +90,10 @@ public String checkRuleRaw(TreeTransition transition) { //System.out.println("0"); return "This case rule must have at least one child."; } - else if (childTransitions.size() != getCases(transition.getBoard(), childTransitions.get(0).getBoard().getModifiedData().iterator().next()).size()){ - return "Wrong number of children."; + else { + if (childTransitions.size() != getCases(transition.getBoard(), childTransitions.get(0).getBoard().getModifiedData().iterator().next()).size()) { + return "Wrong number of children."; + } } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/PreemptiveVisibilityContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/PreemptiveVisibilityContradictionRule.java index 435271e08..cf01a9375 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/PreemptiveVisibilityContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/PreemptiveVisibilityContradictionRule.java @@ -49,29 +49,29 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { // find all cases for the corresponding row and column for each possible skyscraper height //Add every possible case for all heights for each corresponding row and column - for(int i = 0; i < skyscrapersBoard.getWidth(); i++) { + for (int i = 0; i < skyscrapersBoard.getWidth(); i++) { int num = i + 1; //check row west clue List rows; int size = rowQ.size(); - for(int j = 0; j < size; j++) { + for (int j = 0; j < size; j++) { SkyscrapersBoard temp = rowQ.poll(); //get row from the top of the stack //don't do anything if already in row boolean exists = false; - for(SkyscrapersCell c : temp.getRowCol(loc.y,SkyscrapersType.Number,true)){ - if(c.getData().value==num) { + for (SkyscrapersCell c : temp.getRowCol(loc.y, SkyscrapersType.Number, true)) { + if (c.getData().value == num) { exists = true; break; } } - if(exists) { + if (exists) { rowQ.add(temp); } - else{ + else { //set flags boolean dupeTemp = temp.getDupeFlag(); boolean viewTemp = temp.getViewFlag(); @@ -96,22 +96,22 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { List cols; size = colQ.size(); - for(int j = 0; j < size; j++) { + for (int j = 0; j < size; j++) { SkyscrapersBoard temp = colQ.poll(); //get row from the top of the stack //don't do anything if already in col boolean exists = false; - for(SkyscrapersCell c : temp.getRowCol(loc.x,SkyscrapersType.Number,false)){ - if(c.getData().value==num) { + for (SkyscrapersCell c : temp.getRowCol(loc.x, SkyscrapersType.Number, false)) { + if (c.getData().value == num) { exists = true; break; } } - if(exists){ + if (exists) { colQ.add(temp); } - else{ + else { //set flags boolean dupeTemp = temp.getDupeFlag(); boolean viewTemp = temp.getViewFlag(); @@ -126,7 +126,7 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { temp.setViewFlag(viewTemp); //add all row cases to row queue - for(Board k : cols) { + for (Board k : cols) { colQ.add((SkyscrapersBoard) k); } } @@ -137,7 +137,7 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { String rowTooMany; boolean rowContradiction = true; //check if each case board has a contradiction - while(rowQ.size()>0) { + while (rowQ.size() > 0) { SkyscrapersBoard fullRow = rowQ.poll(); //checks if there is a contradiction given the row based on the west clue @@ -151,7 +151,7 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { String colTooFew; String colTooMany; boolean colContradiction = true; - while(colQ.size()>0) { + while (colQ.size() > 0) { SkyscrapersBoard fullCol = colQ.poll(); //checks if there is a contradiction given the col baesd on the north clue @@ -163,7 +163,7 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { } //if every possible permutation results in contradictions return null, else no contradiction - if(rowContradiction || colContradiction) { + if (rowContradiction || colContradiction) { return null; } return super.getNoContradictionMessage(); @@ -180,7 +180,7 @@ public String checkContradiction(Board board) { SkyscrapersBoard skyscrapersBoard = (SkyscrapersBoard) board; for (int i = 0; i < skyscrapersBoard.getWidth(); i++) { //checks the middle diagonal (checkContradictionAt checks row/col off each) - String checkStr = checkContradictionAt(board, skyscrapersBoard.getCell(i,i)); + String checkStr = checkContradictionAt(board, skyscrapersBoard.getCell(i, i)); if (checkStr == null) { return checkStr; } @@ -189,5 +189,4 @@ public String checkContradiction(Board board) { } - } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/TODO.md b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/TODO.md index 94ef1e214..d0be95913 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/TODO.md +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/TODO.md @@ -2,21 +2,21 @@ spreadsheet : https://docs.google.com/spreadsheets/d/1l7aUZtavtysM8dtGnaEIXhBKMRGxekhnLIVoYIHYZi8/edit#gid=0 - 1. Basic Rules: +1. Basic Rules: - Come up with better names for 1Edge and FixedMax, they are now more general - 2. Contradiction Rules: - 3. Case Rules: - - Don't highlight cells when selecting a row/col? - - (override draw() in SkyscrapersElementView) - 4. Refactoring: +2. Contradiction Rules: +3. Case Rules: + - Don't highlight cells when selecting a row/col? + - (override draw() in SkyscrapersElementView) +4. Refactoring: - document utility functions in the reference sheet, COMMENTS! - review and identify dead code - remove all these damn print statments (commented ones too if they aren't useful) - Edit to allow blank clues - Display flags somewhere - 5. Flags +5. Flags - edit exporter to include flags in xml file format (if needed) - 6. Documentation +6. Documentation - UML diagram(s) - 7. Merge Skyscrapers to dev - 8. Add 5 more easy/med puzzles to skyscrapers \ No newline at end of file +7. Merge Skyscrapers to dev +8. Add 5 more easy/med puzzles to skyscrapers \ No newline at end of file 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 c3abefd4d..ada47efde 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 @@ -32,9 +32,9 @@ public UnresolvedCellContradictionRule() { public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { NumberForCellCaseRule caseRule = new NumberForCellCaseRule(); - ArrayList cases = caseRule.getCases(board,puzzleElement); + ArrayList cases = caseRule.getCases(board, puzzleElement); - if(cases.size()==0){ + if (cases.size() == 0) { return null; } diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/UnresolvedNumberContradictionRule.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/UnresolvedNumberContradictionRule.java index 7a4da0372..a8a323e45 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/UnresolvedNumberContradictionRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/rules/UnresolvedNumberContradictionRule.java @@ -37,20 +37,20 @@ public String checkContradictionAt(Board board, PuzzleElement puzzleElement) { Point loc = cell.getLocation(); CellForNumberCaseRule caseRule = new CellForNumberCaseRule(); - for(int i=0;i getAdjacent(TreeTentCell cell, TreeTentType type) { /** * Gets all cells of a specified type that are diagonals of a specified cell + * * @param cell the base cell * @param type the type to look for * @return a list of TreeTentCells that are diagonals of the given TreeTentCell and are of the given TreeTentType @@ -173,8 +174,9 @@ public List getDiagonals(TreeTentCell cell, TreeTentType type) { /** * Creates and returns a list of TreeTentCells that match the given TreeTentType + * * @param index the row or column number - * @param type type of TreeTent element + * @param type type of TreeTent element * @param isRow boolean value beased on whether a row of column is being checked * @return List of TreeTentCells that match the given TreeTentType */ @@ -224,6 +226,7 @@ public boolean equalsBoard(Board board) { /** * Performs a deep copy of the TreeTentBoard + * * @return a TreeTentBoard object that is a deep copy of the current TreeTentBoard */ @Override diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentElementView.java b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentElementView.java index dbe2a14cc..0c8698f83 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentElementView.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentElementView.java @@ -12,6 +12,7 @@ public TreeTentElementView(TreeTentCell cell) { /** * Draws on the given frame based on the type of the cell of the current puzzleElement + * * @param graphics2D the frame to be drawn on */ @Override diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentExporter.java b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentExporter.java index 828a5ffe0..c438d8ee4 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentExporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentExporter.java @@ -12,6 +12,7 @@ public TreeTentExporter(TreeTent treeTent) { /** * Creates and returns a new board element in the XML document specified + * * @param newDocument the XML document to append to * @return the new board element */ diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/EmptyFieldDirectRule.java b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/EmptyFieldDirectRule.java index bd2642497..adfad52f6 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/rules/EmptyFieldDirectRule.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/rules/EmptyFieldDirectRule.java @@ -51,8 +51,9 @@ public String checkRuleRawAt(TreeTransition transition, PuzzleElement puzzleElem /** * Returns a boolean value based on whether the specified cell has adjacent cells (true - no adjacent, false - has adjacent) + * * @param board the TreeTent board - * @param cell the specified TreeTent cell + * @param cell the specified TreeTent cell * @return true - no adjacent, false - has adjacent */ private boolean isForced(TreeTentBoard board, TreeTentCell cell) { 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 e88e321c4..538772b74 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 @@ -24,6 +24,7 @@ public FillinRowCaseRule() { /** * Gets the case board that indicates where this case rule can be applied on the given Board. + * * @param board the given board * @return the case board object */ diff --git a/src/main/java/edu/rpi/legup/ui/HomePanel.java b/src/main/java/edu/rpi/legup/ui/HomePanel.java index 7ece9efce..15d4a5418 100644 --- a/src/main/java/edu/rpi/legup/ui/HomePanel.java +++ b/src/main/java/edu/rpi/legup/ui/HomePanel.java @@ -16,7 +16,6 @@ import java.util.Objects; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.xml.sax.Attributes; @@ -182,101 +181,103 @@ public void actionPerformed(ActionEvent e) { } }); } -public void checkfolder(){ - GameBoardFacade facade = GameBoardFacade.getInstance(); - /* - * Select dir to grade; recursively grade sub-dirs using traverseDir() - * Selected dir must have sub-dirs for each student: - * GradeThis - * | - * | -> Student 1 - * | | - * | | -> Proofs - */ + public void checkfolder() { + GameBoardFacade facade = GameBoardFacade.getInstance(); + + /* + * Select dir to grade; recursively grade sub-dirs using traverseDir() + * Selected dir must have sub-dirs for each student: + * GradeThis + * | + * | -> Student 1 + * | | + * | | -> Proofs + */ + + LegupPreferences preferences = LegupPreferences.getInstance(); + File preferredDirectory = new File(preferences.getUserPref(LegupPreferences.WORK_DIRECTORY)); + JFileChooser folderBrowser = new JFileChooser(preferredDirectory); + - LegupPreferences preferences = LegupPreferences.getInstance(); - File preferredDirectory = new File(preferences.getUserPref(LegupPreferences.WORK_DIRECTORY)); - JFileChooser folderBrowser = new JFileChooser(preferredDirectory); - - - folderBrowser.setCurrentDirectory(new File(LegupPreferences.WORK_DIRECTORY)); - folderBrowser.setDialogTitle("Select Directory"); - folderBrowser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - folderBrowser.setAcceptAllFileFilterUsed(false); - folderBrowser.showOpenDialog(this); - folderBrowser.setVisible(true); - File folder = folderBrowser.getSelectedFile(); - - File resultFile = new File(folder.getAbsolutePath() + File.separator +"result.csv"); - try (BufferedWriter writer = new BufferedWriter(new FileWriter(resultFile))) { - writer.append("Name"); - writer.append(","); - writer.append("File Name"); - writer.append(","); - writer.append("Solved or not"); - writer.append("\n"); - - for (final File folderEntry : folder.listFiles(File::isDirectory)) { - writer.append(folderEntry.getName()); + folderBrowser.setCurrentDirectory(new File(LegupPreferences.WORK_DIRECTORY)); + folderBrowser.setDialogTitle("Select Directory"); + folderBrowser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + folderBrowser.setAcceptAllFileFilterUsed(false); + folderBrowser.showOpenDialog(this); + folderBrowser.setVisible(true); + File folder = folderBrowser.getSelectedFile(); + + File resultFile = new File(folder.getAbsolutePath() + File.separator + "result.csv"); + try (BufferedWriter writer = new BufferedWriter(new FileWriter(resultFile))) { + writer.append("Name"); writer.append(","); - int count1 = 0; - for (final File fileEntry : folderEntry.listFiles()) { - if (fileEntry.getName().charAt(0) == '.'){ - continue; - } - count1++; - if (count1 > 1){ - writer.append(folderEntry.getName()); - writer.append(","); - } - writer.append(fileEntry.getName()); + writer.append("File Name"); + writer.append(","); + writer.append("Solved or not"); + writer.append("\n"); + + for (final File folderEntry : folder.listFiles(File::isDirectory)) { + writer.append(folderEntry.getName()); writer.append(","); - String fileName = folderEntry.getAbsolutePath() + File.separator + fileEntry.getName(); - System.out.println("This is path "+fileName); - File puzzleFile = new File(fileName); - if (puzzleFile != null && puzzleFile.exists()) { - try { - legupUI.displayPanel(1); - legupUI.getProofEditor(); - GameBoardFacade.getInstance().loadPuzzle(fileName); - String puzzleName = GameBoardFacade.getInstance().getPuzzleModule().getName(); - legupUI.setTitle(puzzleName + " - " + puzzleFile.getName()); - facade = GameBoardFacade.getInstance(); - Puzzle puzzle = facade.getPuzzleModule(); - if (puzzle.isPuzzleComplete()) { - writer.append("Solved"); - System.out.println(fileEntry.getName() + " solved"); + int count1 = 0; + for (final File fileEntry : folderEntry.listFiles()) { + if (fileEntry.getName().charAt(0) == '.') { + continue; + } + count1++; + if (count1 > 1) { + writer.append(folderEntry.getName()); + writer.append(","); + } + writer.append(fileEntry.getName()); + writer.append(","); + String fileName = folderEntry.getAbsolutePath() + File.separator + fileEntry.getName(); + System.out.println("This is path " + fileName); + File puzzleFile = new File(fileName); + if (puzzleFile != null && puzzleFile.exists()) { + try { + legupUI.displayPanel(1); + legupUI.getProofEditor(); + GameBoardFacade.getInstance().loadPuzzle(fileName); + String puzzleName = GameBoardFacade.getInstance().getPuzzleModule().getName(); + legupUI.setTitle(puzzleName + " - " + puzzleFile.getName()); + facade = GameBoardFacade.getInstance(); + Puzzle puzzle = facade.getPuzzleModule(); + if (puzzle.isPuzzleComplete()) { + writer.append("Solved"); + System.out.println(fileEntry.getName() + " solved"); + } + else { + writer.append("Not solved"); + System.out.println(fileEntry.getName() + " not solved"); + } + writer.append("\n"); } - else { - writer.append("Not solved"); - System.out.println(fileEntry.getName() + " not solved"); + catch (InvalidFileFormatException e) { + LOGGER.error(e.getMessage()); } - writer.append("\n"); - } - catch (InvalidFileFormatException e) { - LOGGER.error(e.getMessage()); } } - } - if (count1 == 0){ - writer.append("No file"); - writer.append("\n"); + if (count1 == 0) { + writer.append("No file"); + writer.append("\n"); + } } } - } - catch (IOException ex){ - LOGGER.error(ex.getMessage()); + catch (IOException ex) { + LOGGER.error(ex.getMessage()); - this.buttons[3].addActionListener((ActionEvent e) -> checkProofAll()); + this.buttons[3].addActionListener((ActionEvent e) -> checkProofAll()); + } } - } + /* This function is use to check each function xml proof file have the flag = true. Also, we will go to check each file is xml file or not which we have 3 result solve, unsolve and ungradeable */ - public void use_xml_to_check() throws Exception{ + public void use_xml_to_check() throws Exception { GameBoardFacade facade = GameBoardFacade.getInstance(); /* @@ -309,7 +310,7 @@ public void use_xml_to_check() throws Exception{ if (folder == null) { return; } - File resultFile = new File(folder.getAbsolutePath() + File.separator +"result.csv"); + File resultFile = new File(folder.getAbsolutePath() + File.separator + "result.csv"); if (resultFile == null) { return; } @@ -339,11 +340,11 @@ public void use_xml_to_check() throws Exception{ } writer.write(fileEntry.getName()); writer.write(","); - String path =folderEntry.getAbsolutePath() + File.separator + fileEntry.getName(); + String path = folderEntry.getAbsolutePath() + File.separator + fileEntry.getName(); System.out.println(path); boolean is_xml_file = isxmlfile(fileEntry); - if(is_xml_file){ - saxParser.parse(path, new DefaultHandler(){ + if (is_xml_file) { + saxParser.parse(path, new DefaultHandler() { @Override public void startDocument() throws SAXException { System.out.println("start doc"); @@ -357,11 +358,11 @@ public void endDocument() throws SAXException { @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { int length = attributes.getLength(); - for (int i = 0 ;i { - JOptionPane.showMessageDialog(null, "Version: 2.0.0"); - }); + aboutLegup.addActionListener(l -> { + JOptionPane.showMessageDialog(null, "Version: 2.0.0"); + }); // add menus to menubar for (JMenu menu : menus) { menuBar.add(menu); @@ -221,9 +221,9 @@ public void makeVisible() { } private void setupToolBar() { - setToolBarButtons(new JButton[ToolbarName.values().length+1]); - int lastone=0; - for (int i = 0; i < ToolbarName.values().length-1; i++) { + setToolBarButtons(new JButton[ToolbarName.values().length + 1]); + int lastone = 0; + for (int i = 0; i < ToolbarName.values().length - 1; i++) { String toolBarName = ToolbarName.values()[i].toString(); URL resourceLocation = ClassLoader.getSystemClassLoader().getResource("edu/rpi/legup/images/Legup/" + toolBarName + ".png"); @@ -235,44 +235,41 @@ private void setupToolBar() { JButton button = new JButton(toolBarName, imageIcon); button.setFocusPainted(false); getToolBarButtons()[i] = button; - lastone=i; + lastone = i; } + URL check_and_save = ClassLoader.getSystemClassLoader().getResource("edu/rpi/legup/images/Legup/Check.png"); + ImageIcon imageIcon = new ImageIcon(check_and_save); + Image image = imageIcon.getImage(); + imageIcon = new ImageIcon(image.getScaledInstance(this.TOOLBAR_ICON_SCALE, this.TOOLBAR_ICON_SCALE, Image.SCALE_SMOOTH)); - URL check_and_save= ClassLoader.getSystemClassLoader().getResource("edu/rpi/legup/images/Legup/Check.png"); - ImageIcon imageIcon= new ImageIcon(check_and_save); - Image image = imageIcon.getImage(); - imageIcon = new ImageIcon(image.getScaledInstance(this.TOOLBAR_ICON_SCALE, this.TOOLBAR_ICON_SCALE, Image.SCALE_SMOOTH)); - - JButton checkandsave= new JButton("check and Save",imageIcon); - checkandsave.setFocusPainted(false); - checkandsave.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - //savePuzzle(); - String filename = savePuzzle(); - File puzzlename= new File(filename); - System.out.println(filename); - - - GameBoardFacade.getInstance().getLegupUI().displayPanel(1); - GameBoardFacade.getInstance().getLegupUI().getProofEditor().loadPuzzle(filename,new File(filename)); - String puzzleName = GameBoardFacade.getInstance().getPuzzleModule().getName(); - frame.setTitle(puzzleName + " - " + puzzlename.getName()); - } - }); - getToolBarButtons()[lastone+1]=checkandsave; - System.out.println("it is create new file"); + JButton checkandsave = new JButton("check and Save", imageIcon); + checkandsave.setFocusPainted(false); + checkandsave.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + //savePuzzle(); + String filename = savePuzzle(); + File puzzlename = new File(filename); + System.out.println(filename); + GameBoardFacade.getInstance().getLegupUI().displayPanel(1); + GameBoardFacade.getInstance().getLegupUI().getProofEditor().loadPuzzle(filename, new File(filename)); + String puzzleName = GameBoardFacade.getInstance().getPuzzleModule().getName(); + frame.setTitle(puzzleName + " - " + puzzlename.getName()); + } + }); + getToolBarButtons()[lastone + 1] = checkandsave; + System.out.println("it is create new file"); toolBar = new JToolBar(); toolBar.setFloatable(false); toolBar.setRollover(true); - for (int i = 0; i < getToolBarButtons().length-1; i++) { + for (int i = 0; i < getToolBarButtons().length - 1; i++) { for (int s = 0; s < TOOLBAR_SEPARATOR_BEFORE.length; s++) { if (i == TOOLBAR_SEPARATOR_BEFORE[s]) { toolBar.addSeparator(); @@ -466,7 +463,7 @@ public void setPuzzleView(Puzzle puzzle) { * Saves a puzzle */ - private void direct_save(){ + private void direct_save() { Puzzle puzzle = GameBoardFacade.getInstance().getPuzzleModule(); if (puzzle == null) { return; @@ -485,10 +482,11 @@ private void direct_save(){ } } } + private String savePuzzle() { Puzzle puzzle = GameBoardFacade.getInstance().getPuzzleModule(); if (puzzle == null) { - return""; + return ""; } // for TreeTent, need to check validity before saving @@ -539,11 +537,9 @@ private String savePuzzle() { } - public DynamicView getDynamicBoardView() { return dynamicBoardView; } - } diff --git a/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/RuleFrame.java b/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/RuleFrame.java index c763f6cef..a2d37e800 100644 --- a/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/RuleFrame.java +++ b/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/RuleFrame.java @@ -173,6 +173,7 @@ public CaseRulePanel getCasePanel() { public ContradictionRulePanel getContradictionPanel() { return contradictionPanel; } + public SearchBarPanel getSearchPanel() { return searchPanel; } diff --git a/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/RulePanel.java b/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/RulePanel.java index 2f197fe1d..8c28215b3 100644 --- a/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/RulePanel.java +++ b/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/RulePanel.java @@ -58,7 +58,7 @@ public void setRules(List rules) { Rule rule = rules.get(i); ruleButtons[i] = new RuleButton(rule); - ruleButtons[i].setPreferredSize(new Dimension(150,150));// adjust the size of each RuleButton + ruleButtons[i].setPreferredSize(new Dimension(150, 150));// adjust the size of each RuleButton ruleButtons[i].setHorizontalTextPosition(JButton.CENTER); ruleButtons[i].setVerticalTextPosition(JButton.BOTTOM); @@ -76,12 +76,12 @@ public void setRules(List rules) { * Search a certain rule in all the puzzles and set it for the searchBarPanel * * @param puzzle, ruleName - * - * This function is the searching algorithm for "public void setSearchBar(Puzzle allPuzzle)" (below) - * - * It takes two param Puzzle puzzle and String ruleName - * puzzle contains rules, this function will compare each rule of puzzle with ruleName, - * to find exact same, similar rules, or all the rules with same start letter (if input is a signal letter) + *

+ * This function is the searching algorithm for "public void setSearchBar(Puzzle allPuzzle)" (below) + *

+ * It takes two param Puzzle puzzle and String ruleName + * puzzle contains rules, this function will compare each rule of puzzle with ruleName, + * to find exact same, similar rules, or all the rules with same start letter (if input is a signal letter) */ public void searchForRule(Puzzle puzzle, String ruleName) { @@ -94,7 +94,7 @@ public void searchForRule(Puzzle puzzle, String ruleName) { int similarfound = 0; - for(int i = 0; i < allrules.size(); i++) { + for (int i = 0; i < allrules.size(); i++) { for (int j = 0; j < allrules.get(i).size(); j++) { Rule rule = allrules.get(i).get(j); if ((ruleName).equals(rule.getRuleName().toUpperCase())) { @@ -102,7 +102,7 @@ public void searchForRule(Puzzle puzzle, String ruleName) { ruleButtons[0] = new RuleButton(rule); ruleFrame.getButtonGroup().add(ruleButtons[0]); - ruleButtons[0].setPreferredSize(new Dimension(150,150));// adjust the size of each RuleButton + ruleButtons[0].setPreferredSize(new Dimension(150, 150));// adjust the size of each RuleButton ruleButtons[0].setHorizontalTextPosition(JButton.CENTER); ruleButtons[0].setVerticalTextPosition(JButton.BOTTOM); @@ -113,38 +113,42 @@ public void searchForRule(Puzzle puzzle, String ruleName) { return; } - else if(similarityCheck(ruleName, rule.getRuleName().toUpperCase())>0.2){ - ruleButtons[similarfound] = new RuleButton(rule); - ruleFrame.getButtonGroup().add(ruleButtons[similarfound]); - - ruleButtons[similarfound].setPreferredSize(new Dimension(150,150));// adjust the size of each RuleButton - ruleButtons[similarfound].setHorizontalTextPosition(JButton.CENTER); - ruleButtons[similarfound].setVerticalTextPosition(JButton.BOTTOM); - - ruleButtons[similarfound].setToolTipText(rule.getRuleName() + ": " + rule.getDescription()); - ruleButtons[similarfound].addActionListener(ruleFrame.getController()); - add(ruleButtons[similarfound]); - similarfound+=1; - revalidate(); - } - else if((ruleName.charAt(0)) == (rule.getRuleName().toUpperCase()).charAt(0)){ - ruleButtons[similarfound] = new RuleButton(rule); - ruleFrame.getButtonGroup().add(ruleButtons[similarfound]); - - ruleButtons[similarfound].setPreferredSize(new Dimension(150,150));// adjust the size of each RuleButton - ruleButtons[similarfound].setHorizontalTextPosition(JButton.CENTER); - ruleButtons[similarfound].setVerticalTextPosition(JButton.BOTTOM); - - ruleButtons[similarfound].setToolTipText(rule.getRuleName() + ": " + rule.getDescription()); - ruleButtons[similarfound].addActionListener(ruleFrame.getController()); - add(ruleButtons[similarfound]); - similarfound+=1; - revalidate(); + else { + if (similarityCheck(ruleName, rule.getRuleName().toUpperCase()) > 0.2) { + ruleButtons[similarfound] = new RuleButton(rule); + ruleFrame.getButtonGroup().add(ruleButtons[similarfound]); + + ruleButtons[similarfound].setPreferredSize(new Dimension(150, 150));// adjust the size of each RuleButton + ruleButtons[similarfound].setHorizontalTextPosition(JButton.CENTER); + ruleButtons[similarfound].setVerticalTextPosition(JButton.BOTTOM); + + ruleButtons[similarfound].setToolTipText(rule.getRuleName() + ": " + rule.getDescription()); + ruleButtons[similarfound].addActionListener(ruleFrame.getController()); + add(ruleButtons[similarfound]); + similarfound += 1; + revalidate(); + } + else { + if ((ruleName.charAt(0)) == (rule.getRuleName().toUpperCase()).charAt(0)) { + ruleButtons[similarfound] = new RuleButton(rule); + ruleFrame.getButtonGroup().add(ruleButtons[similarfound]); + + ruleButtons[similarfound].setPreferredSize(new Dimension(150, 150));// adjust the size of each RuleButton + ruleButtons[similarfound].setHorizontalTextPosition(JButton.CENTER); + ruleButtons[similarfound].setVerticalTextPosition(JButton.BOTTOM); + + ruleButtons[similarfound].setToolTipText(rule.getRuleName() + ": " + rule.getDescription()); + ruleButtons[similarfound].addActionListener(ruleFrame.getController()); + add(ruleButtons[similarfound]); + similarfound += 1; + revalidate(); + } + } } } } - if(ruleButtons[0] == null) { + if (ruleButtons[0] == null) { JOptionPane.showMessageDialog(null, "Please input the correct rule name", "Confirm", JOptionPane.INFORMATION_MESSAGE); } } @@ -153,14 +157,15 @@ else if((ruleName.charAt(0)) == (rule.getRuleName().toUpperCase()).charAt(0)){ * Calculates the similarity (a number within 0 and 1) between two strings. * This funtion will take two para String s1 and String s2, which s1 is the user's input * and s2 is the compared really rule name - * + *

* similarityCheck will use a helper function to calculate a similarity degree(from 0 to 1). * closer to 0 means less similar, and closer to 1 means more similar. */ public static double similarityCheck(String s1, String s2) { String longer = s1, shorter = s2; if (s1.length() < s2.length()) { // longer should always have greater length - longer = s2; shorter = s1; + longer = s2; + shorter = s1; } int longerLength = longer.length(); if (longerLength == 0) { @@ -168,6 +173,7 @@ public static double similarityCheck(String s1, String s2) { } return (longerLength - editDistance(longer, shorter)) / (double) longerLength; } + /** * Help function for similarityCheck(); */ @@ -206,7 +212,7 @@ public static int editDistance(String s1, String s2) { * once a name is entered and click ok will load (a/several) rule icon, * which has all the functions just as other rule icons. */ - public void setSearchBar(Puzzle allPuzzle){ + public void setSearchBar(Puzzle allPuzzle) { searchBarPanel = new JPanel(new FlowLayout(SwingConstants.LEADING, 6, 6)); add(searchBarPanel); @@ -221,8 +227,8 @@ public void setSearchBar(Puzzle allPuzzle){ @Override public void actionPerformed(ActionEvent event) { if (ruleButtons != null) { - for(int i = 0; i != ruleButtons.length; i++) { - if(ruleButtons[i]==null){ + for (int i = 0; i != ruleButtons.length; i++) { + if (ruleButtons[i] == null) { continue; } ruleButtons[i].removeActionListener(ruleFrame.getController()); @@ -234,7 +240,7 @@ public void actionPerformed(ActionEvent event) { if (ruleButtons != null) { for (int x = 0; x < ruleButtons.length; ++x) { - if(ruleButtons[x]==null){ + if (ruleButtons[x] == null) { continue; } remove(ruleButtons[x]); @@ -243,7 +249,7 @@ public void actionPerformed(ActionEvent event) { searchForRule(allPuzzle, inputRule); } else { - JOptionPane.showMessageDialog(null, "Please give a name","Confirm",JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, "Please give a name", "Confirm", JOptionPane.INFORMATION_MESSAGE); } } diff --git a/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/SearchBarPanel.java b/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/SearchBarPanel.java index 2c32b6e88..ff8a5d259 100644 --- a/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/SearchBarPanel.java +++ b/src/main/java/edu/rpi/legup/ui/proofeditorui/rulesview/SearchBarPanel.java @@ -7,8 +7,8 @@ public class SearchBarPanel extends RulePanel { * SearchBarPanel Constructor creates a SearchBarPanel * * @param ruleFrame rule frame that this SearchBarPanel is contained in - * - * This class is used to create a panel named "search bar" + *

+ * This class is used to create a panel named "search bar" */ SearchBarPanel(RuleFrame ruleFrame) { super(ruleFrame); diff --git a/src/main/java/edu/rpi/legup/ui/proofeditorui/treeview/TreeTransitionView.java b/src/main/java/edu/rpi/legup/ui/proofeditorui/treeview/TreeTransitionView.java index f63963a66..749af0c79 100644 --- a/src/main/java/edu/rpi/legup/ui/proofeditorui/treeview/TreeTransitionView.java +++ b/src/main/java/edu/rpi/legup/ui/proofeditorui/treeview/TreeTransitionView.java @@ -25,8 +25,8 @@ public class TreeTransitionView extends TreeElementView { private static final Color DEFAULT_COLOR = Color.GRAY; private static final Color X_COLOR = Color.RED; - private static final Color CORRECT_COLOR_COLORBLIND = new Color(0,0,255); - private static final Color INCORRECT_COLOR_COLORBLIND = new Color(255,0,0); + private static final Color CORRECT_COLOR_COLORBLIND = new Color(0, 0, 255); + private static final Color INCORRECT_COLOR_COLORBLIND = new Color(255, 0, 0); private static final Color OUTLINE_SELECTION_COLOR = new Color(0x1976D2); @@ -96,9 +96,9 @@ public void draw(Graphics2D graphics2D) { if (isSelected) { Color c = DEFAULT_COLOR; - if(getTreeElement().isJustified()) { - if(getTreeElement().isCorrect()) { - if(colorBlind) { + if (getTreeElement().isJustified()) { + if (getTreeElement().isCorrect()) { + if (colorBlind) { c = CORRECT_COLOR_COLORBLIND; } else { @@ -106,7 +106,7 @@ public void draw(Graphics2D graphics2D) { } } else { - if(colorBlind) { + if (colorBlind) { c = INCORRECT_COLOR_COLORBLIND; } else { @@ -145,9 +145,9 @@ public void draw(Graphics2D graphics2D) { } else { Color c = DEFAULT_COLOR; - if(getTreeElement().isJustified()) { - if(getTreeElement().isCorrect()) { - if(colorBlind) { + if (getTreeElement().isJustified()) { + if (getTreeElement().isCorrect()) { + if (colorBlind) { c = CORRECT_COLOR_COLORBLIND; } else { @@ -155,7 +155,7 @@ public void draw(Graphics2D graphics2D) { } } else { - if(colorBlind) { + if (colorBlind) { c = INCORRECT_COLOR_COLORBLIND; } else { diff --git a/src/main/java/edu/rpi/legup/utility/Logger.java b/src/main/java/edu/rpi/legup/utility/Logger.java index a14834114..1feb56f04 100644 --- a/src/main/java/edu/rpi/legup/utility/Logger.java +++ b/src/main/java/edu/rpi/legup/utility/Logger.java @@ -16,7 +16,7 @@ public class Logger { private static final String LEGUP_HOME = System.getProperty("user.home") + File.separator + ".legup" + File.separator; - public static void initLogger(){ + public static void initLogger() { LoggerContext context = (LoggerContext) LogManager.getContext(false); Configuration config = context.getConfiguration(); ConsoleAppender consoleAppender = config.getAppender("console"); diff --git a/src/main/resources/edu/rpi/legup/images/Legup/Legup_new_logo.svg b/src/main/resources/edu/rpi/legup/images/Legup/Legup_new_logo.svg index ec4357d74..40fc0098f 100644 --- a/src/main/resources/edu/rpi/legup/images/Legup/Legup_new_logo.svg +++ b/src/main/resources/edu/rpi/legup/images/Legup/Legup_new_logo.svg @@ -1,66 +1,66 @@ - - - - - - - - - - - + version="1.0" + width="600.000000pt" + height="302.000000pt" + viewBox="0 0 600.000000 302.000000" + preserveAspectRatio="xMidYMid meet" + id="svg472" + sodipodi:docname="LEGUP.svg" + inkscape:version="1.2.2 (732a01da63, 2022-12-09)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + + + + + + + + + + + diff --git a/src/test/java/puzzles/nurikabe/rules/NoNumbersContradictionRuleTest.java b/src/test/java/puzzles/nurikabe/rules/NoNumbersContradictionRuleTest.java index bc7f40d7b..2852f3400 100644 --- a/src/test/java/puzzles/nurikabe/rules/NoNumbersContradictionRuleTest.java +++ b/src/test/java/puzzles/nurikabe/rules/NoNumbersContradictionRuleTest.java @@ -49,7 +49,7 @@ public void NoNumberContradictionRule_NoNumberSurroundBlack() throws InvalidFile } } -// Checks if a transition produces a room without a number. + // Checks if a transition produces a room without a number. @Test public void NoNumberContradictionRule_NoNumberReachable() throws InvalidFileFormatException { TestUtilities.importTestBoard("puzzles/nurikabe/rules/NoNumberContradictionRule/NoNumberReachable", nurikabe); From 46c77b73a95699e695b5fcef74db466bec67d436 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 31 Mar 2023 10:02:22 -0400 Subject: [PATCH 27/54] Removed a TODO comment --- src/main/java/edu/rpi/legup/model/PuzzleImporter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index b8a66b9b0..d13ea0acf 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -26,8 +26,7 @@ public abstract class PuzzleImporter { public PuzzleImporter(Puzzle puzzle) { this.puzzle = puzzle; } - - // TODO: add these methods to all importers + public abstract boolean acceptsRowsAndColumnsInput(); public abstract boolean acceptsTextInput(); From 09fc3a3f6ab35c3f7868cee4f7904ba6219266f1 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 31 Mar 2023 10:28:32 -0400 Subject: [PATCH 28/54] Statements show up in puzzle editor Fixed a bug where the importer was not properly being initialized. Statements now show up in the puzzle editor. --- .../edu/rpi/legup/app/GameBoardFacade.java | 29 +++++++++++-------- .../edu/rpi/legup/model/PuzzleImporter.java | 2 +- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index 8db0aff8f..ca5783575 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -152,21 +152,23 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti try { // TODO: test and make sure this doesn't break anything - PuzzleImporter importer = puzzle.getImporter(); - if (!importer.acceptsRowsAndColumnsInput()) { - throw new IllegalArgumentException(puzzle.getName() + " does not accept rows and columns input"); - } - Class c = Class.forName(qualifiedClassName); Constructor cons = c.getConstructor(); Puzzle puzzle = (Puzzle) cons.newInstance(); - setWindowTitle(puzzle.getName(), "New " + puzzle.getName() + " Puzzle"); + PuzzleImporter importer = puzzle.getImporter(); if (importer == null) { LOGGER.error("Puzzle importer is null"); throw new RuntimeException("Puzzle importer null"); } + // Theoretically, this exception should never be thrown, since LEGUP should not be + // allowing the user to give row/column input for a puzzle that doesn't support it + if (!importer.acceptsRowsAndColumnsInput()) { + throw new IllegalArgumentException(puzzle.getName() + " does not accept rows and columns input"); + } + + setWindowTitle(puzzle.getName(), "New " + puzzle.getName() + " Puzzle"); importer.initializePuzzle(rows, columns); puzzle.initializeView(); @@ -190,26 +192,29 @@ public void loadPuzzle(String game, String[] statements) { try { // TODO: test and make sure this doesn't break anything - PuzzleImporter importer = puzzle.getImporter(); - if (!importer.acceptsTextInput()) { - throw new IllegalArgumentException(puzzle.getName() + " does not accept rows and columns input"); - } - Class c = Class.forName(qualifiedClassName); Constructor cons = c.getConstructor(); Puzzle puzzle = (Puzzle) cons.newInstance(); - setWindowTitle(puzzle.getName(), "New " + puzzle.getName() + " Puzzle"); + PuzzleImporter importer = puzzle.getImporter(); if (importer == null) { LOGGER.error("Puzzle importer is null"); throw new RuntimeException("Puzzle importer null"); } + // Theoretically, this exception should never be thrown, since LEGUP should not be + // allowing the user to give text input for a puzzle that doesn't support it + if (!importer.acceptsTextInput()) { + throw new IllegalArgumentException(puzzle.getName() + " does not accept text input"); + } + + setWindowTitle(puzzle.getName(), "New " + puzzle.getName() + " Puzzle"); importer.initializePuzzle(statements); puzzle.initializeView(); // puzzle.getBoardView().onTreeElementChanged(puzzle.getTree().getRootNode()); setPuzzleEditor(puzzle); + System.out.println("Puzzle editor set!"); } catch (IllegalArgumentException exception) { throw new IllegalArgumentException(exception.getMessage()); diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index d13ea0acf..1c09576bc 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -26,7 +26,7 @@ public abstract class PuzzleImporter { public PuzzleImporter(Puzzle puzzle) { this.puzzle = puzzle; } - + public abstract boolean acceptsRowsAndColumnsInput(); public abstract boolean acceptsTextInput(); From 091451c7303ff4d7d473fd7d824b81b54eafc058 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 31 Mar 2023 10:38:20 -0400 Subject: [PATCH 29/54] Removed empty statements --- src/main/java/edu/rpi/legup/app/GameBoardFacade.java | 4 ---- src/main/java/edu/rpi/legup/model/PuzzleImporter.java | 4 +++- .../puzzle/shorttruthtable/ShortTruthTableImporter.java | 9 +++++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index ca5783575..e82352cb9 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -151,7 +151,6 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti LOGGER.debug("Loading " + qualifiedClassName); try { - // TODO: test and make sure this doesn't break anything Class c = Class.forName(qualifiedClassName); Constructor cons = c.getConstructor(); Puzzle puzzle = (Puzzle) cons.newInstance(); @@ -186,12 +185,10 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti } public void loadPuzzle(String game, String[] statements) { - // TODO: Make sure this method isn't broken String qualifiedClassName = config.getPuzzleClassForName(game); LOGGER.debug("Loading " + qualifiedClassName); try { - // TODO: test and make sure this doesn't break anything Class c = Class.forName(qualifiedClassName); Constructor cons = c.getConstructor(); Puzzle puzzle = (Puzzle) cons.newInstance(); @@ -214,7 +211,6 @@ public void loadPuzzle(String game, String[] statements) { puzzle.initializeView(); // puzzle.getBoardView().onTreeElementChanged(puzzle.getTree().getRootNode()); setPuzzleEditor(puzzle); - System.out.println("Puzzle editor set!"); } catch (IllegalArgumentException exception) { throw new IllegalArgumentException(exception.getMessage()); diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index 1c09576bc..31a784305 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -48,7 +48,9 @@ public void initializePuzzle(int rows, int columns) throws RuntimeException { } public void initializePuzzle(String[] statements) throws InputMismatchException, InvalidFormatException { - // TODO: implement this + // Note: Error checking for the statements will be left up to the puzzles that support + // text input. For example, some puzzles may be okay with "blank" statements (Strings with + // length = 0) while others may not. initializeBoard(statements); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index f86aa614f..a8c44509c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -11,6 +11,7 @@ import java.awt.*; import java.util.InputMismatchException; +import java.util.LinkedList; import java.util.List; import java.util.ArrayList; @@ -317,8 +318,12 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } } - public void initializeBoard(String[] statementData) throws InputMismatchException, InvalidFormatException { - // TODO: finish this method, check exception handling + public void initializeBoard(String[] statementInput) throws InputMismatchException, InvalidFormatException { + List statementsList = new LinkedList<>(); + for (String s : statementInput) + if (s.strip().length() != 0) + statementsList.add(s); + String[] statementData = statementsList.toArray(new String[statementsList.size()]); if (statementData.length == 0) { throw new InvalidFormatException("short truth table Importer: no statements found for board"); From df5db8dacb105bbfe145d9993f937bbdb5c4a0c2 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 31 Mar 2023 14:44:09 -0400 Subject: [PATCH 30/54] Changed InvalidFormatException to IllegalArgumentException --- .../java/edu/rpi/legup/app/GameBoardFacade.java | 16 +++++++--------- .../edu/rpi/legup/model/PuzzleImporter.java | 5 ++--- .../legup/puzzle/fillapix/FillapixImporter.java | 1 - .../ShortTruthTableImporter.java | 17 +++++++---------- .../puzzle/skyscrapers/SkyscrapersImporter.java | 1 - .../rpi/legup/puzzle/sudoku/SudokuImporter.java | 1 - .../legup/puzzle/treetent/TreeTentImporter.java | 1 - 7 files changed, 16 insertions(+), 26 deletions(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index e82352cb9..79c826cec 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -1,24 +1,22 @@ package edu.rpi.legup.app; -import com.sun.media.sound.InvalidFormatException; +import edu.rpi.legup.history.History; import edu.rpi.legup.history.IHistoryListener; import edu.rpi.legup.history.IHistorySubject; +import edu.rpi.legup.model.Puzzle; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.model.gameboard.Board; -import edu.rpi.legup.model.Puzzle; import edu.rpi.legup.model.tree.Tree; +import edu.rpi.legup.save.InvalidFileFormatException; +import edu.rpi.legup.ui.LegupUI; import edu.rpi.legup.ui.ProofEditorPanel; import edu.rpi.legup.ui.PuzzleEditorPanel; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.xml.sax.SAXException; -import edu.rpi.legup.save.InvalidFileFormatException; -import edu.rpi.legup.ui.LegupUI; -import edu.rpi.legup.history.History; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -216,7 +214,7 @@ public void loadPuzzle(String game, String[] statements) { throw new IllegalArgumentException(exception.getMessage()); } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | - IllegalAccessException | InstantiationException | InvalidFormatException e) { + IllegalAccessException | InstantiationException | IllegalArgumentException e) { LOGGER.error(e); throw new RuntimeException("Puzzle creation error"); } diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index 31a784305..59b8e7118 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -1,6 +1,5 @@ package edu.rpi.legup.model; -import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.gameboard.Board; import edu.rpi.legup.model.gameboard.PuzzleElement; import edu.rpi.legup.model.rules.MergeRule; @@ -47,7 +46,7 @@ public void initializePuzzle(int rows, int columns) throws RuntimeException { } } - public void initializePuzzle(String[] statements) throws InputMismatchException, InvalidFormatException { + public void initializePuzzle(String[] statements) throws InputMismatchException, IllegalArgumentException { // Note: Error checking for the statements will be left up to the puzzles that support // text input. For example, some puzzles may be okay with "blank" statements (Strings with // length = 0) while others may not. @@ -124,7 +123,7 @@ public void initializePuzzle(Node node) throws InvalidFileFormatException { */ public abstract void initializeBoard(Node node) throws InvalidFileFormatException; - public abstract void initializeBoard(String[] statements) throws InputMismatchException, InvalidFormatException; + public abstract void initializeBoard(String[] statements) throws InputMismatchException, IllegalArgumentException; /** * Creates the proof for building diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java b/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java index 0c61ba29a..b04bac266 100644 --- a/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java @@ -1,6 +1,5 @@ package edu.rpi.legup.puzzle.fillapix; -import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index a8c44509c..5a074982e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -1,21 +1,18 @@ package edu.rpi.legup.puzzle.shorttruthtable; -import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import org.w3c.dom.NamedNodeMap; +import javax.swing.*; import java.awt.*; - +import java.util.ArrayList; import java.util.InputMismatchException; import java.util.LinkedList; import java.util.List; -import java.util.ArrayList; - -import javax.swing.*; class ShortTruthTableImporter extends PuzzleImporter { @@ -95,13 +92,13 @@ private int parseAllStatementsAndCells(final NodeList statementData, private int parseAllStatementsAndCells(String[] statementData, List> allCells, - List statements) throws InvalidFormatException { + List statements) throws IllegalArgumentException { int maxStatementLength = 0; for (int i = 0; i < statementData.length; i++) { if (!validGrammar(statementData[i])) { JOptionPane.showMessageDialog(null, "ERROR: Invalid file syntax"); - throw new InvalidFormatException("shorttruthtable importer: invalid sentence syntax"); + throw new IllegalArgumentException("shorttruthtable importer: invalid sentence syntax"); } //get the cells for the statement @@ -318,7 +315,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } } - public void initializeBoard(String[] statementInput) throws InputMismatchException, InvalidFormatException { + public void initializeBoard(String[] statementInput) throws InputMismatchException, IllegalArgumentException { List statementsList = new LinkedList<>(); for (String s : statementInput) if (s.strip().length() != 0) @@ -326,7 +323,7 @@ public void initializeBoard(String[] statementInput) throws InputMismatchExcepti String[] statementData = statementsList.toArray(new String[statementsList.size()]); if (statementData.length == 0) { - throw new InvalidFormatException("short truth table Importer: no statements found for board"); + throw new IllegalArgumentException("short truth table Importer: no statements found for board"); } // Store all cells and statements diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java index 20b3b1175..c41b6427c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java @@ -1,6 +1,5 @@ package edu.rpi.legup.puzzle.skyscrapers; -import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java index cb5a6ce0c..a113c7fc4 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java @@ -1,6 +1,5 @@ package edu.rpi.legup.puzzle.sudoku; -import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java index c216889c9..fdd0d6b60 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java @@ -1,6 +1,5 @@ package edu.rpi.legup.puzzle.treetent; -import com.sun.media.sound.InvalidFormatException; import edu.rpi.legup.model.PuzzleImporter; import edu.rpi.legup.save.InvalidFileFormatException; import org.w3c.dom.Element; From 38f3c0c4c95ae2f77093f734d5f91410825377e3 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 31 Mar 2023 15:39:10 -0400 Subject: [PATCH 31/54] Remove argument that has already been caught --- src/main/java/edu/rpi/legup/app/GameBoardFacade.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index 79c826cec..8c545fc59 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -214,7 +214,7 @@ public void loadPuzzle(String game, String[] statements) { throw new IllegalArgumentException(exception.getMessage()); } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | - IllegalAccessException | InstantiationException | IllegalArgumentException e) { + IllegalAccessException | InstantiationException e) { LOGGER.error(e); throw new RuntimeException("Puzzle creation error"); } From 5ad5fc7bab5dfe0aaa0dec2f130507bd10379869 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 4 Apr 2023 16:47:38 -0400 Subject: [PATCH 32/54] Removed elements that will not be used --- .../shorttruthtable/elements/AndElement.java | 9 ------- .../elements/BiconditionalElement.java | 9 ------- .../elements/ConditionalElement.java | 9 ------- .../elements/NegationElement.java | 9 ------- .../shorttruthtable/elements/OrElement.java | 9 ------- .../elements/ParenthesisElement.java | 24 ------------------- 6 files changed, 69 deletions(-) delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java deleted file mode 100644 index 72093490c..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndElement.java +++ /dev/null @@ -1,9 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class AndElement extends NonPlaceableElement { - public AndElement() { - super("STTT-UNPL-0001", "And Element", "And logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png"); - } -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java deleted file mode 100644 index e29749582..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/BiconditionalElement.java +++ /dev/null @@ -1,9 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class BiconditionalElement extends NonPlaceableElement { - public BiconditionalElement() { - super("STTT-UNPL-0002", "Biconditional Element", "Biconditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png"); - } -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java deleted file mode 100644 index cb89e4efb..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalElement.java +++ /dev/null @@ -1,9 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class ConditionalElement extends NonPlaceableElement { - public ConditionalElement() { - super("STTT-UNPL-0003", "Conditional Element", "Conditional logic element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png"); - } -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java deleted file mode 100644 index 4be1bc612..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/NegationElement.java +++ /dev/null @@ -1,9 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class NegationElement extends NonPlaceableElement { - public NegationElement() { - super("STTT-UNPL-0005", "Negation Element", "Negation logic element", "edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png"); - } -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java deleted file mode 100644 index 709a5e962..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/OrElement.java +++ /dev/null @@ -1,9 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class OrElement extends NonPlaceableElement { - public OrElement() { - super("STTT-UNPL-0006", "Or Element", "Or logic element", "edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png"); - } -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java deleted file mode 100644 index 91fd5760a..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ParenthesisElement.java +++ /dev/null @@ -1,24 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class ParenthesisElement extends NonPlaceableElement { - - private char parenthesis = '('; - - public ParenthesisElement() { - super("STTT-UNPL-0007", "Parenthesis Element", "Parenthesis element", "edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png"); - } - - public char getParenthesis() { - return parenthesis; - } - - public void setOpenParenthesis() { - this.parenthesis = '('; - } - - public void setClosedParenthesis() { - this.parenthesis = ')'; - } -} From d59fe452ac0dc499018c6d198d78f9b5af56aba6 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 4 Apr 2023 17:25:32 -0400 Subject: [PATCH 33/54] Added puzzle editor cell clicking functionality --- .../shorttruthtable/ShortTruthTableCell.java | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 768b4ed2a..b99656bd6 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -1,15 +1,17 @@ package edu.rpi.legup.puzzle.shorttruthtable; +import edu.rpi.legup.model.elements.Element; import edu.rpi.legup.model.gameboard.GridCell; import edu.rpi.legup.puzzle.shorttruthtable.ShortTruthTableStatement; import java.awt.Point; +import java.awt.event.MouseEvent; public class ShortTruthTableCell extends GridCell { //The symbol on the cell - private final char symbol; + private char symbol; //This is a reference to the statement that contains this cell private ShortTruthTableStatement statement; @@ -127,5 +129,39 @@ public ShortTruthTableCell copy() { return copy; } - + /** + * Sets the type of this ShortTruthTableCell + * + * @param e element to set the type of this Short Truth Table cell to + */ + @Override + public void setType(Element e, MouseEvent m) { + if (e.getElementName().equals("Red Element")) { + this.data = ShortTruthTableCellType.FALSE; + } + else if (e.getElementName().equals("Green Element")) { + this.data = ShortTruthTableCellType.TRUE; + } + else if (e.getElementName().equals("Unknown Element")) { + this.data = ShortTruthTableCellType.UNKNOWN; + } + else if (e.getElementName().equals("Argument Element")) { + // Prevents non-argument symbols from being changed + if (!(this.symbol >= 'A' && this.symbol <= 'Z')) + return; + + if (m.getButton() == MouseEvent.BUTTON1) { + this.symbol += 1; + if (this.symbol > 'Z') { + this.symbol = 'A'; + } + } + else if (m.getButton() == MouseEvent.BUTTON3) { + this.symbol -= 1; + if (this.symbol < 'A') { + this.symbol = 'Z'; + } + } + } + } } \ No newline at end of file From f3d74278210296675f15849e7bf76ef68c77c85c Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 7 Apr 2023 10:06:51 -0400 Subject: [PATCH 34/54] Added ability to toggle certain logical elements --- .../shorttruthtable/ShortTruthTableCell.java | 26 ++++++++++++++++--- .../elements/AndOrElement.java | 9 +++++++ .../elements/ArgumentElement.java | 12 +-------- .../ConditionalBiconditionalElement.java | 9 +++++++ .../elements/UnknownElement.java | 2 +- .../shorttruthtable_elements_reference_sheet | 12 +++------ 6 files changed, 46 insertions(+), 24 deletions(-) create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index b99656bd6..53aecc599 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -136,16 +136,20 @@ public ShortTruthTableCell copy() { */ @Override public void setType(Element e, MouseEvent m) { - if (e.getElementName().equals("Red Element")) { + // Red Element + if (e.getElementID().equals("STTT-PLAC-0002")) { this.data = ShortTruthTableCellType.FALSE; } - else if (e.getElementName().equals("Green Element")) { + // Green Element + else if (e.getElementID().equals("STTT-PLAC-0001")) { this.data = ShortTruthTableCellType.TRUE; } - else if (e.getElementName().equals("Unknown Element")) { + // Unknown Element + else if (e.getElementID().equals("STTT-UNPL-0004")) { this.data = ShortTruthTableCellType.UNKNOWN; } - else if (e.getElementName().equals("Argument Element")) { + // Argument Element + else if (e.getElementID().equals("STTT-UNPL-0002")) { // Prevents non-argument symbols from being changed if (!(this.symbol >= 'A' && this.symbol <= 'Z')) return; @@ -163,5 +167,19 @@ else if (m.getButton() == MouseEvent.BUTTON3) { } } } + // And/Or Element + else if (e.getElementID().equals("STTT-UNPL-0001")) { + if (this.symbol == '^') + this.symbol = '|'; + else if (this.symbol == '|') + this.symbol = '^'; + } + // Conditional/Biconditional Element + else if (e.getElementID().equals("STTT-UNPL-0003")) { + if (this.symbol == '>') + this.symbol = '-'; + else if (this.symbol == '-') + this.symbol = '>'; + } } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java new file mode 100644 index 000000000..77b4e6b2c --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class AndOrElement extends NonPlaceableElement { + public AndOrElement() { + super("STTT-UNPL-0001", "And/Or Element", "And/Or logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java index fbc7b0a8b..a34a5803c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java @@ -3,17 +3,7 @@ import edu.rpi.legup.model.elements.NonPlaceableElement; public class ArgumentElement extends NonPlaceableElement { - private char letter = 'A'; - public ArgumentElement() { - super("STTT-UNPL-0004", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png"); - } - - public char getLetter() { - return letter; - } - - public void setLetter(char letter) { - this.letter = letter; + super("STTT-UNPL-0002", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java new file mode 100644 index 000000000..206ebefe0 --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class ConditionalBiconditionalElement extends NonPlaceableElement { + public ConditionalBiconditionalElement() { + super("STTT-UNPL-0003", "Conditional/Biconditional Element", "Conditional/Biconditional logical element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java index 016dad75c..db149ddd5 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java @@ -4,6 +4,6 @@ public class UnknownElement extends NonPlaceableElement { public UnknownElement() { - super("STTT-UNPL-0008", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); + super("STTT-UNPL-0004", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet index ca6a5d83d..2f481712b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet @@ -1,11 +1,7 @@ -STTT-UNPL-0001 : AndElement -STTT-UNPL-0002 : BiconditionalElement -STTT-UNPL-0003 : ConditionalElement -STTT-UNPL-0004 : LetterElement -STTT-UNPL-0005 : NegationElement -STTT-UNPL-0006 : OrElement -STTT-UNPL-0007 : ParenthesisElement -STTT-UNPL-0008 : UnknownElement +STTT-UNPL-0001 : AndOrElement +STTT-UNPL-0002 : ArgumentElement +STTT-UNPL-0003 : ConditionalBiconditionalElement +STTT-UNPL-0004 : UnknownElement STTT-PLAC-0001 : GreenElement STTT-PLAC-0002 : RedElement \ No newline at end of file From 2e24c0e5cd2fe1399385cc866640053cf6f09ed1 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 7 Apr 2023 10:25:04 -0400 Subject: [PATCH 35/54] New icons and more functionality implemented --- .../shorttruthtable/ShortTruthTableCell.java | 8 ++++++++ .../shorttruthtable/elements/AndOrElement.java | 2 +- .../ConditionalBiconditionalElement.java | 2 +- .../images/shorttruthtable/tiles/AndOrTile.png | Bin 0 -> 442 bytes .../images/shorttruthtable/tiles/AndTile.png | Bin 9733 -> 0 bytes .../tiles/BiconditionalTile.png | Bin 9733 -> 0 bytes .../tiles/ConditionalBiconditionalTile.png | Bin 0 -> 326 bytes .../shorttruthtable/tiles/ConditionalTile.png | Bin 9733 -> 0 bytes .../shorttruthtable/tiles/LetterTile.png | Bin 9733 -> 579 bytes .../shorttruthtable/tiles/NegationTile.png | Bin 9733 -> 0 bytes .../images/shorttruthtable/tiles/OrTile.png | Bin 9733 -> 0 bytes .../shorttruthtable/tiles/ParenthesisTile.png | Bin 9733 -> 0 bytes 12 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndOrTile.png delete mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png delete mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png create mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalBiconditionalTile.png delete mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png delete mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png delete mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png delete mode 100644 src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 53aecc599..b0791151e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -173,6 +173,10 @@ else if (e.getElementID().equals("STTT-UNPL-0001")) { this.symbol = '|'; else if (this.symbol == '|') this.symbol = '^'; + // If it was a conditional/biconditional logical element, by default, change it to an + // and logical element + else if (this.symbol == '>' || this.symbol == '-') + this.symbol = '^'; } // Conditional/Biconditional Element else if (e.getElementID().equals("STTT-UNPL-0003")) { @@ -180,6 +184,10 @@ else if (e.getElementID().equals("STTT-UNPL-0003")) { this.symbol = '-'; else if (this.symbol == '-') this.symbol = '>'; + // If it was an and/or logical element, by default, change it to a conditional + // logical element + else if (this.symbol == '^' || this.symbol == '|') + this.symbol = '>'; } } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java index 77b4e6b2c..ce952b075 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java @@ -4,6 +4,6 @@ public class AndOrElement extends NonPlaceableElement { public AndOrElement() { - super("STTT-UNPL-0001", "And/Or Element", "And/Or logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndTile.png"); + super("STTT-UNPL-0001", "And/Or Element", "And/Or logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndOrTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java index 206ebefe0..274df3f86 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java @@ -4,6 +4,6 @@ public class ConditionalBiconditionalElement extends NonPlaceableElement { public ConditionalBiconditionalElement() { - super("STTT-UNPL-0003", "Conditional/Biconditional Element", "Conditional/Biconditional logical element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png"); + super("STTT-UNPL-0003", "Conditional/Biconditional Element", "Conditional/Biconditional logical element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalBiconditionalTile.png"); } } diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndOrTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/AndOrTile.png new file mode 100644 index 0000000000000000000000000000000000000000..9ea93250297e9bc46769cc2b1df83fa1fdfdf6a6 GIT binary patch literal 442 zcmV;r0Y(0aP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc0Z&OpK~z{r?UFyL zgFq0*CD_J*h2#J^frXyIM#L_cNMRQc3ojrZKu8@@`L9U8KUH$8d9Gxa>^dfS%@ZCQ z_`%Hg&CYyal;H;pqrl_wSOghB29N<{fd3hwC<;`kbX~{luLAhK57+Az^)Pf@hcFCL z&ooU4f`Ij31$Yjj-W+rDqW;`HzdT72ux%Sws}<@~qA23}&1M7V^O@5QhXZ(?$7vq} zP%qDO*lxEIpJEsW*SBrU-cqnTL>s^ZkfWNWv3_ojKn{wUs;Y3m-^V)3GT7~QlbN>x zL_LmUuq=zy2*=}bq7llng!Oto*6(hh0dBV&`Uum=KU>r&Wd3rwpzo+ZfFB~CK-3+_ zf&G5ZX-(5`{VS)_Y24NKJ?g&=AZnCXFHKXC;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!ztVlH?tRQzH-YC71JTw$u`85t7w9`&1}$ zLV%cYr}?eqF8h<$VR6%!zwsxBTwlC4f7m!$wgpLj$gQ#E6_0HAgXs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%DobgWx;0X)yVzK-%nwo4jTZ4_%pffx*;kvrInlOYW0s#dypv*uT3(tYln2M_q zKQM44CV@fmV^Qcd@G2(WgC4-bLLk66_^Q^Z*8dWORf?V=4X$K_vWb?-#)ET?>au&?NbisDLUH z@CyIUrHPrP)!!DY6nIjoerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/BiconditionalTile.png deleted file mode 100644 index 850fbf127f04020fe83c6a4f6db75078967916ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGg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TSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalBiconditionalTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalBiconditionalTile.png new file mode 100644 index 0000000000000000000000000000000000000000..b1af3468e5404cdd1e572bd75ef28884cd900a67 GIT binary patch literal 326 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=G^tAk28_ZrvZC;B8MA$B+p3w|yHqTMa~9buXnba%+p9;P6XK zpRK1Hv2=REV-~#!Oie3T?r8m&Hu%%-sLFNdIV<0jd(*}JzSurXRobj`T6+Nl7ZClK z?ht$Z-oK9HENzJ&zNOo!2^`HpV$-uM2lEXSG8IlI&#iZ{%*^CduID~M-Ia|#lP#+3s{dyoCpnV z+%rk#zopr0F1hR+W-In literal 0 HcmV?d00001 diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ConditionalTile.png deleted file mode 100644 index 850fbf127f04020fe83c6a4f6db75078967916ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{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IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png index 850fbf127f04020fe83c6a4f6db75078967916ea..5f94da22549d67e9f52ab937b55b574668da8863 100644 GIT binary patch delta 555 zcmV+`0@VG5Ov40_BYyw^b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf z5&!@T5&_cPe*6Fc0oX}IK~z{r?Ug;R0YMaoNk|Bh=twmD0+lETg-S%JRZ?itXb_cx zMARw;AsUIoM|_5Vb?!YUcQ?zPowd97#w}LzL^9`{vrl$*W`7*tKlm^Xcsw2-!4|Lu zennulTCwBr@GAn*XcUISAzRbKvcO<4peE^bnyu?$Ss)&dQxl)h2ZzIf&4{ohu;1?? z7z~2f>!n8Ja+%GEuq03@6rfV6KrWY~Mv+K_&51BAaJ$_g5D370K8Mk0M2(zICu}ww zHm`+g0eom8k$-^u{Z2BWP>7o0j^OfIm=d^Nui*FlVKSM>W3^h1nz`L>*zI;tc@d@r zrqe07TrN1D&+^!Exs;kgyWM`ui!ddS&*!1hXsE_hsgx{nxm;9r4#NU??BZ+g_xmbv zM@Rz776ZUNTAc{(9z4) zB=9))cs$gY`%YdlB#=xdq19@!H3>WyVzC%C#(yrOC;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+j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x^KMA}{7rkCXghEQl%)V?JqJq*41rG7z!T{nBn=ML4>${gK)dxh zet3cpi3Ro`c~WRt$W(bX1WX}fA@*99FiSr}k{87^h(WRq+HXe)@*(IFA^LhkyEzyD zfJ$QF!5peDjfvr4A#1o8;C@xC2?4LEuzau(2TLokA)P@2qcl(&FsKoSas&a<69VsM z5Xl%DobgWx;0X)yVzK-%nwo4jTZ4_%pffx*;kvrInlOYW0s#dypv*uT3(tYln2M_q zKQM44CV@fmV^Qcd@G2(WgC4-bLLk66_^Q^Z*8dWORf?V=4X$K_vWb?-#)ET?>au&?NbisDLUH z@CyIUrHPrP)!!DY6nIjoerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/NegationTile.png deleted file mode 100644 index 850fbf127f04020fe83c6a4f6db75078967916ea..0000000000000000000000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iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/OrTile.png deleted file mode 100644 index 850fbf127f04020fe83c6a4f6db75078967916ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlgir~QEfj5%rPW@R z5)lchi0qNbR+8UCz3*G+_dVx#-gAE6|ID0c=6SCBx<1!^eeUbJ&)nCU7_0pz8-?VA zKp@aYGgF)m@C{zQ1o(hYW>C;92(%$B$j*UfgJ*;N7<4klmjq@7`jNmS4uuQ?ae8jr zQ%Yu)MZVp#9TYgf8*hX(%{CU^9J!;+j0A#MNvKa$Jt+njdWBUWjaiz zWF)szlOj%Q_{4l}jLmFyB&I)FG~53;!hrZZEkL$Czq;uQtVmlB%SPO$w|oiQdrz=U z#_+W<87!wdPFDT+xnzIQ+X`==boP_4ix-N5?teH9&*aqxo4?%C6pgASKeUZ2+3BwTuCnh&U9y{~cr{+wr+PhiQw1i)A`kRWnMuo}kS3dKUx1Pvs z+jYeNqkUclcRHmgqe-o((th%VCnur6L~?n!<74B5xFnLBFpM}O_lY?g<*0aFgQ5n$ ztU+qL8mTCpI_mp?G0+mPo@09-bSYVx>!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+HXe)@*(IFA^LhkyEzyD zfJ$QF!5peDjfvr4A#1o8;C@xC2?4LEuzau(2TLokA)P@2qcl(&FsKoSas&a<69VsM z5Xl%DobgWx;0X)yVzK-%nwo4jTZ4_%pffx*;kvrInlOYW0s#dypv*uT3(tYln2M_q zKQM44CV@fmV^Qcd@G2(WgC4-bLLk66_^Q^Z*8dWORf?V=4X$K_vWb?-#)ET?>au&?NbisDLUH z@CyIUrHPrP)!!DY6nIjoerr|$*}rMBDCB?0`fYBjBWvOOIuXG9Z`|Ls|B8K08PKw{ z#Ng{jKp|q*Zs9065rIaLpl~>_6etvo4D}%CAfRXhSyu-JC+O&s z(7!;L(U>eejX+w30>CvW01gqaO(1C@&``8C$^(k>KxskoS~^Im4iT;Gfh6ea=)!b= zfjGdR09lFm{dHEWP(%QV;6c!VBVhz6jD$i#Q3RMa)B^_Kp-~93mbR9*E(s4`gCY_z z#&iZ14=g8ziuWXG`q4bs2385j?6ES#LJ%6Te;mi-oLC3cPB$mf+ysKbFOm!UQw|S9AVn*4vW&e?0vt0$|4gaBt8YOuawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB diff --git a/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png b/src/main/resources/edu/rpi/legup/images/shorttruthtable/tiles/ParenthesisTile.png deleted file mode 100644 index 850fbf127f04020fe83c6a4f6db75078967916ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9733 zcmeHNc{G&m`yaAXmTak)X=KYg%*HS^C}WMXl|9BR3}%Lz(F{qlg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uawub>;H`|p?{7$BpUDwhz%TOP=6Tg{XaVG zrZMZC_VrHtdZ&H8)4twmU+=W9ciPuG?dzTP^-lY5opvR*bO6v!=kwTSf&;CrzOyT@ zBmxpaKT}602qe6D_2L4hWyk_TewLY~5&tm1w1f(eU_#WU)keG-ZjYTq?PM2R90U`o zHORBK8rF|IC|nzhtEmnOH7OP@Do>u?vF)j#7}y{b#Kp}c@Z;u1)ri6_TVDOep)ugE QTOg2`(SBUvUiYy70dQO53jhEB From 817da3bebb515ff019d8b8a331e6c23866fb7c33 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 11 Apr 2023 10:04:37 -0400 Subject: [PATCH 36/54] Fixed a bug where spacer rows could be modified --- .../rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index b0791151e..37a7ec21b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -136,6 +136,10 @@ public ShortTruthTableCell copy() { */ @Override public void setType(Element e, MouseEvent m) { + // Do not allow odd rows to be modified since they are spacer rows + if (this.getLocation().getY() % 2 == 1) + return; + // Red Element if (e.getElementID().equals("STTT-PLAC-0002")) { this.data = ShortTruthTableCellType.FALSE; From 0b938beee0d0d07975096c16dad6d192c51117e3 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 11 Apr 2023 10:38:54 -0400 Subject: [PATCH 37/54] Added statement error checking --- .../edu/rpi/legup/app/GameBoardFacade.java | 24 +++++++++++++++++++ src/main/java/edu/rpi/legup/model/Puzzle.java | 10 ++++++++ .../shorttruthtable/ShortTruthTable.java | 17 +++++++++++++ .../ShortTruthTableImporter.java | 11 +++++++-- src/main/java/edu/rpi/legup/ui/HomePanel.java | 19 ++++++++++++++- .../edu/rpi/legup/ui/PuzzleEditorPanel.java | 1 - 6 files changed, 78 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java index 8c545fc59..50be4d54b 100644 --- a/src/main/java/edu/rpi/legup/app/GameBoardFacade.java +++ b/src/main/java/edu/rpi/legup/app/GameBoardFacade.java @@ -137,6 +137,30 @@ public boolean validateDimensions(String game, int rows, int columns) throws Run } } + /** + * Validates the given text input for the given puzzle + * + * @param game the name of the puzzle + * @param statements an array of statements + * @return true if it is possible to create a board for the given game with the given statements, + * false otherwise + * @throws RuntimeException if any of the input is invalid + */ + public boolean validateTextInput(String game, String[] statements) throws RuntimeException { + String qualifiedClassName = config.getPuzzleClassForName(game); + try { + Class c = Class.forName(qualifiedClassName); + Constructor constructor = c.getConstructor(); + Puzzle puzzle = (Puzzle) constructor.newInstance(); + return puzzle.isValidTextInput(statements); + } + catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException | + InstantiationException e) { + LOGGER.error(e); + throw new RuntimeException("Error validating puzzle text input"); + } + } + /** * Loads an empty puzzle * diff --git a/src/main/java/edu/rpi/legup/model/Puzzle.java b/src/main/java/edu/rpi/legup/model/Puzzle.java index 5139d7654..88a5620d8 100644 --- a/src/main/java/edu/rpi/legup/model/Puzzle.java +++ b/src/main/java/edu/rpi/legup/model/Puzzle.java @@ -204,6 +204,16 @@ public boolean isValidDimensions(int rows, int columns) { return rows > 0 && columns > 0; } + /** + * Checks if the given array of statements is valid text input for the given puzzle + * + * @param statements + * @return + */ + public boolean isValidTextInput(String[] statements) { + return statements.length > 0; + } + /** * Determines if the edu.rpi.legup.puzzle was solves correctly * diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java index 1ee73f076..4849baf40 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java @@ -57,6 +57,23 @@ public boolean isValidDimensions(int rows, int columns) { return true; } + /** + * Determines if the given statements are valid for Short Truth Table + * + * @param statements + * @return true if the statements are valid for Short Truth Table, false otherwise + */ + public boolean isValidTextInput(String[] statements) { + if (statements.length == 0) + return false; + + ShortTruthTableImporter importer = (ShortTruthTableImporter) this.getImporter(); + for (String s : statements) + if (!importer.validGrammar(s)) + return false; + return true; + } + /** * Determines if the current board is a valid state * diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index 5a074982e..1bf216070 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -113,7 +113,7 @@ private int parseAllStatementsAndCells(String[] statementData, return maxStatementLength; } - private boolean validGrammar(String sentence) { + protected boolean validGrammar(String sentence) { int open = 0; int close = 0; char[] valid_characters = new char[]{'^', 'v', '!', '>', '-', '&', '|', '~', '$', '%'}; @@ -315,10 +315,17 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } } + /** + * Creates the board for building using statements + * + * @param statementInput + * @throws InputMismatchException + * @throws IllegalArgumentException + */ public void initializeBoard(String[] statementInput) throws InputMismatchException, IllegalArgumentException { List statementsList = new LinkedList<>(); for (String s : statementInput) - if (s.strip().length() != 0) + if (s.strip().length() > 0) statementsList.add(s); String[] statementData = statementsList.toArray(new String[statementsList.size()]); diff --git a/src/main/java/edu/rpi/legup/ui/HomePanel.java b/src/main/java/edu/rpi/legup/ui/HomePanel.java index 15d4a5418..f6a557ac0 100644 --- a/src/main/java/edu/rpi/legup/ui/HomePanel.java +++ b/src/main/java/edu/rpi/legup/ui/HomePanel.java @@ -708,10 +708,27 @@ public void openEditorWithNewPuzzle(String game, int rows, int columns) throws I this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, rows, columns); } + /** + * Opens the puzzle editor for the specified game with the given statements + * + * @param game a String containing the name of the game + * @param statements an array of statements + */ public void openEditorWithNewPuzzle(String game, String[] statements) { + // Validate the text input + GameBoardFacade facade = GameBoardFacade.getInstance(); + boolean isValidTextInput = facade.validateTextInput(game, statements); + if (!isValidTextInput) { + JOptionPane.showMessageDialog(null, + "The input you entered is invalid. Please double check \n" + + "your statements and try again.", + "ERROR: Invalid Text Input", + JOptionPane.ERROR_MESSAGE); + throw new IllegalArgumentException("ERROR: Invalid dimensions given"); + } + // Set game type on the puzzle editor this.legupUI.displayPanel(2); - // TODO: finish testing this function this.legupUI.getPuzzleEditor().loadPuzzleFromHome(game, statements); } } diff --git a/src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java b/src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java index 96f766624..03d2b1bea 100644 --- a/src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java +++ b/src/main/java/edu/rpi/legup/ui/PuzzleEditorPanel.java @@ -322,7 +322,6 @@ public void loadPuzzleFromHome(String game, int rows, int columns) throws Illega public void loadPuzzleFromHome(String game, String[] statements) { GameBoardFacade facade = GameBoardFacade.getInstance(); try { - // TODO: finish implementing this function and testing this part facade.loadPuzzle(game, statements); } catch (IllegalArgumentException exception) { From ade38196aaf57459915728431372791e9a3ff8d6 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 11 Apr 2023 10:43:32 -0400 Subject: [PATCH 38/54] Fixed formatting --- .../shorttruthtable/ShortTruthTableCell.java | 118 +++++++++++------- .../ShortTruthTableImporter.java | 6 +- 2 files changed, 77 insertions(+), 47 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 37a7ec21b..21a93a273 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -137,61 +137,89 @@ public ShortTruthTableCell copy() { @Override public void setType(Element e, MouseEvent m) { // Do not allow odd rows to be modified since they are spacer rows - if (this.getLocation().getY() % 2 == 1) + if (this.getLocation().getY() % 2 == 1) { return; + } // Red Element if (e.getElementID().equals("STTT-PLAC-0002")) { this.data = ShortTruthTableCellType.FALSE; } // Green Element - else if (e.getElementID().equals("STTT-PLAC-0001")) { - this.data = ShortTruthTableCellType.TRUE; - } - // Unknown Element - else if (e.getElementID().equals("STTT-UNPL-0004")) { - this.data = ShortTruthTableCellType.UNKNOWN; - } - // Argument Element - else if (e.getElementID().equals("STTT-UNPL-0002")) { - // Prevents non-argument symbols from being changed - if (!(this.symbol >= 'A' && this.symbol <= 'Z')) - return; - - if (m.getButton() == MouseEvent.BUTTON1) { - this.symbol += 1; - if (this.symbol > 'Z') { - this.symbol = 'A'; - } + else { + if (e.getElementID().equals("STTT-PLAC-0001")) { + this.data = ShortTruthTableCellType.TRUE; } - else if (m.getButton() == MouseEvent.BUTTON3) { - this.symbol -= 1; - if (this.symbol < 'A') { - this.symbol = 'Z'; + // Unknown Element + else { + if (e.getElementID().equals("STTT-UNPL-0004")) { + this.data = ShortTruthTableCellType.UNKNOWN; + } + // Argument Element + else { + if (e.getElementID().equals("STTT-UNPL-0002")) { + // Prevents non-argument symbols from being changed + if (!(this.symbol >= 'A' && this.symbol <= 'Z')) { + return; + } + + if (m.getButton() == MouseEvent.BUTTON1) { + this.symbol += 1; + if (this.symbol > 'Z') { + this.symbol = 'A'; + } + } + else { + if (m.getButton() == MouseEvent.BUTTON3) { + this.symbol -= 1; + if (this.symbol < 'A') { + this.symbol = 'Z'; + } + } + } + } + // And/Or Element + else { + if (e.getElementID().equals("STTT-UNPL-0001")) { + if (this.symbol == '^') { + this.symbol = '|'; + } + else { + if (this.symbol == '|') { + this.symbol = '^'; + } + // If it was a conditional/biconditional logical element, by default, change it to an + // and logical element + else { + if (this.symbol == '>' || this.symbol == '-') { + this.symbol = '^'; + } + } + } + } + // Conditional/Biconditional Element + else { + if (e.getElementID().equals("STTT-UNPL-0003")) { + if (this.symbol == '>') { + this.symbol = '-'; + } + else { + if (this.symbol == '-') { + this.symbol = '>'; + } + // If it was an and/or logical element, by default, change it to a conditional + // logical element + else { + if (this.symbol == '^' || this.symbol == '|') { + this.symbol = '>'; + } + } + } + } + } + } } } } - // And/Or Element - else if (e.getElementID().equals("STTT-UNPL-0001")) { - if (this.symbol == '^') - this.symbol = '|'; - else if (this.symbol == '|') - this.symbol = '^'; - // If it was a conditional/biconditional logical element, by default, change it to an - // and logical element - else if (this.symbol == '>' || this.symbol == '-') - this.symbol = '^'; - } - // Conditional/Biconditional Element - else if (e.getElementID().equals("STTT-UNPL-0003")) { - if (this.symbol == '>') - this.symbol = '-'; - else if (this.symbol == '-') - this.symbol = '>'; - // If it was an and/or logical element, by default, change it to a conditional - // logical element - else if (this.symbol == '^' || this.symbol == '|') - this.symbol = '>'; - } } } \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index 1bf216070..439e94be7 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -324,9 +324,11 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { */ public void initializeBoard(String[] statementInput) throws InputMismatchException, IllegalArgumentException { List statementsList = new LinkedList<>(); - for (String s : statementInput) - if (s.strip().length() > 0) + for (String s : statementInput) { + if (s.strip().length() > 0) { statementsList.add(s); + } + } String[] statementData = statementsList.toArray(new String[statementsList.size()]); if (statementData.length == 0) { From 08a8ba7a90df61a04d7e483034dbc9543daa9a78 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 11 Apr 2023 14:51:19 -0400 Subject: [PATCH 39/54] Only one logic symbol element needed --- .../shorttruthtable/ShortTruthTableCell.java | 61 +++++++++++-------- .../elements/AndOrElement.java | 9 --- .../elements/ArgumentElement.java | 2 +- .../ConditionalBiconditionalElement.java | 9 --- .../elements/LogicSymbolElement.java | 9 +++ .../elements/UnknownElement.java | 2 +- .../shorttruthtable_elements_reference_sheet | 7 +-- 7 files changed, 48 insertions(+), 51 deletions(-) delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java delete mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java create mode 100644 src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LogicSymbolElement.java diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 21a93a273..3e8ce89a7 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -152,12 +152,12 @@ public void setType(Element e, MouseEvent m) { } // Unknown Element else { - if (e.getElementID().equals("STTT-UNPL-0004")) { + if (e.getElementID().equals("STTT-UNPL-0003")) { this.data = ShortTruthTableCellType.UNKNOWN; } // Argument Element else { - if (e.getElementID().equals("STTT-UNPL-0002")) { + if (e.getElementID().equals("STTT-UNPL-0001")) { // Prevents non-argument symbols from being changed if (!(this.symbol >= 'A' && this.symbol <= 'Z')) { return; @@ -180,38 +180,45 @@ public void setType(Element e, MouseEvent m) { } // And/Or Element else { - if (e.getElementID().equals("STTT-UNPL-0001")) { - if (this.symbol == '^') { - this.symbol = '|'; - } - else { - if (this.symbol == '|') { - this.symbol = '^'; + if (e.getElementID().equals("STTT-UNPL-0002")) { + if (m.getButton() == MouseEvent.BUTTON1) { + if (this.symbol == '^') { + this.symbol = '|'; } - // If it was a conditional/biconditional logical element, by default, change it to an - // and logical element else { - if (this.symbol == '>' || this.symbol == '-') { - this.symbol = '^'; + if (this.symbol == '|') { + this.symbol = '>'; + } + else { + if (this.symbol == '>') { + this.symbol = '-'; + } + else { + if (this.symbol == '-') { + this.symbol = '^'; + } + } } } } - } - // Conditional/Biconditional Element - else { - if (e.getElementID().equals("STTT-UNPL-0003")) { - if (this.symbol == '>') { - this.symbol = '-'; - } - else { - if (this.symbol == '-') { - this.symbol = '>'; + else { + if (m.getButton() == MouseEvent.BUTTON3) { + if (this.symbol == '^') { + this.symbol = '-'; } - // If it was an and/or logical element, by default, change it to a conditional - // logical element else { - if (this.symbol == '^' || this.symbol == '|') { - this.symbol = '>'; + if (this.symbol == '|') { + this.symbol = '^'; + } + else { + if (this.symbol == '>') { + this.symbol = '|'; + } + else { + if (this.symbol == '-') { + this.symbol = '>'; + } + } } } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java deleted file mode 100644 index ce952b075..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/AndOrElement.java +++ /dev/null @@ -1,9 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class AndOrElement extends NonPlaceableElement { - public AndOrElement() { - super("STTT-UNPL-0001", "And/Or Element", "And/Or logical element", "edu/rpi/legup/images/shorttruthtable/tiles/AndOrTile.png"); - } -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java index a34a5803c..9f238a9bf 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ArgumentElement.java @@ -4,6 +4,6 @@ public class ArgumentElement extends NonPlaceableElement { public ArgumentElement() { - super("STTT-UNPL-0002", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png"); + super("STTT-UNPL-0001", "Argument Element", "Argument of logic statement element", "edu/rpi/legup/images/shorttruthtable/tiles/LetterTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java deleted file mode 100644 index 274df3f86..000000000 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/ConditionalBiconditionalElement.java +++ /dev/null @@ -1,9 +0,0 @@ -package edu.rpi.legup.puzzle.shorttruthtable.elements; - -import edu.rpi.legup.model.elements.NonPlaceableElement; - -public class ConditionalBiconditionalElement extends NonPlaceableElement { - public ConditionalBiconditionalElement() { - super("STTT-UNPL-0003", "Conditional/Biconditional Element", "Conditional/Biconditional logical element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalBiconditionalTile.png"); - } -} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LogicSymbolElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LogicSymbolElement.java new file mode 100644 index 000000000..b2adfddef --- /dev/null +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/LogicSymbolElement.java @@ -0,0 +1,9 @@ +package edu.rpi.legup.puzzle.shorttruthtable.elements; + +import edu.rpi.legup.model.elements.NonPlaceableElement; + +public class LogicSymbolElement extends NonPlaceableElement { + public LogicSymbolElement() { + super("STTT-UNPL-0002", "Logic Symbol Element", "Logic symbol element", "edu/rpi/legup/images/shorttruthtable/tiles/ConditionalBiconditionalTile.png"); + } +} diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java index db149ddd5..3b457893d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java @@ -4,6 +4,6 @@ public class UnknownElement extends NonPlaceableElement { public UnknownElement() { - super("STTT-UNPL-0004", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); + super("STTT-UNPL-0003", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet index 2f481712b..040f9e0fc 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet @@ -1,7 +1,6 @@ -STTT-UNPL-0001 : AndOrElement -STTT-UNPL-0002 : ArgumentElement -STTT-UNPL-0003 : ConditionalBiconditionalElement -STTT-UNPL-0004 : UnknownElement +STTT-UNPL-0001 : ArgumentElement +STTT-UNPL-0002 : ConditionalBiconditionalElement +STTT-UNPL-0003 : UnknownElement STTT-PLAC-0001 : GreenElement STTT-PLAC-0002 : RedElement \ No newline at end of file From f47ad8e1aecaa9b6eb5ec4281d15c91851989da2 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 18 Apr 2023 17:12:05 -0400 Subject: [PATCH 40/54] Changed InputMismatchException to UnsupportedOperationException --- src/main/java/edu/rpi/legup/model/PuzzleImporter.java | 2 +- .../edu/rpi/legup/puzzle/battleship/BattleshipImporter.java | 5 ++--- .../java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java | 5 ++--- .../java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java | 5 ++--- .../java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java | 5 ++--- src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java | 5 ++--- .../java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java | 5 ++--- .../puzzle/shorttruthtable/ShortTruthTableImporter.java | 5 ++--- .../rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java | 5 ++--- .../java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java | 5 ++--- .../java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java | 5 ++--- 11 files changed, 21 insertions(+), 31 deletions(-) diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index 59b8e7118..0ce2de840 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -123,7 +123,7 @@ public void initializePuzzle(Node node) throws InvalidFileFormatException { */ public abstract void initializeBoard(Node node) throws InvalidFileFormatException; - public abstract void initializeBoard(String[] statements) throws InputMismatchException, IllegalArgumentException; + public abstract void initializeBoard(String[] statements) throws UnsupportedOperationException, IllegalArgumentException; /** * Creates the proof for building diff --git a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipImporter.java b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipImporter.java index cb68382f3..5076ad9eb 100644 --- a/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/battleship/BattleshipImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class BattleshipImporter extends PuzzleImporter { public BattleshipImporter(Battleship battleShip) { @@ -190,7 +189,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Battleship cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Battleship cannot accept text input"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java b/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java index b04bac266..3cc39e228 100644 --- a/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/fillapix/FillapixImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class FillapixImporter extends PuzzleImporter { public FillapixImporter(Fillapix fillapix) { @@ -101,7 +100,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Fillapix cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Fillapix cannot accept text input"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java b/src/main/java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java index 690d3cf4b..b28dd2f27 100644 --- a/src/main/java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/heyawake/HeyawakeImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class HeyawakeImporter extends PuzzleImporter { @@ -104,7 +103,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Hey Awake cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Hey Awake cannot accept text input"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java b/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java index b38c62424..58fe540a8 100644 --- a/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/lightup/LightUpImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class LightUpImporter extends PuzzleImporter { public LightUpImporter(LightUp lightUp) { @@ -115,7 +114,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Light Up cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Light Up cannot accept text input"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java b/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java index 1c795cd49..d3519bd4d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/masyu/MasyuImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class MasyuImporter extends PuzzleImporter { public MasyuImporter(Masyu masyu) { @@ -103,7 +102,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Masyu cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Masyu cannot accept text input"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java b/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java index bfefd95dd..0a95f59b2 100644 --- a/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/nurikabe/NurikabeImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class NurikabeImporter extends PuzzleImporter { public NurikabeImporter(Nurikabe nurikabe) { @@ -113,7 +112,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Nurikabe cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Nurikabe cannot accept text input"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index 439e94be7..6fe1808d0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -10,7 +10,6 @@ import javax.swing.*; import java.awt.*; import java.util.ArrayList; -import java.util.InputMismatchException; import java.util.LinkedList; import java.util.List; @@ -319,10 +318,10 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { * Creates the board for building using statements * * @param statementInput - * @throws InputMismatchException + * @throws UnsupportedOperationException * @throws IllegalArgumentException */ - public void initializeBoard(String[] statementInput) throws InputMismatchException, IllegalArgumentException { + public void initializeBoard(String[] statementInput) throws UnsupportedOperationException, IllegalArgumentException { List statementsList = new LinkedList<>(); for (String s : statementInput) { if (s.strip().length() > 0) { diff --git a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java index c41b6427c..f663de406 100644 --- a/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/skyscrapers/SkyscrapersImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class SkyscrapersImporter extends PuzzleImporter { public SkyscrapersImporter(Skyscrapers skyscrapers) { @@ -163,7 +162,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Skyscrapers cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Skyscrapers cannot accept text input"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java b/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java index a113c7fc4..4af53b547 100644 --- a/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/sudoku/SudokuImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class SudokuImporter extends PuzzleImporter { public SudokuImporter(Sudoku sudoku) { @@ -125,7 +124,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Sudoku cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Sudoku cannot accept text input"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java index fdd0d6b60..2c03bbccb 100644 --- a/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/treetent/TreeTentImporter.java @@ -7,7 +7,6 @@ import org.w3c.dom.NodeList; import java.awt.*; -import java.util.InputMismatchException; public class TreeTentImporter extends PuzzleImporter { public TreeTentImporter(TreeTent treeTent) { @@ -187,7 +186,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { } @Override - public void initializeBoard(String[] statements) throws InputMismatchException { - throw new InputMismatchException("Tree Tent cannot accept text input"); + public void initializeBoard(String[] statements) throws UnsupportedOperationException { + throw new UnsupportedOperationException("Tree Tent cannot accept text input"); } } From 6ca023b3922179f4a7769a1b4e26dc4e3ab91b83 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 21 Apr 2023 10:22:57 -0400 Subject: [PATCH 41/54] Renamed variables to not be STT specific --- .../edu/rpi/legup/ui/CreatePuzzleDialog.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java index d943e2f82..fa049ab38 100644 --- a/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java +++ b/src/main/java/edu/rpi/legup/ui/CreatePuzzleDialog.java @@ -9,6 +9,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Arrays; +import java.util.Objects; public class CreatePuzzleDialog extends JDialog { private HomePanel homePanel; @@ -21,14 +22,14 @@ public void actionPerformed(ActionEvent e) { JComboBox comboBox = (JComboBox) e.getSource(); String puzzleName = (String) comboBox.getSelectedItem(); if (puzzleName.equals("ShortTruthTable")) { - shortTruthTableStatementsScrollPane.setVisible(true); + textInputScrollPane.setVisible(true); rowsLabel.setVisible(false); rows.setVisible(false); columnsLabel.setVisible(false); columns.setVisible(false); } else { - shortTruthTableStatementsScrollPane.setVisible(false); + textInputScrollPane.setVisible(false); rowsLabel.setVisible(true); rows.setVisible(true); columnsLabel.setVisible(true); @@ -43,8 +44,8 @@ public void actionPerformed(ActionEvent e) { private JLabel columnsLabel; private JTextField columns; - private JTextArea shortTruthTableTextArea; - private JScrollPane shortTruthTableStatementsScrollPane; + private JTextArea textArea; + private JScrollPane textInputScrollPane; private JButton ok = new JButton("Ok"); private ActionListener okButtonListener = new ActionListener() { @@ -57,7 +58,7 @@ public void actionPerformed(ActionEvent ae) { String game = Config.convertDisplayNameToClassName((String) gameBox.getSelectedItem()); // Check if all 3 TextFields are filled - if (game.equals("ShortTruthTable") && shortTruthTableTextArea.getText().equals("")) { + if (game.equals("ShortTruthTable") && textArea.getText().equals("")) { System.out.println("Unfilled fields"); return; } @@ -68,7 +69,7 @@ public void actionPerformed(ActionEvent ae) { try { if (game.equals("ShortTruthTable")) { - homePanel.openEditorWithNewPuzzle("ShortTruthTable", shortTruthTableTextArea.getText().split("\n")); + homePanel.openEditorWithNewPuzzle("ShortTruthTable", textArea.getText().split("\n")); } else { homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(rows.getText()), Integer.valueOf(columns.getText())); @@ -138,23 +139,23 @@ public CreatePuzzleDialog(JFrame parent, HomePanel homePanel) { c.add(rows); c.add(columns); - shortTruthTableTextArea = new JTextArea(); - shortTruthTableStatementsScrollPane = new JScrollPane(shortTruthTableTextArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - shortTruthTableStatementsScrollPane.setBounds(10, 70, this.getWidth() - 30, 50); - c.add(shortTruthTableStatementsScrollPane); + textArea = new JTextArea(); + textInputScrollPane = new JScrollPane(textArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + textInputScrollPane.setBounds(10, 70, this.getWidth() - 30, 50); + c.add(textInputScrollPane); c.add(ok); c.add(cancel); - if (this.gameBox.getSelectedItem().equals("ShortTruthTable")) { - shortTruthTableStatementsScrollPane.setVisible(true); + if (Objects.equals(this.gameBox.getSelectedItem(), "ShortTruthTable")) { + textInputScrollPane.setVisible(true); rowsLabel.setVisible(false); rows.setVisible(false); columnsLabel.setVisible(false); columns.setVisible(false); } else { - shortTruthTableStatementsScrollPane.setVisible(false); + textInputScrollPane.setVisible(false); rowsLabel.setVisible(true); rows.setVisible(true); columnsLabel.setVisible(true); @@ -182,7 +183,7 @@ public void actionPerformed(ActionEvent e) { try { if (game.equals("ShortTruthTable")) { - this.homePanel.openEditorWithNewPuzzle("ShortTruthTable", this.shortTruthTableTextArea.getText().split("\n")); + this.homePanel.openEditorWithNewPuzzle("ShortTruthTable", this.textArea.getText().split("\n")); } else { this.homePanel.openEditorWithNewPuzzle(game, Integer.valueOf(this.rows.getText()), Integer.valueOf(this.columns.getText())); From 8dfa6ef278a2ba5ab50ac3d07ead238c0eb4437d Mon Sep 17 00:00:00 2001 From: Matthew Mosley Date: Fri, 28 Apr 2023 01:04:19 -0400 Subject: [PATCH 42/54] Finding initial issue and starting fix --- .../CannotFillMiddle | 0 .../CannotFillCorners | 13 ---------- .../CannotFillMiddle | 11 --------- .../BlockEnclosed | 13 ---------- .../CompleteBoardBlockEnclosed | 15 ------------ .../CornerBlockEnclosed | 11 --------- .../ManyBlocksEnclosed | 17 ------------- .../BlockEnclosed | 13 ---------- .../CompleteBoardBlockEnclosed | 15 ------------ .../CornerBlockEnclosed | 11 --------- .../ManyBlocksEnclosed | 17 ------------- .../shorttruthtable/ShortTruthTableBoard.java | 24 +++++++++++++++++++ .../ShortTruthTableExporter.java | 3 ++- 13 files changed, 26 insertions(+), 137 deletions(-) delete mode 100644 build/resources/test/puzzles/lightup/rules/BulbsInPathContradictionRule/CannotFillMiddle delete mode 100644 build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillCorners delete mode 100644 build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillMiddle delete mode 100644 build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/BlockEnclosed delete mode 100644 build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CompleteBoardBlockEnclosed delete mode 100644 build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CornerBlockEnclosed delete mode 100644 build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/ManyBlocksEnclosed delete mode 100644 build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/BlockEnclosed delete mode 100644 build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CompleteBoardBlockEnclosed delete mode 100644 build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CornerBlockEnclosed delete mode 100644 build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/ManyBlocksEnclosed diff --git a/build/resources/test/puzzles/lightup/rules/BulbsInPathContradictionRule/CannotFillMiddle b/build/resources/test/puzzles/lightup/rules/BulbsInPathContradictionRule/CannotFillMiddle deleted file mode 100644 index e69de29bb..000000000 diff --git a/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillCorners b/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillCorners deleted file mode 100644 index 38b52f04d..000000000 --- a/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillCorners +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillMiddle b/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillMiddle deleted file mode 100644 index 44086f145..000000000 --- a/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillMiddle +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/BlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/BlockEnclosed deleted file mode 100644 index a57a2473e..000000000 --- a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/BlockEnclosed +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CompleteBoardBlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CompleteBoardBlockEnclosed deleted file mode 100644 index f48d240f0..000000000 --- a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CompleteBoardBlockEnclosed +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CornerBlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CornerBlockEnclosed deleted file mode 100644 index 1a9cd60d9..000000000 --- a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CornerBlockEnclosed +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/ManyBlocksEnclosed b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/ManyBlocksEnclosed deleted file mode 100644 index 32200d831..000000000 --- a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/ManyBlocksEnclosed +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/BlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/BlockEnclosed deleted file mode 100644 index c5760aede..000000000 --- a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/BlockEnclosed +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CompleteBoardBlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CompleteBoardBlockEnclosed deleted file mode 100644 index 88fb0a8f1..000000000 --- a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CompleteBoardBlockEnclosed +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CornerBlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CornerBlockEnclosed deleted file mode 100644 index a9a8dc5a0..000000000 --- a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CornerBlockEnclosed +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/ManyBlocksEnclosed b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/ManyBlocksEnclosed deleted file mode 100644 index e743862eb..000000000 --- a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/ManyBlocksEnclosed +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index d084cd2ff..8a0b6de64 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -1,5 +1,6 @@ package edu.rpi.legup.puzzle.shorttruthtable; +import edu.rpi.legup.model.elements.Element; import edu.rpi.legup.model.gameboard.Board; import edu.rpi.legup.model.gameboard.GridBoard; import edu.rpi.legup.model.gameboard.PuzzleElement; @@ -7,6 +8,7 @@ import edu.rpi.legup.puzzle.shorttruthtable.*; import java.awt.*; +import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -24,6 +26,28 @@ public ShortTruthTableBoard(int width, int height, ShortTruthTableStatement[] st } + @Override + public void setCell(int x, int y, Element e, MouseEvent m) { + System.out.println("Setting Cell"); + if (e != null && y * dimension.width + x >= puzzleElements.size() || x >= dimension.width || + y >= dimension.height || x < 0 || y < 0) { + return; + } + else { + if (e != null) { + puzzleElements.get(y * dimension.width + x).setType(e, m); + for (ShortTruthTableStatement s : statements) { + for (int i = 0; i < s.getLength(); i++) { + if (s.getCell(i).getX() == x && s.getCell(i).getY() == y) { + System.out.println("Setting Statement"); + s.getCell(i).setType(e, m); + //s.getStringRep(). + } + } + } + } + } + } public Set getCellsWithSymbol(char symbol) { Set cells = new HashSet(); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java index bcb744789..4a3f3c269 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java @@ -13,7 +13,7 @@ public ShortTruthTableExporter(ShortTruthTable stt) { @Override protected org.w3c.dom.Element createBoardElement(Document newDocument) { ShortTruthTableBoard board = (ShortTruthTableBoard) puzzle.getTree().getRootNode().getBoard(); - + System.out.println(board.toString()); org.w3c.dom.Element boardElement = newDocument.createElement("board"); org.w3c.dom.Element dataElement = newDocument.createElement("data"); @@ -21,6 +21,7 @@ protected org.w3c.dom.Element createBoardElement(Document newDocument) { ShortTruthTableStatement[] statements = board.getStatements(); for (int i = 0; i < statements.length; i++) { org.w3c.dom.Element statementElement = newDocument.createElement("statement"); + System.out.println(statements[i].toString()); statementElement.setAttribute("representation", statements[i].getStringRep()); statementElement.setAttribute("row_index", String.valueOf(i)); dataElement.appendChild(statementElement); From 12ee63b0b7c6be90c2889554099fc2f3c169615b Mon Sep 17 00:00:00 2001 From: Matthew Mosley Date: Fri, 28 Apr 2023 02:30:12 -0400 Subject: [PATCH 43/54] Issue is statement copying and modifying --- .../shorttruthtable/ShortTruthTableBoard.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index 8a0b6de64..8693f087e 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -36,13 +36,38 @@ public void setCell(int x, int y, Element e, MouseEvent m) { else { if (e != null) { puzzleElements.get(y * dimension.width + x).setType(e, m); + int count = 0; for (ShortTruthTableStatement s : statements) { for (int i = 0; i < s.getLength(); i++) { if (s.getCell(i).getX() == x && s.getCell(i).getY() == y) { System.out.println("Setting Statement"); - s.getCell(i).setType(e, m); + + List cells = new ArrayList(); + for (int c = 0; c < s.getLength(); c++) { + System.out.println(c); + if (i == c) { + ShortTruthTableCell newC = new ShortTruthTableCell(s.getCell(i).getSymbol(), s.getCell(i).getType(), s.getCell(i).getLocation()); + newC.setType(e,m); + cells.add(newC); + } else { + cells.add(s.getCell(c)); + } + } + + + System.out.println(s.getStringRep()); + String newS = s.getStringRep().substring(0, i) + cells.get(i).getSymbol() + s.getStringRep().substring(i + 1); + System.out.println(newS); + //ShortTruthTableStatement parent = s.getParentStatement(); + + ShortTruthTableStatement temp = new ShortTruthTableStatement(newS, cells); + System.out.println(temp.getStringRep()); + statements[count] = temp; + System.out.println(statements[count]); + //s.getCell(i).setType(e, m); //s.getStringRep(). } + count++; } } } From 8d444863c7ea2be933e2b875f1269edf9ceae404 Mon Sep 17 00:00:00 2001 From: Matthew Mosley Date: Fri, 28 Apr 2023 15:12:06 -0400 Subject: [PATCH 44/54] STT exporter now working. Overrode setCell for STTBoard. --- .../shorttruthtable/ShortTruthTableBoard.java | 14 +------------- .../shorttruthtable/ShortTruthTableExporter.java | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index 8693f087e..51e134f1b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -40,35 +40,23 @@ public void setCell(int x, int y, Element e, MouseEvent m) { for (ShortTruthTableStatement s : statements) { for (int i = 0; i < s.getLength(); i++) { if (s.getCell(i).getX() == x && s.getCell(i).getY() == y) { - System.out.println("Setting Statement"); List cells = new ArrayList(); for (int c = 0; c < s.getLength(); c++) { - System.out.println(c); if (i == c) { ShortTruthTableCell newC = new ShortTruthTableCell(s.getCell(i).getSymbol(), s.getCell(i).getType(), s.getCell(i).getLocation()); - newC.setType(e,m); cells.add(newC); } else { cells.add(s.getCell(c)); } } - - System.out.println(s.getStringRep()); String newS = s.getStringRep().substring(0, i) + cells.get(i).getSymbol() + s.getStringRep().substring(i + 1); - System.out.println(newS); - //ShortTruthTableStatement parent = s.getParentStatement(); - ShortTruthTableStatement temp = new ShortTruthTableStatement(newS, cells); - System.out.println(temp.getStringRep()); statements[count] = temp; - System.out.println(statements[count]); - //s.getCell(i).setType(e, m); - //s.getStringRep(). } - count++; } + count++; } } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java index 4a3f3c269..b37a7214c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java @@ -13,7 +13,6 @@ public ShortTruthTableExporter(ShortTruthTable stt) { @Override protected org.w3c.dom.Element createBoardElement(Document newDocument) { ShortTruthTableBoard board = (ShortTruthTableBoard) puzzle.getTree().getRootNode().getBoard(); - System.out.println(board.toString()); org.w3c.dom.Element boardElement = newDocument.createElement("board"); org.w3c.dom.Element dataElement = newDocument.createElement("data"); From 25d2585fc14286cdc0b840e38dacb6cb3b99b393 Mon Sep 17 00:00:00 2001 From: Matthew Mosley Date: Fri, 28 Apr 2023 16:12:15 -0400 Subject: [PATCH 45/54] Added code documentation --- .../puzzle/shorttruthtable/ShortTruthTableBoard.java | 11 ++++++++++- .../shorttruthtable/ShortTruthTableExporter.java | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index 51e134f1b..59066b2b5 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -26,6 +26,12 @@ public ShortTruthTableBoard(int width, int height, ShortTruthTableStatement[] st } + /** + * Sets ShortTruthTable cell at position (x,y) + * @param x position on the x axis + * @param y position on the y axis + * @param e element to set the type of this ShortTruthTable cell to + */ @Override public void setCell(int x, int y, Element e, MouseEvent m) { System.out.println("Setting Cell"); @@ -37,11 +43,12 @@ public void setCell(int x, int y, Element e, MouseEvent m) { if (e != null) { puzzleElements.get(y * dimension.width + x).setType(e, m); int count = 0; + // remakes statement that included original cell to include new cell for (ShortTruthTableStatement s : statements) { for (int i = 0; i < s.getLength(); i++) { if (s.getCell(i).getX() == x && s.getCell(i).getY() == y) { - List cells = new ArrayList(); + // adds new cell to cell list for (int c = 0; c < s.getLength(); c++) { if (i == c) { ShortTruthTableCell newC = new ShortTruthTableCell(s.getCell(i).getSymbol(), s.getCell(i).getType(), s.getCell(i).getLocation()); @@ -51,7 +58,9 @@ public void setCell(int x, int y, Element e, MouseEvent m) { } } + // modifies StringRep String newS = s.getStringRep().substring(0, i) + cells.get(i).getSymbol() + s.getStringRep().substring(i + 1); + // makes modified statement ShortTruthTableStatement temp = new ShortTruthTableStatement(newS, cells); statements[count] = temp; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java index b37a7214c..a8d98f513 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java @@ -20,7 +20,6 @@ protected org.w3c.dom.Element createBoardElement(Document newDocument) { ShortTruthTableStatement[] statements = board.getStatements(); for (int i = 0; i < statements.length; i++) { org.w3c.dom.Element statementElement = newDocument.createElement("statement"); - System.out.println(statements[i].toString()); statementElement.setAttribute("representation", statements[i].getStringRep()); statementElement.setAttribute("row_index", String.valueOf(i)); dataElement.appendChild(statementElement); From 52344ea7e284be02d3a4c074c303e3d863886901 Mon Sep 17 00:00:00 2001 From: Matthew Mosley Date: Fri, 28 Apr 2023 16:26:14 -0400 Subject: [PATCH 46/54] removed testing println() --- .../rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index 59066b2b5..6eb5dd2c4 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -34,7 +34,6 @@ public ShortTruthTableBoard(int width, int height, ShortTruthTableStatement[] st */ @Override public void setCell(int x, int y, Element e, MouseEvent m) { - System.out.println("Setting Cell"); if (e != null && y * dimension.width + x >= puzzleElements.size() || x >= dimension.width || y >= dimension.height || x < 0 || y < 0) { return; From 1d1a562949d04165594b5e00f5e17500560d56bc Mon Sep 17 00:00:00 2001 From: Matthew Mosley Date: Fri, 28 Apr 2023 16:40:41 -0400 Subject: [PATCH 47/54] Gradle fixes --- .../legup/puzzle/shorttruthtable/ShortTruthTable.java | 10 ++++++---- .../puzzle/shorttruthtable/ShortTruthTableBoard.java | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java index 4849baf40..65a9eac97 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java @@ -64,13 +64,15 @@ public boolean isValidDimensions(int rows, int columns) { * @return true if the statements are valid for Short Truth Table, false otherwise */ public boolean isValidTextInput(String[] statements) { - if (statements.length == 0) + if (statements.length == 0) { return false; - + } ShortTruthTableImporter importer = (ShortTruthTableImporter) this.getImporter(); - for (String s : statements) - if (!importer.validGrammar(s)) + for (String s : statements) { + if (!importer.validGrammar(s)) { return false; + } + } return true; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index 6eb5dd2c4..77f1534d1 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -52,7 +52,8 @@ public void setCell(int x, int y, Element e, MouseEvent m) { if (i == c) { ShortTruthTableCell newC = new ShortTruthTableCell(s.getCell(i).getSymbol(), s.getCell(i).getType(), s.getCell(i).getLocation()); cells.add(newC); - } else { + } + else { cells.add(s.getCell(c)); } } From 0285505319b56cf361e603054b84dcd40153f5e0 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 28 Apr 2023 17:21:41 -0400 Subject: [PATCH 48/54] Revert "Merge pull request #545 from MMosley502/puzzle_editor-short_truth_table-file_saving" This reverts commit 2e82547896a7fb3e52ec27634cd8938ef299732f, reversing changes made to beb60a2ab67c8317d404f54e52471739f698bf22. --- .../CannotFillMiddle | 0 .../CannotFillCorners | 13 ++++++ .../CannotFillMiddle | 11 +++++ .../BlockEnclosed | 13 ++++++ .../CompleteBoardBlockEnclosed | 15 ++++++ .../CornerBlockEnclosed | 11 +++++ .../ManyBlocksEnclosed | 17 +++++++ .../BlockEnclosed | 13 ++++++ .../CompleteBoardBlockEnclosed | 15 ++++++ .../CornerBlockEnclosed | 11 +++++ .../ManyBlocksEnclosed | 17 +++++++ .../shorttruthtable/ShortTruthTable.java | 10 ++-- .../shorttruthtable/ShortTruthTableBoard.java | 46 ------------------- .../ShortTruthTableExporter.java | 1 + 14 files changed, 141 insertions(+), 52 deletions(-) create mode 100644 build/resources/test/puzzles/lightup/rules/BulbsInPathContradictionRule/CannotFillMiddle create mode 100644 build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillCorners create mode 100644 build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillMiddle create mode 100644 build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/BlockEnclosed create mode 100644 build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CompleteBoardBlockEnclosed create mode 100644 build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CornerBlockEnclosed create mode 100644 build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/ManyBlocksEnclosed create mode 100644 build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/BlockEnclosed create mode 100644 build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CompleteBoardBlockEnclosed create mode 100644 build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CornerBlockEnclosed create mode 100644 build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/ManyBlocksEnclosed diff --git a/build/resources/test/puzzles/lightup/rules/BulbsInPathContradictionRule/CannotFillMiddle b/build/resources/test/puzzles/lightup/rules/BulbsInPathContradictionRule/CannotFillMiddle new file mode 100644 index 000000000..e69de29bb diff --git a/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillCorners b/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillCorners new file mode 100644 index 000000000..38b52f04d --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillCorners @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillMiddle b/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillMiddle new file mode 100644 index 000000000..44086f145 --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/CannotLightACellContradictionRule/CannotFillMiddle @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/BlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/BlockEnclosed new file mode 100644 index 000000000..a57a2473e --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/BlockEnclosed @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CompleteBoardBlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CompleteBoardBlockEnclosed new file mode 100644 index 000000000..f48d240f0 --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CompleteBoardBlockEnclosed @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CornerBlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CornerBlockEnclosed new file mode 100644 index 000000000..1a9cd60d9 --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/CornerBlockEnclosed @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/ManyBlocksEnclosed b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/ManyBlocksEnclosed new file mode 100644 index 000000000..32200d831 --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/TooFewBulbsContradictionRule/ManyBlocksEnclosed @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/BlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/BlockEnclosed new file mode 100644 index 000000000..c5760aede --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/BlockEnclosed @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CompleteBoardBlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CompleteBoardBlockEnclosed new file mode 100644 index 000000000..88fb0a8f1 --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CompleteBoardBlockEnclosed @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CornerBlockEnclosed b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CornerBlockEnclosed new file mode 100644 index 000000000..a9a8dc5a0 --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/CornerBlockEnclosed @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/ManyBlocksEnclosed b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/ManyBlocksEnclosed new file mode 100644 index 000000000..e743862eb --- /dev/null +++ b/build/resources/test/puzzles/lightup/rules/TooManyBulbsContradictionRule/ManyBlocksEnclosed @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java index 65a9eac97..4849baf40 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java @@ -64,15 +64,13 @@ public boolean isValidDimensions(int rows, int columns) { * @return true if the statements are valid for Short Truth Table, false otherwise */ public boolean isValidTextInput(String[] statements) { - if (statements.length == 0) { + if (statements.length == 0) return false; - } + ShortTruthTableImporter importer = (ShortTruthTableImporter) this.getImporter(); - for (String s : statements) { - if (!importer.validGrammar(s)) { + for (String s : statements) + if (!importer.validGrammar(s)) return false; - } - } return true; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index 77f1534d1..d084cd2ff 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -1,6 +1,5 @@ package edu.rpi.legup.puzzle.shorttruthtable; -import edu.rpi.legup.model.elements.Element; import edu.rpi.legup.model.gameboard.Board; import edu.rpi.legup.model.gameboard.GridBoard; import edu.rpi.legup.model.gameboard.PuzzleElement; @@ -8,7 +7,6 @@ import edu.rpi.legup.puzzle.shorttruthtable.*; import java.awt.*; -import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -26,50 +24,6 @@ public ShortTruthTableBoard(int width, int height, ShortTruthTableStatement[] st } - /** - * Sets ShortTruthTable cell at position (x,y) - * @param x position on the x axis - * @param y position on the y axis - * @param e element to set the type of this ShortTruthTable cell to - */ - @Override - public void setCell(int x, int y, Element e, MouseEvent m) { - if (e != null && y * dimension.width + x >= puzzleElements.size() || x >= dimension.width || - y >= dimension.height || x < 0 || y < 0) { - return; - } - else { - if (e != null) { - puzzleElements.get(y * dimension.width + x).setType(e, m); - int count = 0; - // remakes statement that included original cell to include new cell - for (ShortTruthTableStatement s : statements) { - for (int i = 0; i < s.getLength(); i++) { - if (s.getCell(i).getX() == x && s.getCell(i).getY() == y) { - List cells = new ArrayList(); - // adds new cell to cell list - for (int c = 0; c < s.getLength(); c++) { - if (i == c) { - ShortTruthTableCell newC = new ShortTruthTableCell(s.getCell(i).getSymbol(), s.getCell(i).getType(), s.getCell(i).getLocation()); - cells.add(newC); - } - else { - cells.add(s.getCell(c)); - } - } - - // modifies StringRep - String newS = s.getStringRep().substring(0, i) + cells.get(i).getSymbol() + s.getStringRep().substring(i + 1); - // makes modified statement - ShortTruthTableStatement temp = new ShortTruthTableStatement(newS, cells); - statements[count] = temp; - } - } - count++; - } - } - } - } public Set getCellsWithSymbol(char symbol) { Set cells = new HashSet(); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java index a8d98f513..bcb744789 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java @@ -13,6 +13,7 @@ public ShortTruthTableExporter(ShortTruthTable stt) { @Override protected org.w3c.dom.Element createBoardElement(Document newDocument) { ShortTruthTableBoard board = (ShortTruthTableBoard) puzzle.getTree().getRootNode().getBoard(); + org.w3c.dom.Element boardElement = newDocument.createElement("board"); org.w3c.dom.Element dataElement = newDocument.createElement("data"); From 2daca5c706e87329295786348f7aa5fd12a43b39 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Tue, 26 Sep 2023 17:03:21 -0400 Subject: [PATCH 49/54] Saving files now works --- .../puzzle/shorttruthtable/ShortTruthTableExporter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java index bcb744789..74749e6a9 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java @@ -2,6 +2,7 @@ import edu.rpi.legup.model.PuzzleExporter; import edu.rpi.legup.model.gameboard.PuzzleElement; +import edu.rpi.legup.puzzle.nurikabe.NurikabeBoard; import org.w3c.dom.Document; public class ShortTruthTableExporter extends PuzzleExporter { @@ -12,7 +13,11 @@ public ShortTruthTableExporter(ShortTruthTable stt) { @Override protected org.w3c.dom.Element createBoardElement(Document newDocument) { - ShortTruthTableBoard board = (ShortTruthTableBoard) puzzle.getTree().getRootNode().getBoard(); + ShortTruthTableBoard board; + if (puzzle.getTree() != null) + board = (ShortTruthTableBoard) puzzle.getTree().getRootNode().getBoard(); + else + board = (ShortTruthTableBoard) puzzle.getBoardView().getBoard(); org.w3c.dom.Element boardElement = newDocument.createElement("board"); From 866fc8cad857e712bee9a9ce513aebf0d40b4974 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 29 Sep 2023 16:26:52 -0400 Subject: [PATCH 50/54] Fixed the blank element to be categorized as a placeable element --- .../legup/puzzle/shorttruthtable/ShortTruthTableCell.java | 2 +- .../puzzle/shorttruthtable/elements/UnknownElement.java | 6 +++--- .../elements/shorttruthtable_elements_reference_sheet | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 3e8ce89a7..59b5f4272 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -152,7 +152,7 @@ public void setType(Element e, MouseEvent m) { } // Unknown Element else { - if (e.getElementID().equals("STTT-UNPL-0003")) { + if (e.getElementID().equals("STTT-PLAC-0003")) { this.data = ShortTruthTableCellType.UNKNOWN; } // Argument Element diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java index 3b457893d..9a9ab8b84 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/UnknownElement.java @@ -1,9 +1,9 @@ package edu.rpi.legup.puzzle.shorttruthtable.elements; -import edu.rpi.legup.model.elements.NonPlaceableElement; +import edu.rpi.legup.model.elements.PlaceableElement; -public class UnknownElement extends NonPlaceableElement { +public class UnknownElement extends PlaceableElement { public UnknownElement() { - super("STTT-UNPL-0003", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); + super("STTT-PLAC-0003", "Unknown Element", "A blank tile", "edu/rpi/legup/images/shorttruthtable/tiles/UnknownTile.png"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet index 040f9e0fc..471631553 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/elements/shorttruthtable_elements_reference_sheet @@ -1,6 +1,6 @@ STTT-UNPL-0001 : ArgumentElement STTT-UNPL-0002 : ConditionalBiconditionalElement -STTT-UNPL-0003 : UnknownElement STTT-PLAC-0001 : GreenElement -STTT-PLAC-0002 : RedElement \ No newline at end of file +STTT-PLAC-0002 : RedElement +STTT-PLAC-0003 : UnknownElement \ No newline at end of file From a52b9313f87d0ca68ea3dd652a94591f3de5a186 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 29 Sep 2023 16:42:01 -0400 Subject: [PATCH 51/54] Fixed a bug where file wouldn't save due to batch grader updates --- src/main/java/edu/rpi/legup/model/Puzzle.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/edu/rpi/legup/model/Puzzle.java b/src/main/java/edu/rpi/legup/model/Puzzle.java index 9467afc5b..38b0d8e6b 100644 --- a/src/main/java/edu/rpi/legup/model/Puzzle.java +++ b/src/main/java/edu/rpi/legup/model/Puzzle.java @@ -220,6 +220,9 @@ public boolean isValidTextInput(String[] statements) { * @return true if the board was solved correctly, false otherwise */ public boolean isPuzzleComplete() { + if (tree == null) + return false; + boolean isComplete = tree.isValid(); if (isComplete) { for (TreeElement leaf : tree.getLeafTreeElements()) { From d40bb5a4b4bfb330076f24a36549fed17f30b4cc Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 29 Sep 2023 16:57:40 -0400 Subject: [PATCH 52/54] Reformatted code in STT --- .../shorttruthtable/ShortTruthTableBoard.java | 3 +-- .../shorttruthtable/ShortTruthTableCell.java | 24 +++++++------------ .../ShortTruthTableCellFactory.java | 6 ++--- .../ShortTruthTableCellType.java | 1 + .../ShortTruthTableController.java | 6 ++--- .../ShortTruthTableImporter.java | 9 +++---- .../ShortTruthTableStatement.java | 18 +++++--------- 7 files changed, 23 insertions(+), 44 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index e5011182a..a8707c657 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -63,8 +63,7 @@ public ShortTruthTableBoard copy() { for (int c = 0; c < this.dimension.width; c++) { if (r % 2 == 0 && c < statementsCopy[r / 2].getLength()) { boardCopy.setCell(c, r, statementsCopy[r / 2].getCell(c)); - } - else { + } else { boardCopy.setCell(c, r, getCell(c, r).copy()); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 59b5f4272..2bc2fe29b 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -168,8 +168,7 @@ public void setType(Element e, MouseEvent m) { if (this.symbol > 'Z') { this.symbol = 'A'; } - } - else { + } else { if (m.getButton() == MouseEvent.BUTTON3) { this.symbol -= 1; if (this.symbol < 'A') { @@ -184,37 +183,30 @@ public void setType(Element e, MouseEvent m) { if (m.getButton() == MouseEvent.BUTTON1) { if (this.symbol == '^') { this.symbol = '|'; - } - else { + } else { if (this.symbol == '|') { this.symbol = '>'; - } - else { + } else { if (this.symbol == '>') { this.symbol = '-'; - } - else { + } else { if (this.symbol == '-') { this.symbol = '^'; } } } } - } - else { + } else { if (m.getButton() == MouseEvent.BUTTON3) { if (this.symbol == '^') { this.symbol = '-'; - } - else { + } else { if (this.symbol == '|') { this.symbol = '^'; - } - else { + } else { if (this.symbol == '>') { this.symbol = '|'; - } - else { + } else { if (this.symbol == '-') { this.symbol = '>'; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellFactory.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellFactory.java index 99d626447..182047369 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellFactory.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellFactory.java @@ -41,11 +41,9 @@ public ShortTruthTableCell importCell(Node node, Board board) throws InvalidFile return cell; - } - catch (NumberFormatException e) { + } catch (NumberFormatException e) { throw new InvalidFileFormatException("nurikabe Factory: unknown value where integer expected"); - } - catch (NullPointerException e) { + } catch (NullPointerException e) { throw new InvalidFileFormatException("nurikabe Factory: could not find attribute(s)"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellType.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellType.java index c01fe74d8..c997faf5f 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellType.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellType.java @@ -26,6 +26,7 @@ public static ShortTruthTableCellType valueOf(int cellType) { /** * Gets the char value of a cell, Used for debugging + * * @param type cell type input * @return true if value is 1, false if value is 0, ? if value is -1, or blank otherwise */ diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java index bddde44a5..2850282e7 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java @@ -18,12 +18,10 @@ public void changeCell(MouseEvent e, PuzzleElement data) { if (e.getButton() == MouseEvent.BUTTON1) { if (e.isControlDown()) { this.boardView.getSelectionPopupMenu().show(boardView, this.boardView.getCanvas().getX() + e.getX(), this.boardView.getCanvas().getY() + e.getY()); - } - else { + } else { cell.cycleTypeForward(); } - } - else { + } else { if (e.getButton() == MouseEvent.BUTTON3) { cell.cycleTypeBackward(); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index 84d04fb45..194941d17 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -155,8 +155,7 @@ protected boolean validGrammar(String sentence) { } } } - } - else { + } else { if (i != sentence.length() - 1) { if (Character.isLetter(sentence.charAt(i + 1))) { System.out.println("Invalid next character"); @@ -195,8 +194,7 @@ private ShortTruthTableBoard generateBoard(List> allCe if (y % 2 == 0 && x < statements.get(statementIndex).getLength()) { cell = allCells.get(statementIndex).get(x); System.out.println("Importer: check cell statement ref: " + cell.getStatementReference()); - } - else { + } else { //if it is not a valid cell space, add a NOT_IN_PLAY cell cell = new ShortTruthTableCell(' ', ShortTruthTableCellType.NOT_IN_PLAY, new Point(x, y)); cell.setModifiable(false); @@ -308,8 +306,7 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { puzzle.setCurrentBoard(sttBoard); - } - catch (NumberFormatException e) { + } catch (NumberFormatException e) { throw new InvalidFileFormatException("short truth table Importer: unknown value where integer expected"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java index e40a10cf0..38df74b97 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java @@ -61,15 +61,13 @@ private ShortTruthTableStatement(String statement, ShortTruthTableStatement pare //construct sub-statements if necessary if (left.length() > 0) { leftStatement = new ShortTruthTableStatement(left, this, leftCells); - } - else { + } else { leftStatement = null; } if (right.length() > 0) { rightStatement = new ShortTruthTableStatement(right, this, rightCells); - } - else { + } else { rightStatement = null; } @@ -90,8 +88,7 @@ static String removeParens(String statement) { char c = statement.charAt(i); if (c == '(') { openParenCount++; - } - else { + } else { if (c == ')') openParenCount--; } @@ -123,8 +120,7 @@ int parse(String statement) { //keep track of the open parens if (c == '(') { openParenCount++; - } - else { + } else { if (c == ')') { openParenCount--; } @@ -159,8 +155,7 @@ static void removeParens(List cells) { char c = cells.get(i).getSymbol(); if (c == '(') { openParenCount++; - } - else { + } else { if (c == ')') openParenCount--; } @@ -300,8 +295,7 @@ public ShortTruthTableStatement replace(int column, ShortTruthTableCell cell) { for (ShortTruthTableCell c : cells) { if (c.getX() == column) { cellsCopy.add(cell); - } - else { + } else { cellsCopy.add(c); } } From 53358b50400d875dca4bd92716c73e3345915e73 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 29 Sep 2023 17:06:18 -0400 Subject: [PATCH 53/54] Reformatted code again --- .../shorttruthtable/ShortTruthTable.java | 9 ++++--- .../shorttruthtable/ShortTruthTableBoard.java | 3 ++- .../shorttruthtable/ShortTruthTableCell.java | 24 ++++++++++++------- .../ShortTruthTableCellFactory.java | 6 +++-- .../ShortTruthTableController.java | 6 +++-- .../ShortTruthTableExporter.java | 6 +++-- .../ShortTruthTableImporter.java | 9 ++++--- .../ShortTruthTableStatement.java | 18 +++++++++----- 8 files changed, 54 insertions(+), 27 deletions(-) diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java index 4849baf40..e8f9ffc0d 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTable.java @@ -64,13 +64,16 @@ public boolean isValidDimensions(int rows, int columns) { * @return true if the statements are valid for Short Truth Table, false otherwise */ public boolean isValidTextInput(String[] statements) { - if (statements.length == 0) + if (statements.length == 0) { return false; + } ShortTruthTableImporter importer = (ShortTruthTableImporter) this.getImporter(); - for (String s : statements) - if (!importer.validGrammar(s)) + for (String s : statements) { + if (!importer.validGrammar(s)) { return false; + } + } return true; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java index a8707c657..e5011182a 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableBoard.java @@ -63,7 +63,8 @@ public ShortTruthTableBoard copy() { for (int c = 0; c < this.dimension.width; c++) { if (r % 2 == 0 && c < statementsCopy[r / 2].getLength()) { boardCopy.setCell(c, r, statementsCopy[r / 2].getCell(c)); - } else { + } + else { boardCopy.setCell(c, r, getCell(c, r).copy()); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java index 2bc2fe29b..59b5f4272 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCell.java @@ -168,7 +168,8 @@ public void setType(Element e, MouseEvent m) { if (this.symbol > 'Z') { this.symbol = 'A'; } - } else { + } + else { if (m.getButton() == MouseEvent.BUTTON3) { this.symbol -= 1; if (this.symbol < 'A') { @@ -183,30 +184,37 @@ public void setType(Element e, MouseEvent m) { if (m.getButton() == MouseEvent.BUTTON1) { if (this.symbol == '^') { this.symbol = '|'; - } else { + } + else { if (this.symbol == '|') { this.symbol = '>'; - } else { + } + else { if (this.symbol == '>') { this.symbol = '-'; - } else { + } + else { if (this.symbol == '-') { this.symbol = '^'; } } } } - } else { + } + else { if (m.getButton() == MouseEvent.BUTTON3) { if (this.symbol == '^') { this.symbol = '-'; - } else { + } + else { if (this.symbol == '|') { this.symbol = '^'; - } else { + } + else { if (this.symbol == '>') { this.symbol = '|'; - } else { + } + else { if (this.symbol == '-') { this.symbol = '>'; } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellFactory.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellFactory.java index 182047369..99d626447 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellFactory.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableCellFactory.java @@ -41,9 +41,11 @@ public ShortTruthTableCell importCell(Node node, Board board) throws InvalidFile return cell; - } catch (NumberFormatException e) { + } + catch (NumberFormatException e) { throw new InvalidFileFormatException("nurikabe Factory: unknown value where integer expected"); - } catch (NullPointerException e) { + } + catch (NullPointerException e) { throw new InvalidFileFormatException("nurikabe Factory: could not find attribute(s)"); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java index 2850282e7..bddde44a5 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableController.java @@ -18,10 +18,12 @@ public void changeCell(MouseEvent e, PuzzleElement data) { if (e.getButton() == MouseEvent.BUTTON1) { if (e.isControlDown()) { this.boardView.getSelectionPopupMenu().show(boardView, this.boardView.getCanvas().getX() + e.getX(), this.boardView.getCanvas().getY() + e.getY()); - } else { + } + else { cell.cycleTypeForward(); } - } else { + } + else { if (e.getButton() == MouseEvent.BUTTON3) { cell.cycleTypeBackward(); } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java index 74749e6a9..9d6553c7c 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableExporter.java @@ -14,10 +14,12 @@ public ShortTruthTableExporter(ShortTruthTable stt) { @Override protected org.w3c.dom.Element createBoardElement(Document newDocument) { ShortTruthTableBoard board; - if (puzzle.getTree() != null) + if (puzzle.getTree() != null) { board = (ShortTruthTableBoard) puzzle.getTree().getRootNode().getBoard(); - else + } + else { board = (ShortTruthTableBoard) puzzle.getBoardView().getBoard(); + } org.w3c.dom.Element boardElement = newDocument.createElement("board"); diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java index 194941d17..84d04fb45 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableImporter.java @@ -155,7 +155,8 @@ protected boolean validGrammar(String sentence) { } } } - } else { + } + else { if (i != sentence.length() - 1) { if (Character.isLetter(sentence.charAt(i + 1))) { System.out.println("Invalid next character"); @@ -194,7 +195,8 @@ private ShortTruthTableBoard generateBoard(List> allCe if (y % 2 == 0 && x < statements.get(statementIndex).getLength()) { cell = allCells.get(statementIndex).get(x); System.out.println("Importer: check cell statement ref: " + cell.getStatementReference()); - } else { + } + else { //if it is not a valid cell space, add a NOT_IN_PLAY cell cell = new ShortTruthTableCell(' ', ShortTruthTableCellType.NOT_IN_PLAY, new Point(x, y)); cell.setModifiable(false); @@ -306,7 +308,8 @@ public void initializeBoard(Node node) throws InvalidFileFormatException { puzzle.setCurrentBoard(sttBoard); - } catch (NumberFormatException e) { + } + catch (NumberFormatException e) { throw new InvalidFileFormatException("short truth table Importer: unknown value where integer expected"); } } diff --git a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java index 38df74b97..e40a10cf0 100644 --- a/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java +++ b/src/main/java/edu/rpi/legup/puzzle/shorttruthtable/ShortTruthTableStatement.java @@ -61,13 +61,15 @@ private ShortTruthTableStatement(String statement, ShortTruthTableStatement pare //construct sub-statements if necessary if (left.length() > 0) { leftStatement = new ShortTruthTableStatement(left, this, leftCells); - } else { + } + else { leftStatement = null; } if (right.length() > 0) { rightStatement = new ShortTruthTableStatement(right, this, rightCells); - } else { + } + else { rightStatement = null; } @@ -88,7 +90,8 @@ static String removeParens(String statement) { char c = statement.charAt(i); if (c == '(') { openParenCount++; - } else { + } + else { if (c == ')') openParenCount--; } @@ -120,7 +123,8 @@ int parse(String statement) { //keep track of the open parens if (c == '(') { openParenCount++; - } else { + } + else { if (c == ')') { openParenCount--; } @@ -155,7 +159,8 @@ static void removeParens(List cells) { char c = cells.get(i).getSymbol(); if (c == '(') { openParenCount++; - } else { + } + else { if (c == ')') openParenCount--; } @@ -295,7 +300,8 @@ public ShortTruthTableStatement replace(int column, ShortTruthTableCell cell) { for (ShortTruthTableCell c : cells) { if (c.getX() == column) { cellsCopy.add(cell); - } else { + } + else { cellsCopy.add(c); } } From 7cd52bdad1c9102361076cb42a1ffd43a810f4a5 Mon Sep 17 00:00:00 2001 From: charlestian23 Date: Fri, 29 Sep 2023 17:08:40 -0400 Subject: [PATCH 54/54] MORE REFORMATTING Pls like my code CheckStyle --- src/main/java/edu/rpi/legup/model/Puzzle.java | 3 ++- src/main/java/edu/rpi/legup/model/PuzzleExporter.java | 1 + src/main/java/edu/rpi/legup/model/PuzzleImporter.java | 1 + src/main/java/edu/rpi/legup/model/tree/Tree.java | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/rpi/legup/model/Puzzle.java b/src/main/java/edu/rpi/legup/model/Puzzle.java index 38b0d8e6b..18614131b 100644 --- a/src/main/java/edu/rpi/legup/model/Puzzle.java +++ b/src/main/java/edu/rpi/legup/model/Puzzle.java @@ -220,8 +220,9 @@ public boolean isValidTextInput(String[] statements) { * @return true if the board was solved correctly, false otherwise */ public boolean isPuzzleComplete() { - if (tree == null) + if (tree == null) { return false; + } boolean isComplete = tree.isValid(); if (isComplete) { diff --git a/src/main/java/edu/rpi/legup/model/PuzzleExporter.java b/src/main/java/edu/rpi/legup/model/PuzzleExporter.java index a2f662772..613d2ed1c 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleExporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleExporter.java @@ -29,6 +29,7 @@ public abstract class PuzzleExporter { /** * PuzzleExporter Constructor exports the puzzle object to a file + * * @param puzzle puzzle that is to be exported */ public PuzzleExporter(Puzzle puzzle) { diff --git a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java index bf535b4cd..327a92773 100644 --- a/src/main/java/edu/rpi/legup/model/PuzzleImporter.java +++ b/src/main/java/edu/rpi/legup/model/PuzzleImporter.java @@ -21,6 +21,7 @@ public abstract class PuzzleImporter { /** * PuzzleImporter Constructor creates the puzzle object + * * @param puzzle puzzle that is imported */ public PuzzleImporter(Puzzle puzzle) { diff --git a/src/main/java/edu/rpi/legup/model/tree/Tree.java b/src/main/java/edu/rpi/legup/model/tree/Tree.java index 31ef92359..79c0bcece 100644 --- a/src/main/java/edu/rpi/legup/model/tree/Tree.java +++ b/src/main/java/edu/rpi/legup/model/tree/Tree.java @@ -101,6 +101,7 @@ public Set getLeafTreeElements() { /** * Gets a Set of TreeNodes that are leaf nodes from the sub tree rooted at the specified node + * * @param node node that is input * @return Set of TreeNodes that are leaf nodes from the sub tree */