Skip to content

Build and play a modern, responsive Tic-Tac-Toe game using Angular! ๐ŸŽฎโœจ Perfect for learning and fun! ๐Ÿš€ #Angular #GameDev #TicTacToe

License

Notifications You must be signed in to change notification settings

riteshporiya/angular-tic-tac-toe-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Angular Tic-Tac-Toe Game ๐ŸŽฎ

Welcome to the Angular Tic-Tac-Toe Game repository! This project showcases a modern, responsive Tic-Tac-Toe game built with Angular. Dive into the world of front-end development with this classic game, featuring clean code, modular components, and a sleek user interface. ๏ฟฝ๏ฟฝโœจ

Features ๐ŸŒŸ

Gameplay

  • Implements a score tracking system for X wins, O wins, ties, and total games played
  • Displays the current player's turn with visual indicators
  • Shows the winner or if it's a draw with an animated celebration modal
  • Allows for different board sizes (3x3, 4x4, 5x5)
  • The game board is centered and fully responsive for all devices

AI Opponent

  • Play against an AI with three difficulty levels:
    • Easy: Makes random moves for beginners
    • Medium: Uses strategy to win when possible, block opponent's winning moves, and make strategic positional plays
    • Hard: Implements the Minimax algorithm with Alpha-Beta pruning for optimal play on 3x3 boards, and advanced heuristics for larger boards

Visual & Audio Enhancements

  • Beautiful animations for placing X's and O's
  • Smooth win/draw animations with celebration effects
  • Sound effects for moves, wins, and draws
  • Toggleable sound option with preferences saved between sessions
  • Responsive design with a modern UI
  • Winner celebration modal with trophy and confetti animations

User Experience

  • Local storage to persist scores and settings between sessions
  • Settings menu to customize game options (board size, AI difficulty, sound)
  • Visual feedback for moves with distinctive colors (X in blue, O in red)
  • The ability to stop the game at any point or reset the board

Getting Started ๐Ÿ› ๏ธ

Follow these instructions to get a copy of the project up and running on your local machine.

Prerequisites

  • Node.js and npm installed on your machine.

Installation

  1. Clone the repository:

    git clone https://github.com/riteshporiya/angular-tic-tac-toe-game.git
    
    cd angular-tic-tac-toe-game
  2. Install dependencies:

    npm install
  3. Run the application:

    ng serve
  4. Open your browser and navigate to http://localhost:4200.

Usage ๐Ÿ“–

  • Click on a cell to place your move (X or O)
  • Toggle the "Play against AI" option to play against the computer
  • Select the AI difficulty level (Easy, Medium, Hard)
  • Adjust the board size through the settings panel
  • Toggle sound effects on/off as desired
  • The score tracking system updates automatically
  • Use the "Reset" button to start a new game
  • Use the "Stop" button to stop the current game
  • Enjoy playing!

Future Enhancements ๐ŸŒ 

  • Multiplayer support for playing against friends online
  • User accounts to track stats across devices
  • More themes and visual customization options
  • Additional game modes with different winning conditions
  • Undo move functionality

Contributing ๐Ÿค

Contributions are welcome! Please open an issue or submit a pull request for any changes or enhancements you would like to see.

License ๐Ÿ“„

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments ๐Ÿ™

  • Inspired by classic Tic-Tac-Toe games
  • Built with Angular and Bootstrap
  • Sound effects implemented using Web Audio API

Happy gaming! ๐ŸŽฎ

About

Build and play a modern, responsive Tic-Tac-Toe game using Angular! ๐ŸŽฎโœจ Perfect for learning and fun! ๐Ÿš€ #Angular #GameDev #TicTacToe

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published