A full-stack multiplayer Tic Tac Toe game built with React (using Vite).
- Real-time Multiplayer: Play Tic Tac Toe with friends
- Game Validation: Join games with a name and optional avatar.
- Room Management: Create and join game rooms, handle disconnects, and reset games.
- Modern UI: Clean and responsive design using TailwindCSS.
- Frontend: React, JavaScript, Vite, TailwindCSS
- Backend: Node.js, Express, Socket.IO
- Real-time Communication: Socket.IO
- Clone the repository
git clone https://github.com/minhphung152/tic-tac-toe.git- Navigate to the
serverfolder and install dependencies
cd server
npm install- Start the server
node server.js- Navigate to the
clientfolder and install dependencies
cd client
npm install- Start the client application
npm run dev- Open
http://localhost:5173in your browser. - Enter a Room Name, your Name, and optionally an Avatar URL.
- Click Join Game.
- Open the same URL in another browser window or tab, and join using the same room name with a different name/avatar.
- Click on the board to make your moves. The game will display the next turn, and notify when someone wins or if the game is a draw.
- When the game ends, click Reset Game to play again.