<commit_before>import React, { Component, PropTypes } from 'react';
import { CardBack } from 'components';

function arrayByNumber(num) {
  const array = [];
  for (let i = 0; i < num; i++) {
    array.push(undefined);
  }

  return array;
}

export default class OpponentHand extends Component {
  static propTypes = {
    handCount: PropTypes.number.isRequired,
  }

  render() {
    const { handCount } = this.props;
    const styles = require('./../Hand/Hand.scss');
    const cardStyles = require('./../Card/Card.scss');
    const margin = handCount * 25;

    const cardList = arrayByNumber(handCount).map((_, index) => (
      <CardBack key={index} margin={margin} className={cardStyles.CardOpponent} />
    ));

    return (
      <div className={styles.Hand}>
        { cardList }
      </div>
    );
  }
}<commit_msg>Turn OpponentHand into stateless func<commit_after>import React, { PropTypes } from 'react';
import { CardBack } from 'components';

function arrayByNumber(num) {
  const array = [];
  for (let i = 0; i < num; i++) {
    array.push(undefined);
  }

  return array;
}

const OpponentHand = ({ handCount }) => {
  const styles = require('./../Hand/Hand.scss');
  const cardStyles = require('./../Card/Card.scss');
  const margin = handCount * 25;

  const cardList = arrayByNumber(handCount).map((_, index) => (
    <CardBack key={index} margin={margin} className={cardStyles.CardOpponent} />
  ));

  return (
    <div className={styles.Hand}>
      { cardList }
    </div>
  );
};

OpponentHand.propTypes = {
  handCount: PropTypes.number.isRequired,
};

export default OpponentHand;
{'fraction_non_alphanumeric': 0.15714285714285714, 'fraction_numerical': 0.0037267080745341614, 'mean_word_length': 3.296, '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': '6530213', 'n_tokens_mistral': 521, 'n_tokens_neox': 504, 'n_words': 120}