- Navigate to repo
- Clone locally using
git clone [email protected]:janephilipps/tic-tac-toe.git - Install dependencies using
npm install - Run tests using
npm test - Start your server using
npm start - Navigate to app in browser
- Enjoy!
I used the following technologies: HTML, CSS, React, Jest, and Enzyme. I used create-react-app to generate the scaffolding for this app.
Build a two player tic tac toe app where a game is played by alternating clicks until the game is won by X, O or is a tie.
I added a message that displays which player’s turn it is based on the
number of turns taken. The message also displays whether a player has
won or if there is a tie.
The reset button calls a method _resetBoard() which calls another
method _getInitialState() to reset the board.
I used the vmin unit of measure to make the width, height, and
border of the squares fully responsive.
I have a state within the App that keeps track of the number of boards.
Because each board also has its own state, gameplay across multiple boards can
happen simultaneously without interference.