DylanSp / tic-tac-toe-react

A simple client-side Tic-Tac-Toe app for learning/practicing React.
MIT License
0 stars 1 forks source link

Implement move history, rewinding. #4

Closed DylanSp closed 2 years ago

DylanSp commented 6 years ago

It'd be nice to see a history of the moves made in a game, as well as being able to jump back to previous states.

DylanSp commented 6 years ago

React tutorial on implementing time travel.

DylanSp commented 6 years ago

Visually, I'm thinking of a component on the right side (on landscape screens; not sure about portrait viewports) that displays the game states interspersed with the moves. Design: design for tic tac toe game move history-landscape

DylanSp commented 6 years ago

Interspersing elements: see https://stackoverflow.com/questions/37128624/terse-way-to-intersperse-element-between-all-elements-in-javascript-array. Maybe map game states to even indexes, records of moves to odd indexes?

DylanSp commented 2 years ago

Duplicated by https://github.com/DylanSp/tic-tac-toe-react/issues/45.