Skip to content

srisatya31/tictactoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README: Tic-Tac-Toe Game

Description

This project is a Tic-Tac-Toe game developed using HTML, CSS, and JavaScript. The game allows two players to take turns marking spaces in a 3x3 grid, aiming to align three of their symbols (X or O) horizontally, vertically, or diagonally to win. The project is simple, interactive, and showcases the integration of core web development technologies.


Features

  • Interactive Gameplay: Players alternate turns to place Xs and Os.
  • Winner Detection: Automatically detects the winner or a tie.
  • Responsive Design: Works well on desktop and mobile devices.
  • Reset Button: Restart the game at any time.

Technologies Used

  1. HTML:

    • Provides the structure for the game board and interface elements like the grid and reset button.
  2. CSS:

    • Adds styling for the grid, buttons, and overall layout to make the game visually appealing.
    • Ensures a responsive and user-friendly design.
  3. JavaScript:

    • Handles the game logic, including player turns, winner detection, and resetting the game.
    • Updates the UI dynamically based on player actions.

How to Use

  1. Open the index.html file in any modern web browser.
  2. Click on an empty square in the grid to place your symbol (X or O).
  3. The game will alternate turns between players.
  4. A message will display the winner or indicate a tie.
  5. Use the "Reset" button to restart the game.

Folder Structure

/tic-tac-toe
│
├── index.html     # Structure of the game board and UI
├── styles.css     # Styling for the grid, buttons, and layout
└── script.js      # Game logic, interactivity, and event handling

Future Improvements

  • Add support for single-player mode with AI.
  • Allow players to customize their symbols.
  • Add animations or sound effects for moves and wins.

Feel free to explore, modify, and enhance the project! 😊

About

This is basically a project made using HTML.CSS,JS

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors