Skip to content

Kalyani2712/PRODIGY_WD_03

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

🕹️ Tic-Tac-Toe Game

Welcome to the Tic-Tac-Toe Game! This is a classic game where you can play against another player or challenge an AI opponent. The game features an interactive user interface and provides a fun way to enjoy a timeless game.

📚 Table of Contents

🌟 Features

  • Player vs. Player Mode: Play against a friend in classic two-player mode.
  • Player vs. AI Mode: Challenge an AI opponent with random moves.
  • Responsive Design: The game interface adjusts seamlessly to various screen sizes.
  • Interactive UI: Enhanced visual effects on buttons and a clean layout.
  • Reset Functionality: Easily restart the game without refreshing the page.
  • Winning and Drawing Logic: Automatically detects wins or draws and displays messages accordingly.

🛠️ Technologies Used

  • HTML
  • CSS
  • JavaScript

📥 Installation

To run the Tic-Tac-Toe game locally, follow these steps:

  1. Clone this repository:
    git clone https://github.com/Kalyani2712/PRODIGY_WD_03.git
    
  2. Navigate to the project directory:

cd tic-tac-toe

  1. Open index.html in your web browser.

⚙️ Usage

Upon opening the game, you'll be prompted to choose between Player vs. Player and Player vs. AI modes. Click on the desired mode to start playing. Players take turns clicking on the boxes to place their marks (X or O). The game will automatically announce the winner or if the game ends in a draw.

🎮 Game Modes :

Player vs. Player: Two players take turns to place their marks. Player vs. AI: The player plays as "O", while the AI plays as "X". The AI makes its move after the player's turn.

📜 How to Play :

Choose your game mode. The player will click on an empty box to place their mark (O for the player and X for the AI). The game checks for a winner or a draw after each turn. If there's a winner or a draw, a message will be displayed. Players can reset the game anytime by clicking the Reset Game button.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published