This is my solution for the extra improvements suggested at the end of this awesome Tutorial: Intro to React.
Check the site out at https://mmartinsson.github.io/react-tic-tac-toe/
In case the original page gets changed these were the improvements when I played around with them. They are in order of increasing difficulty:
- Display the location for each move in the format (col, row) in the move history list. Issue #2
- Bold the currently selected item in the move list. Issue #3
- Rewrite Board to use two loops to make the squares instead of hardcoding them. Issue #4
- Add a toggle button that lets you sort the moves in either ascending or descending order. Issue #5
- When someone wins, highlight the three squares that caused the win. Issue #6
- When no one wins, display a message about the result being a draw. Issue #7
I also did some improvements of my own. See the other Issues
To deploy to GitHub pages:
npm run deploy