<commit_before>const React = require('react');
import Bar from './bar';
import Timer from './timer';

class Race extends React.Component {
  constructor (){
    super();
    this.state= {
      game:{}
    }
  }
  
  componentDidMount() {    
    socket.on('update:game', this._updateGame.bind(this));
    socket.on('winner', this._winner.bind(this));
    socket.on('completed', this._completed.bind(this));
    socket.on('getGame', this._updateGame.bind(this));
    socket.emit('getGame', {});
  }
  _winner(data) {
    console.log(data.winner + ' WON!');
  }
  _completed(){
    console.log(data.completed + 'Completed the game!!!!!!!!!!!');
  }  
  _updateGame(data) {
    console.log('current game');
    console.log(data);
    //mounting error happens here
    this.setState({game:data});
    this.props.saveGame(this.state.game);
  }


  render (){
    return (
      <div className='race'>
      {/*<Timer/>*/}
      <div className='grass-wrap'>
        <div className='grass'></div>
      </div>
      <div className='race-path'></div>      
      {this.state.game.player && <div className='race-path-wrap'><div className='finishLine-wrap'><div className='finishLine'></div></div>
            {this.state.game.player.map((user, i) => {
              return (
                <div key={i} className={'frog frog' + (i+1) + ' path' +(user.progress * 20)}>                
                </div>
              );
            })}</div>
          }
      </div>
    )
  }
}

module.exports = Race<commit_msg>(fix) Remove test console logs<commit_after>const React = require('react');
import Bar from './bar';
import Timer from './timer';

class Race extends React.Component {
  constructor (){
    super();
    this.state= {
      game:{}
    }
  }

  componentDidMount() {
    socket.on('update:game', this._updateGame.bind(this));
    socket.on('winner', this._winner.bind(this));
    socket.on('completed', this._completed.bind(this));
    socket.on('getGame', this._updateGame.bind(this));
    socket.emit('getGame', {});
  }
  _winner(data) {
    console.log(data.winner + ' WON!');
  }
  _completed(){
    console.log(data.completed + 'Completed the game!!!!!!!!!!!');
  }
  _updateGame(data) {
    //mounting error happens here
    this.setState({game:data});
    this.props.saveGame(this.state.game);
  }


  render (){
    return (
      <div className='race'>
      {/*<Timer/>*/}
      <div className='grass-wrap'>
        <div className='grass'></div>
      </div>
      <div className='race-path'></div>
      {this.state.game.player && <div className='race-path-wrap'><div className='finishLine-wrap'><div className='finishLine'></div></div>
            {this.state.game.player.map((user, i) => {
              return (
                <div key={i} className={'frog frog' + (i+1) + ' path' +(user.progress * 20)}>
                </div>
              );
            })}</div>
          }
      </div>
    )
  }
}

module.exports = Race
{'fraction_non_alphanumeric': 0.19247712639783124, 'fraction_numerical': 0.0020332090816672314, 'mean_word_length': 2.4566744730679155, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 39, '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': '4376341', 'n_tokens_mistral': 978, 'n_tokens_neox': 942, 'n_words': 160}