<commit_before>import * as React from 'react';
import ScoreBox from './ScoreBox';

export interface ScoretableProps {
  players: string[],
  inputs: {bids: {[key: string]: number}, tricks: {[key: string]: number}}[]
}

const tdStyle: React.CSSProperties = {
  border: '1px black solid'
}

export default class extends React.Component<ScoretableProps, {}> {
  render() {
    return (
      <table>
        <thead>
          <tr>
            <th style={tdStyle}>Round</th>
            {this.props.players.map(player => <th key={player} style={tdStyle}>{player}</th>)}
          </tr>
        </thead>
        <tbody>
          {[...Array(60 / this.props.players.length).keys()].map(round =>
            <tr key={round}>
              <td style={tdStyle}>{round + 1}</td>
              {this.props.players.map(player =>
                <td key={`${round}-${player}`}>
                  <ScoreBox
                    score={null}
                    bid={(this.props.inputs[round] || {bids: {}}).bids[player]}
                    tricks={(this.props.inputs[round] || {tricks: {}}).tricks[player]} />
                </td>
              )}
            </tr>
          )}
        </tbody>
      </table>
    )
  }<commit_msg>Centre text in score table<commit_after>import * as React from 'react';
import ScoreBox from './ScoreBox';

export interface ScoretableProps {
  players: string[],
  inputs: {bids: {[key: string]: number}, tricks: {[key: string]: number}}[]
}

const tdStyle: React.CSSProperties = {
  border: '1px black solid',
  textAlign: 'center'
}

export default class extends React.Component<ScoretableProps, {}> {
  render() {
    return (
      <table>
        <thead>
          <tr>
            <th style={tdStyle}>Round</th>
            {this.props.players.map(player => <th key={player} style={tdStyle}>{player}</th>)}
          </tr>
        </thead>
        <tbody>
          {[...Array(60 / this.props.players.length).keys()].map(round =>
            <tr key={round}>
              <td style={tdStyle}>{round + 1}</td>
              {this.props.players.map(player =>
                <td key={`${round}-${player}`}>
                  <ScoreBox
                    score={null}
                    bid={(this.props.inputs[round] || {bids: {}}).bids[player]}
                    tricks={(this.props.inputs[round] || {tricks: {}}).tricks[player]} />
                </td>
              )}
            </tr>
          )}
        </tbody>
      </table>
    )
  }
{'fraction_non_alphanumeric': 0.17865804365400162, 'fraction_numerical': 0.0032336297493936943, 'mean_word_length': 1.8285714285714285, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 49, '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': '7032887', 'n_tokens_mistral': 768, 'n_tokens_neox': 748, 'n_words': 148}