Gather data

This commit is contained in:
mike
2026-01-07 02:27:35 +01:00
parent fffebed2af
commit 4593ccdc07
4 changed files with 53 additions and 58 deletions

View File

@@ -22,7 +22,7 @@ public class MainTest {
@Test
public void testGridBasics() {
var grid = new Grid(new byte[3 * 4], 3, 4);
var grid = new Grid(new byte[3 * 4], 4);
// Initialize with #
for (int r = 0; r < 3; r++) {
for (int c = 0; c < 4; c++) {
@@ -61,7 +61,7 @@ public class MainTest {
@Test
public void testGridDeepCopy() {
var grid = new Grid(new byte[2 * 2], 2, 2);
var grid = new Grid(new byte[2 * 2], 2);
grid.setCharAt(0, 0, 'A');
grid.setCharAt(0, 1, 'B');
grid.setCharAt(1, 0, 'C');
@@ -77,7 +77,7 @@ public class MainTest {
@Test
public void testMini() {
var grid = new Grid(new byte[3 * 3], 3, 3);
var grid = new Grid(new byte[3 * 3], 3);
grid.setCharAt(1, 1, '1');
Assertions.assertTrue(grid.isDigitAt(1, 1));
}
@@ -102,22 +102,22 @@ public class MainTest {
// But SwedishGenerator.loadWords(path) is what we have.
// Let's try to load a real one or a small subset if possible.
var dict = new Dict(new Lemma[]{
new Lemma(0, "NU", 1, "NU"),
new Lemma(1, "ET", 2, "ET"),
new Lemma(2, "NUT", 3, "NUT"),
new Lemma(3, "ETE", 4, "ETE"),
new Lemma(4, "IK", 5, "IK"),
new Lemma(5, "IN", 6, "IN"),
new Lemma(6, "AU", 7, "AU"),
new Lemma(7, "JE", 8, "JE"),
new Lemma(8, "AI", 9, "AI"),
new Lemma(9, "NA", 10, "NA"),
new Lemma(10, "AF", 11, "AF"),
new Lemma(11, "AL", 14, "AL"),
new Lemma(12, "EA", 15, "EA"),
new Lemma(13, "AV", 18, "AV"),
new Lemma(14, "IL", 19, "IL"),
new Lemma(15, "EN", 22, "EN")
new Lemma(0, "NU", 1, "NU"),
new Lemma(1, "ET", 2, "ET"),
new Lemma(2, "NUT", 3, "NUT"),
new Lemma(3, "ETE", 4, "ETE"),
new Lemma(4, "IK", 5, "IK"),
new Lemma(5, "IN", 6, "IN"),
new Lemma(6, "AU", 7, "AU"),
new Lemma(7, "JE", 8, "JE"),
new Lemma(8, "AI", 9, "AI"),
new Lemma(9, "NA", 10, "NA"),
new Lemma(10, "AF", 11, "AF"),
new Lemma(11, "AL", 14, "AL"),
new Lemma(12, "EA", 15, "EA"),
new Lemma(13, "AV", 18, "AV"),
new Lemma(14, "IL", 19, "IL"),
new Lemma(15, "EN", 22, "EN")
});
// Act