A Tic Tac Toe game implemented using Next.js.
-
Clone the repository:
git clone https://github.com/itzAymvn/tictactoe-online.git
-
Install dependencies:
cd tictactoe-online npm install
-
Setup the environment variable:
- Create a
.env
file in the root directory. - Add a
NEXT_PUBLIC_GAME_SERVER
. - Set the value to the previous varable to the HTTP link of the Socket.io server.
- Create a
-
Start the development server
npm run dev
-
Open your browser and visit http://localhost:3000 to play the Tic Tac Toe game.
- Join a room to play Tic Tac Toe with another player.
- Real-time updates using Socket.io for game state synchronization.
- Notifications (New message & Restart accepted/declined & Player leaves/Joins)
- Chat functionality to communicate with the opponent player.
- Restart the game and keep track of the score.
- Next.js v13.14.9
- Socket.io-client v4.7.1
- SweetAlert2 v11.7.12
- Toastr v2.1.4
- TailwindCSS v3.3.2
This project is licensed under the MIT License.