-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BulbsInPathContradictionRuleTest looks good. I added one more function to check for the BlockInHorizontalPath test case. * I think I might have run into a problem on the testing function. I will confirm this problem next time and will write another test case. * I made another puzzle and test case to check what would happen if the cells could actually be lit, meaning there would be no contradiction. The test case passed and so I think CannotLightACellContradictionRule works correctly for all cases. * I made another puzzle and test case to check what would happen if the cells could actually be lit, meaning there would be no contradiction. The test case passed and so I think CannotLightACellContradictionRule works correctly for all cases. --------- Co-authored-by: Chase Grajeda <[email protected]> Co-authored-by: Charles Tian <[email protected]>
- Loading branch information
1 parent
0e2d70b
commit d749c84
Showing
4 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/test/resources/puzzles/lightup/rules/BulbsInPathContradictionRule/BlockInHorizontalPath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Legup> | ||
<puzzle name="LightUp"> | ||
<board width="3" height="3"> | ||
<cells> | ||
<cell value="-4" x="0" y="0"/> | ||
<cell value="-1" x="1" y="0"/> | ||
<cell value="-4" x="2" y="0"/> | ||
</cells> | ||
</board> | ||
</puzzle> | ||
</Legup> |
18 changes: 18 additions & 0 deletions
18
src/test/resources/puzzles/lightup/rules/CannotLightACellContradictionRule/CanLightTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Legup> | ||
<puzzle name="LightUp"> | ||
<board width="5" height="5"> | ||
<cells> | ||
<cell value="-2" x="1" y="0"/> | ||
<cell value="-4" x="2" y="1"/> | ||
<cell value="-4" x="0" y="4"/> | ||
<cell value="-4" x="4" y="2"/> | ||
<cell value="-2" x="1" y="1"/> | ||
<cell value="-1" x="1" y="2"/> | ||
<cell value="-1" x="2" y="3"/> | ||
<cell value="-2" x="1" y="3"/> | ||
<cell value="-3" x="3" y="2"/> | ||
<cell value="-3" x="3" y="3"/> | ||
</cells> | ||
</board> | ||
</puzzle> | ||
</Legup> |