phetsims / natural-selection

"Natural Selection" is an educational simulation in HTML5, by PhET Interactive Simulations
GNU General Public License v3.0
3 stars 7 forks source link

Revise IOTypes #330

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

IOTypes have evolved since 1.4 was published. Before 1.5 is published, we need to review and revise IOTypes for this sim.

The sim-specific IOTypes are:

Reference type serialization:

Data type serialization:

Dynamic element serialization involving a PhetioGroup:

Dynamic element serialization with no PhetioGroup (does that even make sense?):

Questions:

  private applyState( stateObject: PhenotypeStateObject ): void {
    this._furAllele = required( Allele.AlleleIO.fromStateObject( stateObject.furAllele ) );
    this._earsAllele = required( Allele.AlleleIO.fromStateObject( stateObject.earsAllele ) );
    this._teethAllele = required( Allele.AlleleIO.fromStateObject( stateObject.teethAllele ) );
  }
pixelzoom commented 1 year ago

Natural Selection is not currently a publication priority, so unassigning.

pixelzoom commented 1 year ago

I reviewed these IOTypes and my questions with @zepumph on 7/25/2023, resulting in the above commits. Tested in the State wrapper, no errors, and manual inspection looks correct.

Closing.