Skip to content

Conversation

@niranjanpatil1010
Copy link
Contributor

πŸ“Œ Pull Request Title

added Tik tak toe game

βœ… Description

it is a 2-player Tic-Tac-Toe game with turn-based play, win/draw detection, and reset/new game functionality.

-3x3 grid of boxes (.box)

-Control buttons: #reset (reset game), #newgame (start new game)

-Message container: #msg for winner/draw messages

-Popup container: .win for game-end display

how to play

-Players take turns: O and X

-Check 8 winning patterns after each move

-Detect draw if all boxes filled

-Reset clears grid and restarts turns

Language: HTML / CSS / JavaScript

πŸ”— Related Issue

Fixes # or Closes #
closes #287

πŸ› οΈ Approach / Changes Made

  • Implemented basic Tic-Tac-Toe game logic using JavaScript.

-Added click event listeners for each box to toggle between O and X turns.

-Included win detection using predefined winning patterns.

-Handled draw condition when all boxes are filled without a winner.

-Added Reset and New Game buttons to restart the game.

-Simplified DOM updates and improved code readability.


πŸ“Έ Screenshots / Videos (if applicable)

image image image

βœ… Checklist

  • My code follows the project guidelines.
  • I have tested the changes locally.
  • I have updated documentation (if required).
  • I have linked the related issue in this PR.

πŸ’¬ Additional Notes (Optional)

@github-actions
Copy link

🧩 PR Checklist

Hi @niranjanpatil1010, before merging please ensure:

  • Updated contributor.md
  • Added proper commit message
  • Verified build/test success βœ…

@github-actions
Copy link

⭐ Hey @niranjanpatil1010, if you like this project, don't forget to star the repository! πŸš€

Copy link
Collaborator

@ayushHardeniya ayushHardeniya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good, ready to merge

@HarshitPachori HarshitPachori merged commit fe29cce into HarshitPachori:main Oct 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Tik Tak Toe Game

3 participants