Skip to content

This is to be updated after project completion with a live link and explanation/ reflection on the project and takeaways.

Notifications You must be signed in to change notification settings

gitclonehama/tic-tac-bro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game

Introduction

This project is a browser-based Tic Tac Toe game implemented using JavaScript for game logic and DOM manipulation. The game dynamically updates the UI and handles player interaction in real-time.

Live Demo

Check out the live demo here: Hama's Tic Tac Bro

Key Features

  • Modular Design: The game logic is encapsulated using factory functions and modules, resulting in a clean, maintainable structure with minimal global variables.
  • Real-Time Gameplay: The game provides instant feedback for player moves, updates the board dynamically, and handles win conditions and ties seamlessly.
  • Intuitive UI: The user interface is designed for simple and intuitive interaction, allowing players to enjoy the game without distractions.
  • Replayablity: The game can be played indefinitely as long as user opts to play again after each win or tie.

What I Learned

  • Managing state and game flow with JavaScript, ensuring smooth turn-taking and logic for determining game outcomes.
  • Applying object-oriented principles through the use of factory functions and modules to encapsulate logic and maintain a clean codebase.
  • Effectively manipulating the DOM and setting up event listeners to respond to user input.

Challenges and Solutions

One of the key challenges was handling the logic for win conditions, especially ensuring that all rows, columns, and diagonals were checked after each move. I solved this by implementing a helper function that dynamically checks the board after each turn to identify a winner or a tie.

Future Enhancements

  • AI Integration: I plan to implement an AI player for single-player mode.
  • Animations: Adding subtle animations for player moves and game outcomes to enhance the user experience.
  • Score Tracking: Adding score tracking or even a leader-board to give the better tic tac toer bragging rights.

Contact

Feel free to reach out if you have any questions about the project!
Hama Pashazadeh
LinkedIn
Email

About

This is to be updated after project completion with a live link and explanation/ reflection on the project and takeaways.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published