<commit_before>
import {Line} from 'rc-progress';
import React from "react"
import store from "../../store"
export default class Healthbar extends React.Component{
  constructor(props){
    super(props)
    this.state = {
      robots: store.getState().gameData.server.robots
    }
  }

  componentDidMount() {
    this.unsubscribe = store.subscribe(() => {
      // console.log("thestorestate is ",store.getState().gameData.server.robots)
      this.setState({robots:store.getState().gameData.server.robots})
    });
  }

  componentWillUnmount(){
    this.unsubscribe()
  }

  checkIndexIsEven = (n) => {
    return ((n % 2) === 0);
  }

  render(){
    // console.log('this is the store right now', store.getState().gameData)
    var robots = Object.keys(this.state.robots)
    const leftStyle = { position: 'absolute', marginTop: '850px' }
    const rightStyle = { position: 'absolute', marginTop: '850px', marginLeft: '1350px' }

    return(
      <div className="score-board">
        <div id="scoreboard">
          {
             robots && robots.map((robotID, idx) => {
              return ((this.state.robots[robotID].health) ?
                  <div className="score" key={robotID} style={(this.checkIndexIsEven(idx + 1)) ? rightStyle : leftStyle }>
                    <div id="user-score"><span className="animated">
                      {this.state.robots[robotID].health * 10}
                    </span></div>
                    <h4>{ this.state.robots[robotID].userName &&
                    this.state.robots[robotID].userName.name}</h4>
                  </div>
                  : <div/>
              )
            })
          }
        </div>
      </div>
    )
}
}

<commit_msg>small change<commit_after>
import {Line} from 'rc-progress';
import React from "react"
import store from "../../store"
export default class Healthbar extends React.Component{
  constructor(props){
    super(props)
    this.state = {
      robots: store.getState().gameData.server.robots
    }
  }

  componentDidMount() {
    this.unsubscribe = store.subscribe(() => {
      // console.log("thestorestate is ",store.getState().gameData.server.robots)
      this.setState({robots:store.getState().gameData.server.robots})
    });
  }

  componentWillUnmount(){
    this.unsubscribe()
  }

  checkIndexIsEven = (n) => {
    return ((n % 2) === 0);
  }

  render(){
    // console.log('this is the store right now', store.getState().gameData)
    var robots = Object.keys(this.state.robots)
    const leftStyle = { position: 'absolute', marginTop: '850px', marginLeft: '100px' }
    const rightStyle = { position: 'absolute', marginTop: '850px', marginLeft: '1350px' }

    return(
      <div className="score-board">
        <div id="scoreboard">
          {
             robots && robots.map((robotID, idx) => {
              return ((this.state.robots[robotID].health) ?
                  <div className="score" key={robotID} style={(this.checkIndexIsEven(idx + 1)) ? rightStyle : leftStyle }>
                    <div id="user-score"><span className="animated">
                      {this.state.robots[robotID].health * 10}
                    </span></div>
                    <h4>{ this.state.robots[robotID].userName &&
                    this.state.robots[robotID].userName.name}</h4>
                  </div>
                  : <div/>
              )
            })
          }
        </div>
      </div>
    )
}
}


{'fraction_non_alphanumeric': 0.155011655011655, 'fraction_numerical': 0.01078088578088578, 'mean_word_length': 2.1152450090744104, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 35, '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': '6253795', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1031, 'n_words': 191}