This project is built from a React tutorial. The tutorial can be found here: https://reactjs.org/tutorial/tutorial.html
The purpose of this tutorial was to demonstrate the basic functionality of react and how it can be used to created a small simple tic, tac, toe game. The tutorial introduces the concepts of state and how this is managed, it extends this futher through the use of a history tool which allows a player to jump back to previous moves.
It was an interesting tutorial to follow and did well in teaching me the basic concepts of React. I enjoyed then building on this and implementing new features. Some features were more challenging then others to implement but it was a fun and enjoyable experience being able to put what I had learnt in to practise.
The work I have done has added additional features to the base example app such as:
- Lists the position a move was made at within the moves list.
- Bolds the currently selected item with in the moves list.
- Uses 2 loops to create the squares for the board instead of hard coding them.
- Includes a toggle button which lets the user sort the moves in ascending or descending order
- When a player wins the squares that make up the winning combination are highlighted in yellow.
- When all squares are filled and neither player wins a message is displayed that the game is a draw.
Deployment
- Clone (gh repo clone mark-angus-git/tictactoe) or download and extract the repo.
- To build the app run "npm run build"
- In the base directory run "serve -s build" to run the server.
- If you don't already have serve, "npm install -g serve" to download and install it
- Once running you can access it via localhost:3000 by default