Tic Tac Truck
- Digger and Tools are used to differentiate between players instead of 'x' and 'o' markers.
- Players take turns making moves on the 3x3 square grid. play game here: https://sophierosemcdonald.github.io/tic-tac-truck/
The theme of my Tic-Tac-Toe game is construction site and vehicles. I wanted to theme to be something that my son would love and get excited about. I imagine sharing it with him once it's finished
Working out the win logic was way more complex than I first thought. I needed to break everything down into smaller steps.
- Take user input
- Check if the clicked position on the board had already been selected
- Outputting changes to the grid by manipulating DOM elements
- Switching between players & keeping track of each player's move
- Checking for a win or draw after each move
I would like to return to this project and introduce:
- Resetting the player scores
- Switching the start player
- Increase the game board size to be large then 3x3
- Remove alerts and display colour and text for the winning player
- Add other themes