diff --git a/TODO.md b/TODO.md index a5f6b0a..4199152 100644 --- a/TODO.md +++ b/TODO.md @@ -33,15 +33,12 @@ For screenshots: - Use the hasVisited state to announce - add some custom daily puzzles -- consolidate control buttons into hamburger menu (and add share button) +- // todo put screenshots of lexlet and blobble and wordfall ()as webp/compressed images? in MoreGames.js - add link to sponsors? -- rules = use the icons instead of words -- rules = use line-spacing in css instead of multiple br - relocate to new file: - getWordValidityGrids - countingGrid - just rename dispatch params to dispatcher everywhere - put arrayToGrid to common or to word-logic package - piecesOverlapQ should use getGridFromPieces -- // todo put screenshots of lexlet and blobble and wordfall ()as webp/compressed images? in MoreGames.js diff --git a/src/logic/convertRepresentativeStringToGrid.js b/src/logic/convertRepresentativeStringToGrid.js index d665d2b..1993c63 100644 --- a/src/logic/convertRepresentativeStringToGrid.js +++ b/src/logic/convertRepresentativeStringToGrid.js @@ -41,13 +41,13 @@ export function convertRepresentativeStringToGrid(string) { } } - // Error if the list does not form a square grid between 8x8 and 12x12 + // Error if the list does not form a square grid between 8x8 and 14x14 const dimension = Math.sqrt(list.length); if (dimension % 1 !== 0) { throw new Error("Input string does not form a square grid"); } - if (dimension < 8 || dimension > 12) { - throw new Error("Input string must form a grid between 8x8 and 12x12"); + if (dimension < 8 || dimension > 14) { + throw new Error("Input string must form a grid between 8x8 and 14x14"); } // I'm assuming that people won't build custom query strings outside of the UI, diff --git a/src/logic/convertRepresentativeStringToGrid.test.js b/src/logic/convertRepresentativeStringToGrid.test.js index 19aea01..1cc1eb9 100644 --- a/src/logic/convertRepresentativeStringToGrid.test.js +++ b/src/logic/convertRepresentativeStringToGrid.test.js @@ -87,14 +87,14 @@ describe("convertRepresentativeStringToGrid", () => { test("throws an error if the resulting grid is smaller than 8x8", () => { const input = "0AB2EF3"; expect(() => convertRepresentativeStringToGrid(input)).toThrow( - "Input string must form a grid between 8x8 and 12x12", + "Input string must form a grid between 8x8 and 14x14", ); }); - test("throws an error if the resulting grid is larger than 12x12", () => { - const input = "0AB165CD"; + test("throws an error if the resulting grid is larger than 14x14", () => { + const input = "0AB221CD"; expect(() => convertRepresentativeStringToGrid(input)).toThrow( - "Input string must form a grid between 8x8 and 12x12", + "Input string must form a grid between 8x8 and 14x14", ); }); });