From: Carl Worth Date: Wed, 27 May 2020 04:20:22 +0000 (-0700) Subject: Drop the game history interface. X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=commitdiff_plain;h=d1b224fb4410e5ae5a06a5a8edc707524f1c2b73;hp=9d201384db591cc94d872c4046a2bc67d1c57133 Drop the game history interface. Not that it's bad to let the user go back and forth to see what happened, but the interface here was particularly clunky, (both for being rendered as a list of buttons and also for allowing the user to fire off new moves wen viewing old history state). This commit simply guts the rendering of the "moves" list. It doesn't yet remove the jumpTo code that's now dead. --- diff --git a/tictactoe/tictactoe.jsx b/tictactoe/tictactoe.jsx index 654d55e..934faa8 100644 --- a/tictactoe/tictactoe.jsx +++ b/tictactoe/tictactoe.jsx @@ -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 ( -
  • - -
  • - ); - }); - let status; if (winner) { status = "Winner: " + winner; @@ -165,7 +154,6 @@ class Game extends React.Component {
    {status}
    -
      {moves}
    );