Currently, the AttemptToPlay Effect and PlayButtonClicked contain a Context reference. There are a couple of problems with this:
Context is mutable, meaning so are the effects and events.
- The
Context isn't event- or effect-specific, meaning it's just being passed through the update.
A better solution is to make it a member field in the effect handler (effect handlers are intended to be a place for mutable state).
Currently, the
AttemptToPlayEffect andPlayButtonClickedcontain aContextreference. There are a couple of problems with this:Contextis mutable, meaning so are the effects and events.Contextisn't event- or effect-specific, meaning it's just being passed through the update.A better solution is to make it a member field in the effect handler (effect handlers are intended to be a place for mutable state).