Added Backend Classes and FUnctions for an working Game. But lacking Implementations

This commit is contained in:
jhim
2026-02-27 11:16:21 +01:00
committed by Jonas
parent 120c671dce
commit 5db7ac1676
12 changed files with 183 additions and 15 deletions
+5 -2
View File
@@ -1,3 +1,5 @@
using API.Services.GameManager;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
@@ -7,6 +9,8 @@ builder.Services.AddSignalR();
builder.Services.AddOpenApi();
builder.Services.AddSwaggerGen();
builder.Services.AddSingleton<IGameManager, GameManager>();
var app = builder.Build();
// Configure the HTTP request pipeline.
@@ -24,9 +28,8 @@ app.UseStaticFiles();
app.UseAuthorization();
app.MapControllers();
app.MapHub<API.Controllers.GameController>("/api/game");
app.MapHub<API.Controllers.GameHubSocket>("/api/gamehub");
// SPA fallback: serve index.html for routes not matched by API or static files
app.MapFallbackToFile("index.html");
app.Run();