Gather data

This commit is contained in:
mike
2026-01-09 05:51:23 +01:00
parent abef2e2f0b
commit 850fdb4f67
4 changed files with 60 additions and 137 deletions

View File

@@ -21,7 +21,7 @@ public class ExportFormatTest {
var grid = SwedishGenerator.makeEmptyGrid();
// Place a '2' (right) at (0,0)
grid.setByteAt(0, 0, (byte) '2');
grid.setByteAt(0, (byte) '2');
// This creates a slot starting at (0,1)
var clueMap = new HashMap<Integer, Lemma>();
@@ -31,12 +31,12 @@ public class ExportFormatTest {
clueMap.put(key, lemma);
// Manually fill the grid letters for "TEST" at (0,1), (0,2), (0,3), (0,4)
grid.setByteAt(0, 1, (byte) 'T');
grid.setByteAt(0, 2, (byte) 'E');
grid.setByteAt(0, 3, (byte) 'S');
grid.setByteAt(0, 4, (byte) 'T');
// Terminate the slot at (0,5) with another digit to avoid it extending to MAX_WORD_LENGTH
grid.setByteAt(0, 5, (byte) '1');
grid.setByteAt(Grid.offset(0, 1), (byte) 'T');
grid.setByteAt(Grid.offset(0, 2), (byte) 'E');
grid.setByteAt(Grid.offset(0, 3), (byte) 'S');
grid.setByteAt(Grid.offset(0, 4), (byte) 'T');
// Terminate thGrid.offset(e slot at) (0,5) with another digit to avoid it extending to MAX_WORD_LENGTH
grid.setByteAt(Grid.offset(0, 5), (byte) '1');
var fillResult = new FillResult(true, new Gridded(grid), clueMap, null);
var puzzleResult = new PuzzleResult(swe, null, null, fillResult);

View File

@@ -83,12 +83,6 @@ public class MainTest {
@Test
public void testGridBasics() {
var grid = makeEmptyGrid();
// Initialize with #
for (int r = 0; r < 3; r++) {
for (int c = 0; c < 4; c++) {
grid.clear(r, c);
}
}
// Test set/get
grid.setCharAt(0, 0, 'A');