Rewrote to avoid using an atom for state, and instead use the more functional path of passing the game-server around