Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.9 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.9 KB

Task 3: Tic-Tac-Toe Web Application

Project Overview

This Tic-Tac-Toe web application allows users to enjoy the classic game directly in their browser. Built using HTML, CSS, and JavaScript, the game offers a user-friendly interface and interactive gameplay, making it easy for anyone to play with a friend or against an AI opponent. The application is designed to be responsive and visually appealing, with a fixed game board and striking animations for winning combinations.

Players can choose between two modes: playing with a friend locally or playing against a basic AI, which uses random logic for its moves.

Features

  • Two Game Modes: Play with a friend or against an AI.
  • Dynamic Interface: The game board updates with each move and visually highlights the winner.
  • Game Over Screen: A message is displayed announcing the winner or if the game ends in a draw.
  • Responsive Design: Optimized for different screen sizes.
  • Interactive Elements: Sounds and hover effects enhance the user experience.

Technologies Used

  • HTML5: For the structure of the game.
  • CSS3: For styling the game board and interface.
  • JavaScript: For managing game logic and interactivity.

How to Play

  1. Select either "Play with Friend" or "Play with AI."
  2. Click on any empty tile on the game board to make your move.
  3. The game will alternate turns between "X" and "O."
  4. The first player to align three symbols (horizontally, vertically, or diagonally) wins.
  5. If all tiles are filled and no player has won, the game ends in a draw.

Installation

  1. Clone the repository:
    git clone https://github.com/hunda554/PRODIGY_WD_03.git
    
    

what I learned

  1. Implementing interactive game logic with JavaScript.
  2. Creating a responsive grid layout using CSS Grid.
  3. Using JavaScript DOM manipulation for updating game state.
  4. Basic AI logic to simulate an opponent’s moves.