import React from "react";
import { connect } from "react-redux";
import ChessBoardSquare from "./chess-board-square";
class ChessBoard extends React.Component {
getBoard() {
const { store } = this.props;
return store.getState().board;
}
renderFiles(rankId) {
const { store } = this.props;
const rank = this.getBoard()[rankId];
return Object.keys(rank).map((fileId) => {
return (