|
|
|
@ -28,6 +28,7 @@ export const getCellDisplayData = ({ |
|
|
|
|
nextGameState: gameState, |
|
|
|
|
isDisabled: true, |
|
|
|
|
text: " ", |
|
|
|
|
className: `square-empty`, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -37,10 +38,12 @@ export const getCellDisplayData = ({ |
|
|
|
|
? gameState.withMove(row, column) |
|
|
|
|
: gameState; |
|
|
|
|
|
|
|
|
|
const text = formatSquareState(squareState); |
|
|
|
|
return { |
|
|
|
|
nextGameState: nextGameState, |
|
|
|
|
isDisabled: nextGameState === gameState, |
|
|
|
|
text: formatSquareState(squareState), |
|
|
|
|
text, |
|
|
|
|
className: `square-${text}`, |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|