-
Notifications
You must be signed in to change notification settings - Fork 2
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
Game creation form crashes when selecting pyramid variant #163
Comments
Ah this is a weird one, thanks for finding it. I think the root cause is that we construct a game object, in order to get the default config:
However, instantiating PyramidGo requires a width and a height...
By design, the type system is pretty broken around variants/configs/ But for the short term fix, I recommend we separate configs from the game instances, since they don't depend on a constructed object. We could potentially stick it in the
|
I agree, I think it makes sense that the config (default or not) exists before the game object. At the moment its kindof the other way around (for the default config). Edit: maybe the method defaultConfig could be static |
I was thinking that too |
Is there a way we can work around that? |
Ah, I forgot about that. Also there would be another issue:
Then I'd be fine with your suggestion, @benjaminpjones. |
Not sure what exactly causes the error.
Steps to reproduce:
Select pyramid in the variant dropdown in the game creation form -> the form collapses and console shows error "TypeError: t is undefined"
The text was updated successfully, but these errors were encountered: