Skip to content

sharath4444/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game

Overview

This is a simple and colorful two-player Tic Tac Toe game implemented using HTML, CSS, and JavaScript. The game allows two players to enter their names and select their preferred colors before starting the game. The current player's name and color are displayed, and the game board updates accordingly. The game supports restarting the game with a "Try Again" button which refreshes the page.

Features

  • Two-Player Game: Enter names and select colors for both players.
  • Colorful Interface: Players can choose different colors for their symbols.
  • Dynamic Gameplay: Switch turns between players, and update the board with each move.
  • Game Over Screen: Displays the winner or a draw message and allows restarting the game.
  • Responsive Design: The game interface adjusts to different screen sizes.

Technologies Used

  • HTML: Structure of the game.
  • CSS: Styling and layout of the game interface.
  • JavaScript: Game logic and interactivity.

Getting Started

To get started with the Tic Tac Toe game, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/sharath4444/tic-tac-toe.git
  2. Navigate to the Project Directory:

    cd tic-tac-toe
  3. Open index.html in a Web Browser:

    You can open index.html directly in your web browser to start playing the game.

File Structure

  • index.html: The main HTML file for the game.
  • style.css: The CSS file for styling the game.
  • script.js: The JavaScript file for game logic and interactivity.
  • img-tit-tac-toe.gif: The image file displayed at the top of the game.

Live Demo

You can play the game live here: Tic Tac Toe Game

Usage

  1. Enter names and choose colors for both players in the input fields.
  2. Click the "Start Game" button to begin.
  3. Click on the cells of the game board to make moves.
  4. The game will notify you of the winner or a draw.
  5. Click the "Try Again" button to refresh the page and start a new game.

Contributing

Feel free to contribute to this project by opening issues or submitting pull requests. Your feedback and contributions are welcome!

Contact

For any questions or inquiries, you can reach out to sharath.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors