<commit_before>import React from 'react';

export default class Point extends React.Component {
  constructor(props) {
    super(props);
    let colorClass;
    if (props.color === 0) {
      colorClass = 'white';
    } else if (props.color === 1) {
      colorClass = 'black';
    } else {
      ;
    }
    this.state = {
      color: colorClass
    }
  }

  render() {
    const { x, y } = this.props;
    return (
      <div className={ this.state.color }>
        <div>{ x }, { y }</div>
      </div>
    )
  }
}<commit_msg>Allow Stones to be added<commit_after>import React from 'react';

export default class Point extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      color: this.getColor(),
    }
    this.setColor = this.setColor.bind(this);
  }

  getColor(color = this.props.color) {
    if (color === 0) {
      return 'white';
    } else if (color === 1) {
      return 'black';
    }
  }

  /* Right now this only adds a white Stone, will eventually
   * need to know about the current User.
  */
  setColor(e) {
    let color = this.props.color > 1 ? 0 : this.props.color;
    this.setState({ color:  this.getColor(color) })
  }

  render() {
    const { x, y } = this.props;
    return (
      <div className={ this.state.color } onClick={ this.setColor }>
        <div>{ x }, { y }</div>
      </div>
    )
  }
}
{'fraction_non_alphanumeric': 0.14985380116959066, 'fraction_numerical': 0.0043859649122807015, 'mean_word_length': 2.191142191142191, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '5752708', 'n_tokens_mistral': 464, 'n_tokens_neox': 453, 'n_words': 120}