It's probably easier to understand if you review each commit individually. Some changes are just renaming:
type alias Eff a = (a, Cmd Msg)
type alias Upd a = a -> (a, Cmd Msg)
model ! [ cmd ] = (model, cmd)
And I combined the toServer and toMsg information passed down from the parent update functions into one Ctx type (I needed a second GameCtx type because of the way things are set up on the server now with auto-joining games).
The Lens in the first commit is a little harder to understand. I abstracted over the getter and setters so I can handle the errors uniformly.
It's probably easier to understand if you review each commit individually. Some changes are just renaming:
And I combined the
toServer
andtoMsg
information passed down from the parent update functions into oneCtx
type (I needed a secondGameCtx
type because of the way things are set up on the server now with auto-joining games).The
Lens
in the first commit is a little harder to understand. I abstracted over the getter and setters so I can handle the errors uniformly.