diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index e67c5a0..b06f86b 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -34,7 +34,8 @@ export default class App extends React.Component { constructor(props: object) { super(props); - this.game = require(`../../constants/1.json`) + const gameId = (Math.trunc(Math.random() * 100) % 2) + 1; + this.game = require(`../../constants/${gameId}.json`) } renderAnswers(): Array { diff --git a/src/components/Board/Board.tsx b/src/components/Board/Board.tsx index 64abe9f..9116cfa 100644 --- a/src/components/Board/Board.tsx +++ b/src/components/Board/Board.tsx @@ -92,7 +92,7 @@ export default class Board extends React.Component { renderCell(s: string, pos: Point): JSX.Element { const size = `${this.props.cellSize}px`; const padding = `${this.props.cellSize / 4}px`; - const visibility = s === " " ? "hidden" : "visible"; + const visibility = s === ' ' ? 'hidden' : 'visible'; return (