Skip to content

Commit

Permalink
Adding ThermometerExporter.java and therm_test.xml (#759)
Browse files Browse the repository at this point in the history
* Thermometer Importer Functionality + Thermometer Puzzle Factory (#756) (#1)

* Fixed Short Truth Table case rule bug (#707)

* Revert "Bugfix 549 (#682)"

This reverts commit 5048ee6.

* Case rule test fix (#705)



* Rapid fix for STT case rules

Case rules broke at some point from legacy code or merge conflict. Provided is a quick fix in CaseRule and CaseRule_Generic

* Revert "Revert "Bugfix 549 (#682)"" (#706)

This reverts commit e9fe310.

---------




* Starting work on thermometer class

* Added Vial Class

Added the vial class which will be helpful for checking rules down the line

* Discontinuous Mercury Rule added

Added the Discontinuous Mercury contradiciton rule. Added variables to the ThermometerBoard class to keep track of the numbers on the perimiter of the board as well as accessors/setters for these variables. Rewrote a section of the Vials code to make sure cells are added correctly as well as added some accessor functions.

* Importer written

First draft of the importer written and setData refactored

* small bug fixes

* Added Puzzle Factory and Importer

Refactored a bunch of code so we now (in theory) import correctly

---------

Co-authored-by: ZevCe <157339070+ZevCe@users.noreply.github.com>
Co-authored-by: Charles Tian <46334090+charlestian23@users.noreply.github.com>
Co-authored-by: Chase-Grajeda <chase.grajeda@gmail.com>
Co-authored-by: Chase Grajeda <76405306+Chase-Grajeda@users.noreply.github.com>

* Update ThermometerExporter.java

* Git issues, trying to fix

---------

Co-authored-by: ZevCe <157339070+ZevCe@users.noreply.github.com>
Co-authored-by: Charles Tian <46334090+charlestian23@users.noreply.github.com>
Co-authored-by: Chase-Grajeda <chase.grajeda@gmail.com>
Co-authored-by: Chase Grajeda <76405306+Chase-Grajeda@users.noreply.github.com>
  • Loading branch information
5 people authored Mar 14, 2024
1 parent 31ee7e6 commit 6cb8300
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package edu.rpi.legup.puzzle.thermometer;

public class ThermometerExporter {
}

import java.util.ArrayList;

import edu.rpi.legup.model.PuzzleExporter;
import org.w3c.dom.Document;
import edu.rpi.legup.puzzle.thermometer.elements.Vial;
import edu.rpi.legup.puzzle.thermometer.ThermometerVial;

public class ThermometerExporter extends PuzzleExporter {

Expand All @@ -26,8 +23,8 @@ protected org.w3c.dom.Element createBoardElement(Document newDocument) {

// Creating the XML section for the vials and appending to the board
org.w3c.dom.Element vialsElement = newDocument.createElement("vials");
ArrayList<Vial> vials = board.getVials();
for (Vial vial : vials) {
ArrayList<ThermometerVial> vials = board.getVials();
for (ThermometerVial vial : vials) {
org.w3c.dom.Element vialElement = newDocument.createElement("vial");
// Temp for now, waiting on final implementation of vial
// vialElement.setAttribute("headx", vial.getHeadX());
Expand Down

0 comments on commit 6cb8300

Please sign in to comment.