<commit_before>// Copyright 2022, University of Colorado Boulder

/**
 * Demo for RewardNode
 *
 * @author <NAME> (PixelZoom, Inc.)
 */

import Bounds2 from '../../../../dot/js/Bounds2.js';
import RewardNode from '../../RewardNode.js';
import stepTimer from '../../../../axon/js/stepTimer.js';

export default function demoRewardNode( layoutBounds: Bounds2 ) {

  const rewardNode = new RewardNode();

  stepTimer.addListener( dt => {
    rewardNode.step( dt );
  } );

  return rewardNode;
}<commit_msg>add time controls to demoRewardNode.ts<commit_after>// Copyright 2022, University of Colorado Boulder

/**
 * Demo for RewardNode
 *
 * @author <NAME> (PixelZoom, Inc.)
 */

import Bounds2 from '../../../../dot/js/Bounds2.js';
import { Node } from '../../../../scenery/js/imports.js';
import RewardNode from '../../RewardNode.js';
import stepTimer from '../../../../axon/js/stepTimer.js';
import BooleanProperty from '../../../../axon/js/BooleanProperty.js';
import TimeControlNode from '../../../../scenery-phet/js/TimeControlNode.js';

export default function demoRewardNode( layoutBounds: Bounds2 ) {

  const rewardNode = new RewardNode();

  const isPlayingProperty = new BooleanProperty( true );

  const timeControls = new TimeControlNode( isPlayingProperty, {
    playPauseStepButtonOptions: {
      stepForwardButtonOptions: {
        listener: () => rewardNode.step( 0.1 )
      }
    },
    centerX: layoutBounds.centerX,
    bottom: layoutBounds.bottom - 20
  } );

  stepTimer.addListener( dt => {
    if ( isPlayingProperty.value ) {
      rewardNode.step( dt );
    }
  } );

  return new Node( {
    children: [ rewardNode, timeControls ]
  } );
}
{'fraction_non_alphanumeric': 0.16916616676664667, 'fraction_numerical': 0.010797840431913617, 'mean_word_length': 2.9432624113475176, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3501766', 'n_tokens_mistral': 524, 'n_tokens_neox': 508, 'n_words': 126}