diff --git a/game-setup-example.html b/game-setup-example.html index d540758b..84b42f6b 100644 --- a/game-setup-example.html +++ b/game-setup-example.html @@ -244,7 +244,8 @@ const amplitude = harmonics[ i ].amplitude; assert && assert( amplitude !== undefined, `harmonic ${order} is missing the amplitude field` ); assert && assert( amplitude >= -MAX_AMPLITUDE && amplitude <= MAX_AMPLITUDE, `harmonic ${order} amplitude is out of range: ${amplitude}` ); - //TODO verify that amplitude has at most 1 decimal place + assert && assert( ( amplitude.toFixed( 0 ) === '' + amplitude ) || ( amplitude.toFixed( 1 ) === '' + amplitude ), + `harmonic ${order} amplitude has more than 1 decimal place: ${amplitude}` ); const amplitudePropertyID = `fourierMakingWaves.waveGameScreen.model.level${level}.answerSeries.harmonics.harmonic${order}.amplitudeProperty`; phetioClient.invoke( amplitudePropertyID, 'setValue', [ amplitude ] ); }