Skip to content

Commit 302ab7a

Browse files
authored
CON-3827 add unit test instructions to filler (#3151)
* fix(filler): add unit tests * fix(filler): add unit tests
1 parent 02efc82 commit 302ab7a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

subjects/filler/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,15 @@ And his response:
163163
7 2\n
164164
```
165165

166+
### Unit Tests
167+
168+
You must implement unit tests within your `filler` project to ensure your robot's parsing logic and placement strategy are reliable. Specifically, your tests should:
169+
170+
- Verify **Input Parsing** by ensuring the Anfield grid and the incoming pieces are correctly converted into internal data structures from the standard input string.
171+
- Verify **Valid Placement Logic** by testing that a potential coordinate correctly identifies if it has exactly one overlapping cell with existing territory and zero overlaps with the opponent.
172+
- Test **Boundary Conditions** to ensure the robot never attempts to place a piece that extends beyond the rows or columns of the Anfield.
173+
- Verify **Coordinate Output** by ensuring the final calculation is formatted exactly as `X Y\n` as required by the `game_engine`.
174+
166175
### Bonus
167176

168177
- Create a graphic visualizer for this project.

subjects/filler/audit/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@
2424

2525
###### Can you confirm that the student player won at least 4 out of 5 times?
2626

27+
#### Unit Tests
28+
29+
###### Do all tests pass without errors?
30+
31+
###### Are there specific tests for **Input Parsing** (e.g., verifying the robot correctly reads the Anfield dimensions and the piece shape from stdin)?
32+
33+
###### Are there tests for **Placement Validation** (e.g., checking that a move is rejected if it overlaps two of your own cells or one of the opponent's)?
34+
35+
###### Are there tests for **Boundary Detection** to ensure pieces are never placed partially outside the grid?
36+
2737
#### Basic
2838

2939
###### +Does the code obey the [good practices](../../good-practices/README.md)?

0 commit comments

Comments
 (0)