phetsims / balancing-chemical-equations

"Balancing Chemical Equations" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/balancing-chemical-equations
GNU General Public License v3.0
2 stars 5 forks source link

add query parameter that iterates over all possible equations in game #71

Closed pixelzoom closed 10 years ago

pixelzoom commented 10 years ago

Since selection of equations is random in the game, it would be useful to add a query parameter that allows you to play all of the possible challenges in the game. Otherwise we may miss a layout (or other) problem related to an equation that doesn't get seen in testing. The Java implementation had this feature, but it was not MLL's responsibility to implement it.

pixelzoom commented 10 years ago

I added 'playAll' query parameter. It does the job, and the scoreboard reflects the correct number of total challenges. But there are a some issues that I haven't addressed, and I'm not sure if I should put time into it:

  1. The number of stars on the level-selection buttons does not reflect the total number of challenges for the level. And if it did, the stars would be scaled down so that they are too small to see. (Eg there are 21 possible challenges for level 1.)
  2. If you get a perfect score, or even a correct number of challenges that's greater than the number of stars, things are likely to fail because there are fewer stars than challenges.
pixelzoom commented 10 years ago

vegas.ProgressIndicator (the stars on the level-selection buttons) did some odd things when score > perfectScore, as noted in phetsims/vegas#30. I added an assert, which will indeed fail when running with 'playAll'.

pixelzoom commented 10 years ago

I correct issues with 'playAll' by adding support for per-level number of equations in the game. See https://github.com/phetsims/balancing-chemical-equations/commit/3a02b9962ffb8feff3113ccf49d7d768be3931d2