2 player Tic-Tac-Toe React Component bootstrapped on Nextjs Styled Components and CSS Grid layout code style challenge.
Helpers
initialPlayerOptionXorO - choose "x" or "o" as Marker randomly equals3 - (a, b, c) => return a == b && b == c && a != "" handleWinner - check if 3 horiz, vert or diag Markers return false or true. "x" or "o"
Hooks
MarkerList - The area of play for the Tic-Tac-Toe game. Marker - The player and designated symbol on the grid GameWinner - The State switching mechanism for The UI Screen
Buttons
handleClick - - Check if Marker designated
- set MarkerList to Array of null - set Marker initialPlayerOptionXorO
This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Next.js deployment documentation for more details.