tic-tac-toe

Tic Tac Toe Game

A classic Tic Tac Toe game built with HTML, CSS, and JavaScript. This interactive web-based game allows two players to play against each other on a 3x3 grid.

Demo

๐ŸŽฅ Game Demo Video

โ–ถ๏ธ Watch the Demo Video on Google Drive
Watch the game in action

๐Ÿ“ธ Screenshots

Game Interface

Game Interface Main game board with clean, responsive design

Winner Announcement

Winner Screen Victory message display

Draw Game

Draw Screen Draw game notification

Features

Game Rules

  1. The game is played on a 3ร—3 grid
  2. Player 1 uses โ€˜Oโ€™ and Player 2 uses โ€˜Xโ€™
  3. Players take turns placing their marks in empty squares
  4. The first player to get 3 marks in a row (horizontally, vertically, or diagonally) wins
  5. If all 9 squares are filled without a winner, the game is a draw

File Structure

tic-tac-toe/
โ”œโ”€โ”€ game.html          # Main HTML file
โ”œโ”€โ”€ gamestyle.css       # Styling for the game
โ”œโ”€โ”€ app.js             # Game logic and functionality
โ”œโ”€โ”€ README.md          # This file
โ”œโ”€โ”€ images/            # Screenshots and images
โ”‚   โ”œโ”€โ”€ images/Game_Interface.png
โ”‚   โ”œโ”€โ”€ winner-screen.png
โ”‚   โ””โ”€โ”€ images/gamedraw.png

How to Play

  1. Open game.html in a web browser
  2. Click on any empty square to place your mark
  3. Players automatically alternate between โ€˜Oโ€™ and โ€˜Xโ€™
  4. The game will announce the winner or declare a draw
  5. Click โ€œReset Gameโ€ or โ€œNew Gameโ€ to start over

Technical Details

HTML Structure

CSS Features

JavaScript Functionality

Win Patterns

The game checks for wins in 8 possible combinations:

Browser Compatibility

This game works in all modern web browsers including:

Installation

  1. Download or clone the project files
  2. Ensure all files are in the proper directory structure
  3. Open game.html in your web browser
  4. Start playing!

For Contributors

If youโ€™re contributing screenshots or demo videos:

  1. Add screenshots to the images/ folder
  2. Add demo videos/GIFs to the demo/ folder
  3. Update the README with new media links
  4. Use descriptive filenames (e.g., mobile-responsive-view.png)

Media Guidelines

Screenshots

Demo Videos

Future Enhancements

Potential improvements could include:

Contributing

Feel free to fork this project and submit pull requests for any improvements or bug fixes.

License

This project is open source and available under the MIT License.


Enjoy playing Tic Tac Toe! ๐ŸŽฎ