Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library contracts #42

Open
1 of 11 tasks
johnameyer opened this issue Dec 18, 2020 · 1 comment
Open
1 of 11 tasks

Library contracts #42

johnameyer opened this issue Dec 18, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@johnameyer
Copy link
Owner

johnameyer commented Dec 18, 2020

As the library has generally settled and common usages known, we should consider the higher form of the library as we look towards a 1.0 release. (This is a high level issue and doesn't contain anything specifically actionable, actionable tasks will be linked)

Things to consider:

  • Do the StateTransformer and ResponseValidator classes need to be exported? Would there ever be a case these would be overriden?
  • Can we wrap more common functionality/boiler-plate into a class?
  • Can we add a test to make sure everything is exported and proper?
  • Can we add hooks to the driver class to support open/close principal?
  • Can we decide how to handle the higher level abstractions and common functionality of the game like names and chat?
  • Can we clean up the ideas of sync vs async handlers and the queues?
  • Can we make the handler <> intermediary <> presenter nicer and fallback if operations are not supported?
  • Can we add a built-in package lookup/import by game type?
  • Can we avoid including the web presenter/remove dependencies on console libraries?
  • Can we break out the state from being passed in the handler methods?
    • Nope, but we can change a protocol so that it is only sent before a change.
  • Can we make the game state iterator FSMs less verbose, more declarative? Redux-esque architecture perhaps?
@johnameyer johnameyer changed the title New Library Refactor Library contracts Dec 18, 2020
@johnameyer johnameyer added the enhancement New feature or request label Dec 18, 2020
@johnameyer johnameyer added this to To do in @cards-ts/core via automation Dec 18, 2020
@johnameyer
Copy link
Owner Author

Current implementation thoughts:

  • New generic class called GameManager in core which contains the common functionality
  • Every package exports an instance of GameManager, and removes the other components from being exported
  • Generally we want the onus of more complicated functionality to be on the less-implemented components, e.g. creating a new presenter, handler, or new game should be as simple as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant