Skip to content

Commit

Permalink
Fixed missing flag bug
Browse files Browse the repository at this point in the history
If the <solved/> tag existed but had no boolean element, the xml would not reflect the expected output. Added default behavior for this case
  • Loading branch information
Chase-Grajeda committed Sep 26, 2023
1 parent 912000f commit 7fdc437
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 42 deletions.
28 changes: 14 additions & 14 deletions bin/main/edu/rpi/legup/log4j2.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Logging level
# Root logger option
log4j.rootLogger=DEBUG, stdout, file
# Redirect log messages to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
# Redirect log messages to a log file, support file rolling.
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=Legup.log
log4j.appender.file.MaxFileSize=5MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
# Logging level
# Root logger option
log4j.rootLogger=DEBUG, stdout, file
# Redirect log messages to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
# Redirect log messages to a log file, support file rolling.
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=Legup.log
log4j.appender.file.MaxFileSize=5MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
20 changes: 10 additions & 10 deletions bin/main/edu/rpi/legup/puzzle/skyscrapers/rules/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 statements (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
7. Merge Skyscrapers to dev
8. Add 5 more easy/med puzzles to skyscrapers
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Legup>
<puzzle name="LightUp">
<board width="3" height="3">
<cells>
<cell value="-4" x="0" y="0"/>
<cell value="-4" x="2" y="0"/>
</cells>
</board>
</puzzle>
<Legup>
<puzzle name="LightUp">
<board width="3" height="3">
<cells>
<cell value="-4" x="0" y="0"/>
<cell value="-4" x="2" y="0"/>
</cells>
</board>
</puzzle>
</Legup>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Legup>
<puzzle name="LightUp">
<board width="3" height="3">
<cells>
<cell value="-4" x="0" y="0"/>
<cell value="-4" x="0" y="2"/>
</cells>
</board>
</puzzle>
<Legup>
<puzzle name="LightUp">
<board width="3" height="3">
<cells>
<cell value="-4" x="0" y="0"/>
<cell value="-4" x="0" y="2"/>
</cells>
</board>
</puzzle>
</Legup>
8 changes: 8 additions & 0 deletions src/main/java/edu/rpi/legup/ui/HomePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,14 @@ else if (isSolved.equals("false")) {
throw new RuntimeException(e);
}
}
else {
try {
writer.write("Error");
}
catch (IOException e) {
throw new RuntimeException(e);
}
}
}
// append when is this proof last saved
if (lastSaved != null) {
Expand Down

0 comments on commit 7fdc437

Please sign in to comment.