The request
Offline word ladder puzzle app with hints and tests
Read the full request
Build an offline word ladder puzzle app for browsers. Include at least two solvable four-letter puzzles with a small bundled dictionary and no remote assets or API. Show start and target, current path, and clear move feedback. Accept a next word only when it is in the dictionary, has the same length, differs from the current word by exactly one letter, and has not already appeared in the current path. Provide a hint that computes one next step on a shortest remaining path with BFS, plus undo, reset and puzzle selection. Show a win state at the target. Use semantic labelled controls, keyboard access, and responsive layout. Put the move validation and shortest-path logic in a deterministic module with Node built-in tests for valid/invalid moves, no path, hints, undo and win. Provide README with local launch and tests, and executed browser checks for move rejection, hint, undo and completion.
The journey
- Read the requestTurned it into a list of things it would have to prove before calling the work done.
- Did the workPlanned the pieces, built them and checked the result as it went.
- Sent back by the final reviewThe last check did not accept the first result, and said what was missing.
- CorrectedThe missing parts were fixed and the work was checked again.
- Delivered7 files handed over.
The result
- public/app.js2.8 KB
- public/index.html1.6 KB
- public/styles.css2.1 KB
- README.md705 B
- server.js997 B
- test-word-ladder.js1.7 KB
- word-ladder.js3.1 KB