Skip to content

itsme-Muthu/PRODIGY_WD_03

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PRODIGY_WD_03 - Prodigy Web Development Internship - Task 03 - Tic-Tac-Toe Web Application

HTML

Structure: Basic HTML setup with a linked CSS file and JavaScript file.

Game Elements:

  • A message container to display the game result.
  • A main section containing:
    1. The game title.
    2. A 3x3 grid of buttons representing the Tic-Tac-Toe cells.
    3. A reset game button.
    4. A turn indicator showing whose turn it is.

CSS

Global Styles: Basic reset for margins and padding, and overall styling for the body.

Game Board: Styles for the container and grid layout.

Cells: Styling for the cells, including different colors for players X and O.

Buttons: Styles for the reset and new game buttons.

Message and Turn Indicator: Styles for displaying the winner/tie message and indicating the current turn.

JavaScript

Variables: Selection of game elements, tracking the current turn, and move count.

Functions:

resetGame: Resets the game state and UI.

showWinner and showTie: Display the winner or tie message.

ReturnWinner: Checks for a winner or tie and updates the UI.

disableAllGrids and enableAllGrids: Manage the enable/disable state of cells.

Event Listeners: Handle clicks on cells and buttons to manage game logic and UI updates.

image

image

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published