A simple Tic-Tac-Toe game using React
This Tic-Tac-Toe game is based off of the tutorial found on the React website.
The extra improvements reccomended at the end of the tutorial are also implemented. This includes:
- Displaying the location for each move in the format (col, row) in the move history list.
- Bolding the currently selected item in the move list.
- Rewriting Board to use two loops to make the squares instead of hardcoding them.
- Adding a toggle button that lets you sort the moves in either ascending or descending order.
- When someone wins, highlighting the three squares that caused the win.
- When no one wins, displaying a message about the result being a draw.
This was created for educational purposes. Feel free to leave any feedback on the project with an issue.
Clone this repository:
git clone https://github.com/tawnyzhao/tic-tac-toe/
In project directory run:
npm start