Word Ladder Games: Compute Shortest Paths at Build Time
Feetle - a small word ladder game does not need a backend for every move. Treat each valid word as a graph node and connect words that differ in exactly one position. Run breadth first search from the target during the build to calculate shortest distances. In the browser, validate moves against the bundled dictionary and compare completed paths with those distances. Rebuild the graph whenever…
We haven't written up this one. Dev.to has the full story — the link below goes straight to it.