phetsims / build-a-nucleus

"Build a Nucleus" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 5 forks source link

level "locking" should only happen if there is a particle on the next level #160

Closed zepumph closed 1 year ago

zepumph commented 1 year ago

@marlitas mentioned this screenshot is likely a bug because in order for the second level of neutrons to be "locked" like this, there SHOULD have to be another particle on the third level.

image

zepumph commented 1 year ago

My guess is that the bug has something to do with https://github.com/phetsims/build-a-nucleus/blob/7a181ade24aac13cee91c80a17f0a7902e307f95/js/chart-intro/model/ParticleNucleus.ts#L248, but I don't really understand the energyLevelProperty enough to go on my own.

zepumph commented 1 year ago

We found the bug! It was me, I needed a greater than instead of greater than equals. Sorry folks. While we were here, @Luisav1 and I did a bunch of cleanup for EnergyLevelType, and we are feeling good about this issue. Closing