]> git.cworth.org Git - lmno.games/blobdiff - tictactoe/tictactoe.jsx
Change styling to not put game info to the right of the board
[lmno.games] / tictactoe / tictactoe.jsx
index 654d55ee17c45da10c83ab4ecf1b4ed276b719e7..849a6f2a113f6141ceaf1e33927bb10d2bbadd23 100644 (file)
@@ -137,17 +137,6 @@ class Game extends React.Component {
     const current = history[this.state.stepNumber];
     const winner = calculateWinner(current.squares);
 
-    const moves = history.map((step, move) => {
-      const desc = move ?
-        'Go to move #' + move :
-        'Go to game start';
-      return (
-        <li key={move}>
-          <button onClick={() => this.jumpTo(move)}>{desc}</button>
-        </li>
-      );
-    });
-
     let status;
     if (winner) {
       status = "Winner: " + winner;
@@ -157,16 +146,15 @@ class Game extends React.Component {
 
     return (
       <div className="game">
+        <div className="game-info">
+          <div>{status}</div>
+        </div>
         <div className="game-board">
           <Board
             squares={current.squares}
             onClick={i => this.handleClick(i)}
           />
         </div>
-        <div className="game-info">
-          <div>{status}</div>
-          <ol>{moves}</ol>
-        </div>
       </div>
     );
   }