<commit_before>import React, { PropTypes } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { DragDropContext as dragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';

import { boardSelector } from 'redux/modules/board';
import { endTurn } from 'redux/modules/yourTurn';
import { drawCard } from 'redux/modules/deck';
import { playCardWithCost } from 'redux/modules/hand';
import { hitFace, attackMinion } from 'redux/modules/minion';
import { Player, PlayerSide, Opponent } from 'components';

export const Board = ({ yourTurn, player, opponent, actions }) => {
  const styles = require('./Board.scss');

  return (
    <div className={styles.Board}>
      <PlayerSide>
        <Opponent {...opponent} opponentsTurn={!yourTurn} actions={actions} />
      </PlayerSide>
      <PlayerSide>
        <Player {...player} yourTurn={yourTurn} actions={actions} />
      </PlayerSide>
      <button onClick={actions.endTurn} disabled={!yourTurn}>End turn (yours)</button>
      <button onClick={actions.endTurn} disabled={yourTurn}>End turn (enemy)</button>
    </div>
  );
};

Board.propTypes = {
  yourTurn: PropTypes.bool.isRequired,
  player: PropTypes.shape({
    name: PropTypes.string.isRequired,
  }),
  opponent: PropTypes.shape({
    name: PropTypes.string.isRequired,
  }),
  actions: PropTypes.shape({
    playCardWithCost: PropTypes.func.isRequired,
    drawCard: PropTypes.func.isRequired,
    hitFace: PropTypes.func.isRequired,
    attackMinion: PropTypes.func.isRequired,
  }),
};

const mapStateToProps = (state) => ({
  yourTurn: state.yourTurn,
  player: Object.assign({}, state.player, {
    board: boardSelector(state, 'player'),
    exhaustedMinionIds: state.player.board.exhaustedMinionIds,<commit_msg>Remove end turn for enemy<commit_after>import React, { PropTypes } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { DragDropContext as dragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';

import { boardSelector } from 'redux/modules/board';
import { endTurn } from 'redux/modules/yourTurn';
import { drawCard } from 'redux/modules/deck';
import { playCardWithCost } from 'redux/modules/hand';
import { hitFace, attackMinion } from 'redux/modules/minion';
import { Player, PlayerSide, Opponent } from 'components';

export const Board = ({ yourTurn, player, opponent, actions }) => {
  const styles = require('./Board.scss');

  return (
    <div className={styles.Board}>
      <PlayerSide>
        <Opponent {...opponent} opponentsTurn={!yourTurn} actions={actions} />
      </PlayerSide>
      <PlayerSide>
        <Player {...player} yourTurn={yourTurn} actions={actions} />
      </PlayerSide>
      <button onClick={actions.endTurn} disabled={!yourTurn}>End turn</button>
    </div>
  );
};

Board.propTypes = {
  yourTurn: PropTypes.bool.isRequired,
  player: PropTypes.shape({
    name: PropTypes.string.isRequired,
  }),
  opponent: PropTypes.shape({
    name: PropTypes.string.isRequired,
  }),
  actions: PropTypes.shape({
    playCardWithCost: PropTypes.func.isRequired,
    drawCard: PropTypes.func.isRequired,
    hitFace: PropTypes.func.isRequired,
    attackMinion: PropTypes.func.isRequired,
  }),
};

const mapStateToProps = (state) => ({
  yourTurn: state.yourTurn,
  player: Object.assign({}, state.player, {
    board: boardSelector(state, 'player'),
    exhaustedMinionIds: state.player.board.exhaustedMinionIds,
{'fraction_non_alphanumeric': 0.14374646293152235, 'fraction_numerical': 0.0011318619128466328, 'mean_word_length': 4.284005979073243, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 29, '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': '6693320', 'n_tokens_mistral': 1070, 'n_tokens_neox': 1091, 'n_words': 237}