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

Code cleanup #3

Open
canibanoglu opened this issue Nov 27, 2019 · 0 comments
Open

Code cleanup #3

canibanoglu opened this issue Nov 27, 2019 · 0 comments

Comments

@canibanoglu
Copy link
Contributor

I feel like the code is a bit busy and hard to follow at times. Can't really find obvious things to clean though.

  • Status logic can be a bit hard to reason about. Would it be easier to have a private property to make it more explicit? Right now, we return the correct status based on the status of internal timers and emit EventType.StatusChange at correct places. Then again, even if I have a private prop, that logic will still have to live somewhere. The question is which one would be easier to read?
  • Been thinking about the tiny-timer dependency. I'm already ignoring the tick events from the solve Timer and I have a lot of logic making those two timers work together correctly. Could I come up with an implementation that would remove the dependency and also make the code leaner and more elegant?
  • Considering adding a noTick option. I can't really be sure if this would be useful but I can think of implementations that would just hook into the other events and read the time from the property at their leisure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant