Skip to content

cooleditingx/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe

project-image

A classic Tic-Tac-Toe game built with vanilla HTML CSS and JavaScript. This project provides a clean responsive interface for two players to compete locally. The game tracks turns validates moves and declares a winner or a draw.

🚀 Demo

https://cooleditingx.github.io/tic-tac-toe/ Screenshot 2025-11-17 at 4 15 28 PM

🧐 Features

Here're some of the project's best features:

  • Classic 3x3 grid gameplay
  • Two-player local mode (Player 1 is 'X' Player 2 is 'O')
  • Dynamic status display for player turns wins and draws
  • Interactive board with visual feedback for moves
  • Clean and modern user interface with a dark theme
  • Built without any external libraries or frameworks

💻 Built with

Technologies used in the project:

  • HTML
  • CSS
  • Javascript
  • Procreate

Getting Started

To run this project locally, you just need a web browser

🛠️ Installation Steps:

### Installation
  1. Clone the repository to your local machine:
    git clone https://github.com/cooleditingx/tic-tac-toe.git
  2. Navigate to the project directory:
    cd tic-tac-toe

Open the index.html file in your web browser.

Note on Assets: The game requires three image files to be present in the root directory for full visual fidelity:

  • background.png: For the page background.
  • arrow.png: Represents the 'X' mark.
  • circle.png: Represents the 'O' mark.

How to Play

  1. The game begins with "Player 1 Turn". Player 1 uses the 'X' mark.
  2. Click on an empty square on the board to place your mark.
  3. The turn then switches to Player 2, who uses the 'O' mark.
  4. Players alternate turns until one player achieves three of their marks in a row, column, or diagonal.
  5. The game ends when a player wins or when all nine squares are filled, resulting in a draw.
  6. The game status is always visible above the board, indicating the current player's turn or the final outcome.
Screenshot 2025-11-17 at 4 16 11 PM

About

A classic Tic-Tac-Toe game built with vanilla HTML, CSS, and JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published