Skip to content

osama336/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Tic Tac Toe

A modern, fully responsive Tic Tac Toe game built with React featuring an unbeatable AI powered by the Minimax algorithm.

✨ Features

  • Play as X or O
  • Choose whether you go first or let the computer start
  • Unbeatable AI (Minimax algorithm)
  • Real-time score tracking (Player • Ties • Computer)
  • Clean and modern UI with smooth hover effects
  • Fully responsive design (works perfectly on mobile and desktop)
  • Scoreboard positioned on the right side
  • Play again functionality

🎯 How to Play

  1. Choose your symbol (X or O)
  2. Decide if you want to go first
  3. Click on any empty cell to make your move
  4. Try to get three in a row horizontally, vertically, or diagonally
  5. The computer will play optimally using the Minimax algorithm

🏆 Score System

  • You: Your wins as the selected symbol
  • Ties: Number of drawn games
  • Computer: Computer's wins

Scores are saved during your current session.

🛠️ Technologies Used

  • React (Hooks: useState, useEffect)
  • JavaScript (ES6+)
  • CSS3 (Flexbox, Grid, Modern styling)
  • Minimax Algorithm for AI

📱 Responsive Design

The game automatically adapts to different screen sizes:

  • On desktop: Scoreboard appears on the right side
  • On mobile: Scoreboard moves below the board for better usability

Made with ❤️ using React

Enjoy the game and try to beat the AI! 💪

🚀 Getting Started

# Clone the repository
git clone <your-repo-url>

# Navigate to project folder
cd tic-tac-toe

# Install dependencies
npm install

# Start the development server
npm start

Releases

No releases published

Packages

 
 
 

Contributors