phetsims / vegas

Reusable game components for PhET simulations.
MIT License
1 stars 4 forks source link

Make gameLevels required for LevelSelectionButtonGroup and GameInfoDialog #122

Closed pixelzoom closed 7 months ago

pixelzoom commented 7 months ago

The gameLevels query parameter is required for any sim that has a Game screen, and uses LevelSelectionButtonGroup or GameInfoDialog. See getGameLevelsSchema.ts and example usage in GLQueryParameters.ts.

To prevent developers from unintentionally omitting gameLevels, those options should be required (not optional) for LevelSelectionButtonGroup and GameInfoDialog.

pixelzoom commented 7 months ago

Done in the above commit. I also added gameLevels to the vegas demo application.

Note that the only sim that does not currently comply is arithmetic. That sim is still written in JavaScript, so the required options are not enforced.

Closing.