Skip to content

A modern, responsive Tic Tac Toe game built with React and Tailwind CSS. Challenge a friend to the classic strategic battle of X's and O's!

Notifications You must be signed in to change notification settings

PSHACKERZ/Tic-Tac-Toe-Ai

Repository files navigation

Modern Tic Tac Toe Game 🎮

A feature-rich, modern implementation of the classic Tic Tac Toe game built with React and Supabase. Challenge friends locally, battle against AI, or compete in real-time online matches!

TicTacToe AI Screenshot


Play Now MIT License Netlify Status

Play the Game Online

Download the App


ScreenShots of Game

Click to view Screenshots

🎯 Key Features

🎮 Game Modes

  • Local Multiplayer: Challenge friends on the same device
  • Online Multiplayer: Real-time matches with players worldwide
  • AI Opponents: Three difficulty levels
    • 🟢 Easy: Perfect for beginners (90% random moves)
    • 🟡 Medium: Challenging but beatable
    • 🔴 Impossible: Unbeatable Minimax AI

🎨 Customization

  • 8 Beautiful Themes:
    • Default (Blue/Purple)
    • Dark Mode
    • Sunset
    • Ocean
    • Forest
    • Galaxy
    • Candy
    • Autumn
  • Audio Settings:
    • 🎵 Toggle Background Music
    • 🔊 Customizable Sound Effects
    • 🔇 Mute Option

🌐 Online Features

  • Real-time Game Updates
  • Private Game Rooms
  • In-game Chat System
  • Disconnect Protection
  • Custom Game Tags
  • Player Profiles

🛠️ Technologies Used

  • React.js
  • Tailwind CSS
  • Supabase (Backend & Real-time)
  • Howler.js (Audio)
  • Lucide React (Icons)

📦 Quick Start

# Clone repository
git clone https://github.com/PSHACKERZ/Tic-Tac-Toe-Ai.git

# Install dependencies
cd Tic-Tac-Toe-Ai
npm install

# Start development server
npm start

🔧 Environment Setup

Create a .env file in the root directory:

REACT_APP_SUPABASE_URL=your_supabase_url
REACT_APP_SUPABASE_ANON_KEY=your_supabase_anon_key

🏗️ Project Structure

src/
├── components/          # Reusable UI components
├── contexts/           # React context providers
├── hooks/              # Custom React hooks
├── lib/               # Utility functions and configs
├── styles/            # CSS and theme definitions
└── pages/             # Main game components

🎮 Game Features

Player vs Player (Local)

  • Classic two-player gameplay
  • Score tracking
  • Theme customization
  • Sound effects

Online Multiplayer

  • Real-time gameplay
  • Private game rooms
  • Chat functionality
  • Custom game tags
  • Disconnect protection

AI Modes

  • Three difficulty levels
  • Smart move prediction
  • Strategic gameplay
  • Minimax algorithm (Impossible mode)

🤝 Contributing

We welcome contributions! See our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add some amazing feature'
  4. Push to the branch
    git push origin feature/amazing-feature
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

👥 Contact & Support


Made with ❤️ by P.S. Hackerz

About

A modern, responsive Tic Tac Toe game built with React and Tailwind CSS. Challenge a friend to the classic strategic battle of X's and O's!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •