diff --git a/tutorial/tutorial.md b/tutorial/tutorial.md index 62115e47..1264696a 100644 --- a/tutorial/tutorial.md +++ b/tutorial/tutorial.md @@ -1038,7 +1038,7 @@ Add a method called `jumpTo` to the Game class: } ``` -Then update `stepNumber` when a new move is made by adding `stepNumber: history.length` to the state update in Game's `handleClick`: +Then update `stepNumber` when a new move is made by adding `stepNumber: history.length` to the state update in Game's `handleClick`. We'll also update `handleClick` to be aware of `stepNumber` when reading the current board state so that you can go back in time then click in the board to create a new entry.: ```javascript{2,13} handleClick(i) { @@ -1074,8 +1074,6 @@ Now you can modify Game's `render` to read from that step in the history: If you click any move link now, the board should immediately update to show what the game looked like at that time. -You may also want to update `handleClick` to be aware of `stepNumber` when reading the current board state so that you can go back in time then click in the board to create a new entry. (Hint: It's easiest to `.slice()` off the extra elements from `history` at the very top of `handleClick`.) - ### Wrapping Up Now, you've made a tic-tac-toe game that: