Skip to content

Geno419/Tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game

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

How to Play

  • Open the index.html file in your web browser.
  • The game will start with X being the first player.
  • Click on any of the empty boxes to place your mark (X or O).
  • The game will alternate turns between X and O.
  • The first player to get three of their marks in a row (horizontally, vertically, or diagonally) wins the game.
  • If all the boxes are filled and there is no winner, the game ends in a draw.
  • Click the "PLAY AGAIN" button to reset the game and start over.

Features

  • Keeps track of the score for X and O.
  • Uses localStorage to persist the score even after the page is refreshed or reopened.
  • Provides visual feedback for the current player's turn.
  • Displays a message announcing the winner or indicating a draw.

File Structure

  • index.html: Contains the structure of the game interface.
  • style.css: Defines the styling for the game elements.
  • script.js: Contains the JavaScript code for game logic and functionality.

Styling

The game interface features a clean and simple design with a black header and a grid layout for the Tic-Tac-Toe board. The X's and O's are displayed within each grid cell, and the score is presented at the top of the page.

Technologies Used

  • HTML
  • CSS
  • JavaScript

Enjoy playing Tic-Tac-Toe! Feel free to customize and modify the game as you wish.s

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •