I'd been learning about the benefits of functional programming
and figured this project could benefit from it. Armed with typescript, fp-ts, and jest,
I went back and retyped my old code using a TDD approach. The experience was therapeutic. At the end I had a solid board management library.
However, I still had the final hurdle of game state management to solve.
While researching I found the
Space Game by
pmnd.rs and its architecture was the just the insight I needed.
It presented an organized means of scaling actions and state management through the use of a store.