Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

This is a simple Tic-Tac-Toe game implemented using HTML, CSS, and JavaScript.

Live Demo

Live Demo

Features

  • Player X and Player O take turns to play.
  • Displays a gradient color for each player's move.
  • Disables the right-click context menu to prevent unwanted interactions.
  • Basic game logic to check for winners and handle game draws.

Table of Contents

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/tictactoe.git
    

Live Demo

Live Demo

Usage

Open index.html in your web browser to start the game. Click on the boxes to make your moves. Player X and Player O will alternate turns. The game will display the winner once there is a winning combination. If all boxes are filled without a winner, the game will declare a draw.

Code Overview

HTML The index.html file contains the basic structure of the game board.

CSS The CSS defines styles for the game board and applies gradient colors to the player marks.

JavaScript The JavaScript file contains the game logic, including:

Handling player turns. Checking for a winner. Declaring a draw. Disabling the right-click context menu.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

Fork the repository. Create a new branch (git checkout -b feature-branch). Make your changes. Commit your changes (git commit -m 'Add new feature'). Push to the branch (git push origin feature-branch). Open a pull request.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages