Skip to content

ASHISHBVB/TIC-TAC_TOE-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โŒโญ• Tic-Tac-Toe Game

A classic Tic-Tac-Toe game built using HTML, CSS, and JavaScript. This project allows two players to play against each other in the browser with an interactive and clean user interface.

๐Ÿš€ Features

  • Interactive Gameplay: Smooth and responsive grid for placing X's and O's.
  • Win Logic: Automatically detects when a player wins horizontally, vertically, or diagonally.
  • Draw Detection: Alerts players when the game ends in a draw.
  • Reset Functionality: Quickly restart the game without reloading the page.
  • Responsive Design: Playable on desktop and mobile browsers.

๐Ÿ› ๏ธ Technologies Used

  • HTML5: For the structure of the game board.
  • CSS3: For styling the board, cells, and animations.
  • JavaScript: For the game logic, turn management, and win calculations.

๐Ÿ“‚ Project Structure

TIC-TAC_TOE-Game/
โ”œโ”€โ”€ index.html   # Main HTML file serving the game structure
โ”œโ”€โ”€ style.css    # Stylesheet for game aesthetics
โ”œโ”€โ”€ app.js       # JavaScript file containing game logic
โ””โ”€โ”€ README.md    # Project documentation

๐Ÿ How to Run Locally
You can run this project on your local machine by following these simple steps:

Clone the repository:

Bash

git clone [https://github.com/ASHISHBVB/TIC-TAC_TOE-Game.git](https://github.com/ASHISHBVB/TIC-TAC_TOE-Game.git)
Navigate to the project directory:

Bash

cd TIC-TAC_TOE-Game
Open the game:

Locate the index.html file in the folder.

Double-click it to open it in your default web browser (Chrome, Firefox, Safari, etc.).

๐ŸŽฎ How to Play
The game starts with Player X.

Click on any empty cell in the 3x3 grid to place your mark.

Players take turns alternating between X and O.

The first player to get 3 marks in a row (up, down, across, or diagonally) wins!

If all 9 cells are filled and no one wins, the game is a Draw.

Click the Reset button to start a new game.

๐Ÿ“ธ Screenshots
(You can add screenshots of your game here later!)

๐Ÿ”ฎ Future Improvements
[ ] Add a score counter to track wins for Player X and Player O.

[ ] Implement a "Player vs Computer" mode.

[ ] Add sound effects for clicks and wins.

๐Ÿค Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

Fork the Project

Create your Feature Branch (git checkout -b feature/AmazingFeature)

Commit your Changes (git commit -m 'Add some AmazingFeature')

Push to the Branch (git push origin feature/AmazingFeature)

Open a Pull Request

๐Ÿ“„ License
Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors