Tic-Tac-Toe / README.md
hardik-0212's picture
Upload README.md
2ba4232 verified

A newer version of the Gradio SDK is available: 6.13.0

Upgrade
metadata
title: Tic-Tac-Toe
emoji: ๐ŸŽฎ
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false

๐ŸŽฎ Tic-Tac-Toe

A modern Tic-Tac-Toe game built with Python and Gradio featuring beautiful UI and smart AI opponent.

โœจ Features

  • Two Game Modes: Player vs Player and Player vs Computer
  • Smart AI: Strategic computer opponent with win/block logic
  • Beautiful UI: Modern design with animations and color-coded moves
  • Score Tracking: Separate scoring for each game mode

๐ŸŽฎ How to Play

  1. Click "๐Ÿš€ Start Playing"
  2. Choose game mode (Player vs Player or Player vs Computer)
  3. Enter player names (optional)
  4. Click cells to make moves
  5. Get 3 in a row to win!

๐ŸŽฏ Game Controls

  • ๐Ÿ”„ New Game: Reset current game
  • ๐Ÿ  Main Menu: Return to main menu
  • โ† Back: Go to previous screen

๐Ÿ”ง Key Components

  • TicTacToe class: Game logic and AI
  • create_ui(): Gradio interface
  • Smart AI with win/block strategy
  • Separate score tracking per mode

Enjoy the game! ๐ŸŽฎ