Skip to content

tanushbhootra576/game

Repository files navigation

Tic Tac Toe Game

A simple, interactive Tic Tac Toe game built using NEXT , JavaScript and CSS. Play with a friend on the same device and enjoy the classic 3x3 grid game!

How It Works

  • Two players take turns placing X and O on a 3x3 grid.
  • The first player to align three symbols in a row, column, or diagonal wins.
  • If all cells are filled without a winner, the game ends in a draw.
  • A "Restart" button lets you reset the game anytime.

Project Structure

your-nextjs-app/
├── .next/
├── node_modules/
├── public/
│   └── favicon.ico
├── src/
│   └── app/
│       ├── components/
│       │   ├── GameBoard.js
│       │   ├── Log.js
│       │   ├── Player.js
│       │   └── WinnerModal.js
│       ├── lib/
│       │   └── helper.js
│       ├── game.css
│       ├── globals.css
│       ├── layout.js
│       └── page.js
├── .gitignore
├── eslint.config.mjs
├── jsconfig.json
├── next.config.js
├── package.json
├── package-lock.json
├── postcss.config.mjs
└── README.md
 

Getting Started

  • Clone the repo
  • Run npm install
  • Run npm run dev to start the app

Features

  • Simple and intuitive interface
  • Playable on desktop and mobile browsers
  • Instant win/draw detection
  • Reset functionality

Built With

  • React
  • JavaScript
  • CSS

Future Improvements

  • Add a single-player mode with AI
  • Add animation and sound effects
  • Track player scores
  • Make it multiplayer over network

Contributing

Feel free to fork this project, make enhancements, and open pull requests!

✨ Developed by Tanush Bhootra

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors