Closed Nancy-Salpepi closed 1 year ago
@Luisav1 committed a nice improvement above to make sure that when reconfiguring the nucleus, that we account for the extra spots that may be changing particle values (either spots being "held" for incoming, or it we lose a particle, updating the particle pointers).
It is working great!
We also added an assertion to double check that we never have duplicates (indicating that we messed up the setting of some particle values).
I had two more questions I wanted to make sure were good:
@Nancy-Salpepi can you give this a spin on main please?
This is working very nicely on main!
Test device MacBook Air M1 chip
Operating System 13.5.1
Browser Safari 16.6
Problem description For https://github.com/phetsims/qa/issues/977, if I remove the leftmost neutron (or proton) from a filled second level, the remaining 5 neutrons move to the left, leaving the rightmost spot open. Pressing the Add Neutron button, leads to the neutron first moving to the third level before dropping back down to the rightmost spot in the second level.
This also happens within a level. Steps to reproduce below.
Steps to reproduce Scenario 1:
Scenario 2:
Visuals
https://github.com/phetsims/build-a-nucleus/assets/87318828/26d8e89e-f373-4375-9d36-9515c3e25c28