Skip to content

added Tik tak toe game #302

Merged
HarshitPachori merged 4 commits into
HarshitPachori:mainfrom
niranjanpatil1010:main
Oct 31, 2025
Merged

added Tik tak toe game #302
HarshitPachori merged 4 commits into
HarshitPachori:mainfrom
niranjanpatil1010:main

Conversation

@niranjanpatil1010
Copy link
Copy Markdown
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
Copy Markdown

🧩 PR Checklist

Hi @niranjanpatil1010, before merging please ensure:

  • Updated contributor.md
  • Added proper commit message
  • Verified build/test success ✅

@github-actions
Copy link
Copy Markdown

⭐ Hey @niranjanpatil1010, if you like this project, don't forget to star the repository! 🚀

Copy link
Copy Markdown
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