content: import React from 'react'
  import { TableCell } from 'material-ui/Table'
  
  export default (
    team,
    numberOfRounds,
    minBreak,
    rank,
    numberOfBreakingTeams,
    sureBreak
  ) => {
    let arr = []
  
    for (let roundIndex = 1; roundIndex <= numberOfRounds; roundIndex++) {
      const text = team[roundIndex] ? team[roundIndex].score : '-'
  
      let color = ''
  
      const roundsRemaining = numberOfRounds - roundIndex
  
      if (
        team[roundIndex] &&
        roundsRemaining + team[roundIndex].score < minBreak
      ) {
        color = 'red i'
      }
  
      if (rank + 1 > numberOfBreakingTeams && roundIndex === numberOfRounds) {
        color = 'red i'
      }
  
      if (rank + 1 <= numberOfBreakingTeams && roundIndex === numberOfRounds) {
        color = 'green b'
      }
  
      if (
        team[roundIndex] &&
        team[roundIndex].score >= sureBreak
      ) {
        color = 'dark-green b'
      }
  
      arr.push(
        <TableCell
          width={50}
          className={color}
          key={roundIndex}
          children={text}
          style={{
            padding: 0,
            textAlign: 'center'
          }}
        />
      )
    }
  
    return arr
  }
  