Skip to content

ayaZaky/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Tic Tac Toe Game

A full-stack Tic Tac Toe game built with ASP.NET Core. This project follows a clean architecture approach, separating core business logic, infrastructure, and web presentation.


🖼️ ScreenShots


🌐 Live Demo

🚀 Try the game online: 🎮 Play Now


✨ Features

✅ Play against another player or AI opponent
✅ Real-time game state updates
✅ Responsive design (works on mobile & desktop)
✅ Persistent game storage using Entity Framework Core
✅ Clean architecture with separation of concerns


📌 Project Structure

The project follows a clean architecture approach with three main layers:

TicTacToe.Core

🔹 Contains domain entities, interfaces, and business logic:

  • Game entity
  • TicTacToeService for game rules & logic
  • Repository interfaces

TicTacToe.Infrastructure

🔹 Implements infrastructure concerns:

  • Entity Framework Core DbContext
  • Repository implementations (EF Core)
  • Database configuration

TicTacToe.Web

🔹 The ASP.NET Core MVC web application:

  • Controllers for game actions
  • Views for the user interface
  • JavaScript for client-side interactions
  • CSS for styling

🛠️ Technologies Used

🔹 Backend

  • ASP.NET Core 9.0
  • Entity Framework Core 9.0
  • SQL Server

🔹 Frontend

  • HTML5, CSS3, JavaScript
  • jQuery for AJAX calls
  • Bootstrap 5 for responsive design

⚙️ Setup

📌 Prerequisites

🔹 .NET 7.0 SDK or later
🔹 SQL Server or SQL Server Express LocalDB
🔹 Visual Studio 2022 or Visual Studio Code


🚀 Installation

  1. Clone the repository:

  2. Update the connection string in TicTacToe.Web/appsettings.json if needed.

  3. Build and run the application:

🎲 How to Play

  1. Start a new game:
    • Select "Play against another player" or "Play against AI"
  2. Click on any empty cell to make a move
  3. The game will automatically detect wins or draws
  4. After a game ends, you can replay or return to the home page

🚀 Enjoy the game & have fun! 🎉

About

Tic Tac Toe game built using ASP.NET MVC in an N-Tier architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors