GithubHelp home page GithubHelp logo

tic_tac_toe-js's Introduction

Tic Tac Toe Game

Welcome to the Tic Tac Toe game project! This repository contains a simple yet fun implementation of the classic game, developed with HTML, CSS, and JavaScript. Players take turns marking a 3x3 grid with "X" or "O", aiming to get three in a row.

Screenshot 2024-04-21 at 4 02 26 PM

Table of Contents

Description

Tic Tac Toe is a classic game played on a 3x3 grid. Two players take turns marking a cell with "X" or "O", trying to get three in a row horizontally, vertically, or diagonally. If all cells are filled without a winner, the game is declared a draw.

Features

  • Interactive Gameplay: Clickable grid cells with hover effects for easy interaction.
  • Win Detection: Automatic detection of winning combinations with visual highlights.
  • Draw Handling: Proper handling of draw scenarios.
  • Restart Button: A simple way to reset the game and start again.

Installation

To run this project locally, follow these steps:

  1. Clone the repository to your local machine: git clone https://github.com/ashitoshsable/tic_tac_toe-js.git
  2. Navigate to the project directory: cd tic_tac_toe-js

Usage

To play the Tic Tac Toe game, open the index.html file in your preferred web browser:

  • Click on a cell to make your move. The game alternates between "X" and "O".
  • If a player gets three in a row (horizontally, vertically, or diagonally), that player wins.
  • If the board is filled without a winner, it's a draw.
  • Use the "Restart" button to reset the game and start over.

Contributing

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:

  • Fork the repository.
  • Create a new branch for your feature or bug fix.
  • Make your changes and commit them with a descriptive message.
  • Submit a pull request detailing your changes.

tic_tac_toe-js's People

Contributors

ashitoshsable avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.