A card game framework and various games in Typescript. The framework allows for bot development and playing card games in the terminal or in a browser.
[ ] Can we make validation more declarative - i.e. type matchers on fields, then high level validation if need be
[ ] Can we nicely clone the whole tree in our generic game state class?
How can grab the state out of every controller without making that completely public (like friend keyword),
requiring controllers to mutate their state to initialize (though maybe we can get away with Object.assigns?),
requiring controllers to implement the clone method,
or having to do some hacky solution grabbing what may become an actual # private variable at some point (this would prevent us from sharing the state with subclasses)
[ ] Can we nicely clone before passing along to handlers so changes don't flow upstream?
As this is currently the problem for can-i-have-that (though there may be other problems)
[x] Can we provide just the controllers to the event handlers and be consistent on naming?
[x] Can we rename our GameState.State enums and use const enums so we can include from core state selections (for subflows)
[ ] Can we sharpen up our event validation the same way we are for states? Length checks, type checks, etc.
[ ] Should we invest in subflows at this stage or save for a minor (semantic bug fix pre-1.0.0)
[x] Add basic name functionality back in
[ ] Potentially implement message-type expectation validation (e.g. at this stage we are expecting only certain events
This may live better as a larger scale task about also clarifying the ordering of events, async ness, etc.
Resolves GH-60
Couple of things currently outstanding: