Star Battle Test Suite Docs - Bram-Hub/LEGUP GitHub Wiki
Symbol Key
X - Unknown Cell B - Black Cell S - Star Cell
Individual cells within grids are referenced with (x,y), where x is the column number and y is the row number.
Row indexing begins with 0 at the top, and increases towards the bottom.
Column indexing begins with 0 at the left, and increases towards the right.
Direct Rule Tests
Blackout - STBL-BASC-0001
Columns Within Regions - STBL-BASC-0002
Test Case 1: Single Column One Cell
Test Case 2: Partial Column One Cell
Test Case 3: Partial Column Two Cells
Test Case 4: Two Columns
Test Case 5: Two Columns Star Overlap
Test Case 6: False Columns Within Regions 1
Test Case 7: False Columns Within Regions 2
Test Case 8: False Columns Within Regions 3
Test Case 9: False Columns Within Regions 4
Columns Within Rows - STBL-BASC-0003
Finish With Stars - STBL-BASC-0004
Regions Within Columns - STBL-BASC-0005
Regions Within Rows - STBL-BASC-0006
Rows Within Columns - STBL-BASC-0007
Rows Within Regions - STBL-BASC-0008
Surround Star - STBL-BASC-0009
Test Case 1: Center Star One Tile
1 star
+------+
| X B X |
+------+
| X S X |
+------+
| X X X |
+------+
- Checks if the rule correctly detects surround star when a cell directly adjacent to a star is made black.
Test Case 2: Center Star One Tile Diagonal
1 star
+------+
| B X X |
+------+
| X S X |
+------+
| X X X |
+------+
- Checks if the rule correctly detects surround star when a cell diagonally adjacent to a star is made black.
Test Case 3: Center Star All Tiles
1 star
+------+
| B B B |
+------+
| B S B |
+------+
| B B B |
+------+
- Checks if the rule correctly detects surround star when every cell adjacent to a star is made black.
Test Case 4: Corner Star
1 star
+------+
| S B X |
+------+
| B B X |
+------+
| X X X |
+------+
- Checks if the rule correctly detects surround star when every cell adjacent to a star that is at the corner of the board is made black.
Test Case 5: False Surround Star
1 star
+------+
| S X B |
+------+
| X X X |
+------+
| X X X |
+------+
- Checks that the rule does not erroneously detect surround star at (2,0).
Contradiction Rule Tests
Too Many Stars - STBL-CONT-0001
Too Few Stars - STBL-CONT-0002
Test Case 1: Column
1 star
+----+----+
| B X | X X |
| B X | X X |
+----+----+
| B X | X X |
| B X | X X |
+----+----+
- Checks if the rule correctly detects too few stars in column 0.
Test Case 2: Row
1 star
+----+----+
| B B | B B |
| X S | X X |
+----+----+
| X X | X S |
| X X | X X |
+----+----+
- Checks if the rule correctly detects too few stars in row 0.
Test Case 3: Region
1 star
+----+----+
| B B | X X |
| B B | X S |
+----+----+
| X X | X X |
| X X | S X |
+----+----+
- Checks if the rule correctly detects too few stars in the top left region.
Test Case 4: False Contradiction
1 star
+----+----+
| B S | X B |
| B X | B S |
+----+----+
| S B | B B |
| B B | S B |
+----+----+
- Checks that the rule does not incorrectly detect too few stars.
Test Case 5: Not Enough Space
5 stars
+----+----+
| B S | X B |
| B X | B S |
+----+----+
| S B | B B |
| B B | S B |
+----+----+
- Checks that the rule correctly detects too few stars in every cell.
Clashing Orbit - STBL-CONT-0003
Test Case 1: Directly Adjacent Center
+----+----+
| X X | X X |
| X S | S X |
+----+----+
| X X | X X |
| X X | X X |
+----+----+
- Checks that the rule correctly detects adjacent stars at (1,1) and (2,1)
Test Case 2: Diagonally Adjacent
+----+----+
| X X | X X |
| X S | X X |
+----+----+
| X X | S X |
| X X | X X |
+----+----+
- Checks that the rule correctly detects adjacent stars at (1,1) and (2,2)
Test Case 3: Directly Adjacent Edge
+----+----+
| S S | X X |
| X X | X X |
+----+----+
| X X | X X |
| X X | X X |
+----+----+
- Checks that the rule correctly detects adjacent stars at (0,0) and (1,0)
Test Case 4: False Contradiction
+----+----+
| S X | X X |
| X X | S X |
+----+----+
| S X | X X |
| X X | X X |
+----+----+
- Checks that the rule does not erroneously detect a contradiction