https://github.com/aroan-v/tic-tac-toe
https://github.com/aroan-v/tic-tac-toe
the-odin-project theodinproject tictactoe-game
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aroan-v/tic-tac-toe
- Owner: aroan-v
- Created: 2024-09-12T09:48:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-05T10:16:16.000Z (11 months ago)
- Last Synced: 2025-03-19T08:49:03.079Z (7 months ago)
- Topics: the-odin-project, theodinproject, tictactoe-game
- Language: JavaScript
- Homepage: https://aroan-v.github.io/Tic-Tac-Toe/
- Size: 1.58 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tic Tac Toe Project Overview
Explore this Tic-Tac-Toe project, a strategic, interactive game designed for competitive players, offering a smart computer AI opponent with selectable difficulty levels. Built with functional design principles, this game is structured to evolve seamlessly from console-only to full DOM interactivity. Key functions include move analysis, strategic decision-making, and a flexible evaluation system for enhanced gameplay.
## Key Features
- Game Mechanics: Enables players to engage in turn-based Tic-Tac-Toe matches, with win/loss evaluation, tie conditions, and move history tracking through console.log.
- AI Opponent: A function-based AI that adapts to player actions with varied difficulty modes for balanced challenges.
- Move Evaluation System: Real-time move analysis to recognize potential winning moves and blocks, ensuring strategic gameplay.
- Difficulty Adjustments: Allows players to choose difficulty levels, affecting the computer’s strategic depth.
- Transition to UI: Structured for future UI expansion using modular DOM manipulation functions.
- Symbol Switching: Players switch between 'X' and 'O' each round, with 'X' always moving first, offering a fair start for both players.## Constraints
- PvP functionality has not yet been implemented.
- The overall code could benefit from improved clarity and organization.
- The ability to change the user’s avatar has not been integrated yet.## Additional Concepts Explored
- Utilization of closures within functions.
- Enhancing code efficiency by employing .querySelectorAll() followed by .classList.contains() to filter through DOM elements.
- Implementing delays for animations, announcements, and similar features using setTimeout().
- In-depth exploration of various array methods and proper chaining to determine the best options for both readability and maintaining code efficiency.
- Extended study of how to manipulate objects and access their properties with bracket notation.## Applications Used
- Visual Studio Code
- Figma for future UI and UX designs
- Git and GitHub for version control and collaboration
- Console and CodePen.io for prototyping and testing logic functions## Author
aroan-v
## Credits
Special thanks to The Odin Project and its community for the support throughout this journey.