diff options
Major Business Logic Implementation
* Added GameHub
* Added Back-End Game Loop and Game Mechanics
* Added End Game and Result message
1 files changed, 5 insertions, 1 deletions
| -rw-r--r-- | src/Web/PUSG.Web/Startup.cs | 6 |
diff --git a/src/Web/PUSG.Web/Startup.cs b/src/Web/PUSG.Web/Startup.cs index 82ae7e4..931903c 100644 --- a/src/Web/PUSG.Web/Startup.cs +++ b/src/Web/PUSG.Web/Startup.cs @@ -21,6 +21,9 @@ namespace PUSG.Web public void ConfigureServices(IServiceCollection services) { services.AddSingleton<ISessionService, SessionService>(); + services.AddSingleton<IGameService, GameService>(); + services.AddSingleton<GameLoopService>(); + services.AddHostedService<GameLoopService>(provider => provider.GetService<GameLoopService>()); services.AddControllers(); services.AddSignalR(); @@ -30,7 +33,7 @@ namespace PUSG.Web options.AddPolicy("CustomPolicy", builder => { builder - .WithOrigins("http://localhost:8001") + .WithOrigins("https://it-careers.github.io", "http://localhost:8001") .AllowCredentials() .AllowAnyHeader() .AllowAnyMethod(); @@ -55,6 +58,7 @@ namespace PUSG.Web app.UseEndpoints(endpoints => { endpoints.MapHub<HomeHub>("/home"); + endpoints.MapHub<GameHub>("/game"); endpoints.MapControllers(); }); } |