Skip to content

JaivPatel07/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game (PvP & vs AI)

An interactive Tic Tac Toe game built using HTML, CSS, and JavaScript, featuring both Player vs Player and Player vs AI modes.

This project demonstrates core web development concepts such as DOM manipulation, event handling, game state management, and a rule-based game AI implemented using the Minimax algorithm.

Live Demo

https://jaivpatel07.github.io/Tic-Tac-Toe/


How to Run the Project

  1. Clone or download this repository
  2. Ensure all files are in the same directory
  3. Open index.html in any modern web browser
  4. Select a game mode and start playing

Game Modes

Player vs Player (PvP)

  • Two human players
  • Player X always starts first

Player vs AI

  • AI opponent implemented using the Minimax algorithm
  • Classical rule-based game AI (not machine learning)
  • AI always plays optimally, so the best possible result is a draw

Features

  • Player vs Player and Player vs AI modes
  • Rule-based AI using Minimax algorithm
  • Game state tracking and win detection
  • Restart and mode switching functionality
  • Clean and responsive user interface

Learning Outcomes

  • Understanding of JavaScript DOM manipulation
  • Event handling and UI updates
  • Game logic and state management
  • Introduction to classical AI concepts and decision-tree search

Author

Jaiv Patel

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors