Skip to content

Star Battle Test Suite Docs

summerhenson edited this page Jun 21, 2024 · 8 revisions

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

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
+------+
| 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
+------+
| 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
+------+
| 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
+------+
| 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
+------+
| 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 +----+----+
| B X | X X |
| B X | X X |
+----+----+
| B X | X X |
| B X | X X |
+----+----+

Test Case 2: Row +----+----+
| B B | B B |
| X X | X X |
+----+----+
| X X | X X |
| X X | X X |
+----+----+

Test Case 3: Region +----+----+
| X X | X X |
| X X | X X |
+----+----+
| X X | X X |
| X X | X X |
+----+----+

Test Case 4: False Contradiction +----+----+
| X X | X X |
| X X | X X |
+----+----+
| X X | X X |
| X X | X X |
+----+----+

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

Case Rule Tests

Star or Empty - STBL-CASE-0002

Clone this wiki locally