You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is inheritance used where appropriate? Does the type hierarchy make sense?
In CountingGameLevel.js:
publicstep(dt: number): void{}
I wondered why this no-op step method is here. I'm guessing that it's because in NumberPlayGameModel.js, you're expecting all levels to have a step method:
If that's the case, then step should be part of the NumberPlayGameLevel base class API, either as a default no-op implementation, or abstract. Ditto for reset, which should be public in NumberPlayGameLevel.
It seems to me that there are a lot of places where you're using SubitizeGameLevel | CountingGameLevel that could be NumberPlayGameLevel. But you're missing some things that should be in the NumberPlayGameLevel API:
step
reset should be public
??
The text was updated successfully, but these errors were encountered:
@chrisklus and I worked on this together. We weren't able to add the step function in the base class as an abstract without overriding it as a no-op in CountingGameLevel, so we just made it no-op in the base class and deleted it from CountingGameLevel. After that and making reset() public, we were able to use NumberPlayGameLevel as the parameter type everywhere. Closing.
For #84
In CountingGameLevel.js:
I wondered why this no-op
step
method is here. I'm guessing that it's because in NumberPlayGameModel.js, you're expecting all levels to have astep
method:If that's the case, then
step
should be part of the NumberPlayGameLevel base class API, either as a default no-op implementation, or abstract. Ditto forreset
, which should be public in NumberPlayGameLevel.Then I noticed in NumberPlayGameModel.js:
It seems to me that there are a lot of places where you're using
SubitizeGameLevel | CountingGameLevel
that could beNumberPlayGameLevel
. But you're missing some things that should be in the NumberPlayGameLevel API:step
reset
should be publicThe text was updated successfully, but these errors were encountered: