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.
🚀 Try the game online: 🎮 Play Now
✅ 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
The project follows a clean architecture approach with three main layers:
🔹 Contains domain entities, interfaces, and business logic:
- Game entity
TicTacToeServicefor game rules & logic- Repository interfaces
🔹 Implements infrastructure concerns:
- Entity Framework Core DbContext
- Repository implementations (EF Core)
- Database configuration
🔹 The ASP.NET Core MVC web application:
- Controllers for game actions
- Views for the user interface
- JavaScript for client-side interactions
- CSS for styling
- ASP.NET Core 9.0
- Entity Framework Core 9.0
- SQL Server
- HTML5, CSS3, JavaScript
- jQuery for AJAX calls
- Bootstrap 5 for responsive design
🔹 .NET 7.0 SDK or later
🔹 SQL Server or SQL Server Express LocalDB
🔹 Visual Studio 2022 or Visual Studio Code
-
Clone the repository:
-
Update the connection string in
TicTacToe.Web/appsettings.jsonif needed. -
Build and run the application:
- Start a new game:
- Select "Play against another player" or "Play against AI"
- Click on any empty cell to make a move
- The game will automatically detect wins or draws
- After a game ends, you can replay or return to the home page
🚀 Enjoy the game & have fun! 🎉