Skip to content

A TicTactoe game made using HTML,CSS and javasript

Notifications You must be signed in to change notification settings

inderjeet09/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

TicTacToe Web Game

License

Description

The TicTacToe Web Game is a classic game implemented using HTML, CSS, and JavaScript. This project provides a web-based version of the popular Tic-Tac-Toe game, where two players take turns marking spaces on a 3x3 grid to achieve a winning pattern.

The project structure includes the following components:

  • index.html: This file contains the HTML code for the game interface.

Inside the TicTacToe folder, you will find the following subfolders:

  1. scripts folder: This folder contains the JavaScript files responsible for the game's functionality.

    • app.js: This file defines variables and function calls using event listeners to handle user interactions.
    • config.js: This file contains the function logic required for setting up the game playing environment before starting a game.
    • game.js: This file contains the game logic, including changing player turns, checking for a winner, and displaying the game result.
  2. styles folder: This folder contains the CSS files responsible for styling different sections of the game.

    • configuration.css: This file defines the styling for the configuration section of the game.
    • game.css: This file contains the styling rules for the game board and its elements.
    • overlays.css: This file provides styling for overlays and pop-up messages.
    • styles.css: This file contains general styles that are applied throughout the game.

Installation

To install and run the TicTacToe Web Game locally, follow these steps:

  1. Clone the repository:
  2. Navigate to the project directory:
  3. Open the index.html file in your preferred web browser.

Usage

  1. When you open the index.html file, you will see options to set the names of the two players.

  2. Enter the names of the players in the designated input fields.

  3. After entering the player names, click the "Confirm" button.

  4. Click the "Start New Game" button to begin the game.

  5. A game board will appear, allowing players to take turns marking spaces on the 3x3 grid.

  6. To make a move, click on an empty space on the grid.

  7. The game will automatically switch turns between the players.

  8. If a player achieves a winning pattern (a row, column, or diagonal filled with their marks), a section will appear displaying the winner's name.

  9. If the game ends in a tie (all spaces filled without a winning pattern)

Contact

For any questions, suggestions, or feedback, feel free to reach out to me:

Thank you for your interest in the TicTacToe Web Game project!

About

A TicTactoe game made using HTML,CSS and javasript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published