Refactor GameRepository and GameManager architecture, introduce Player model, and update dependency registration in Program.cs.

This commit is contained in:
2026-02-28 23:06:54 +01:00
committed by Jonas
parent b967bd70eb
commit 0e7bfb7241
11 changed files with 96 additions and 27 deletions
+9 -9
View File
@@ -1,19 +1,19 @@
namespace API.Services.GameManager;
using API.Models.Game;
using API.Repository.GameRepo;
public class GameManager : IGameManager
namespace API.Services.GameManager;
public class GameManager(IGameRepository gameRepository) : IGameManager
{
public int CreateGame(string playerName)
private readonly IGameRepository _gameRepo = gameRepository;
public int CreateGame(Coordinates gFs, Player player)
{
throw new NotImplementedException();
}
public bool JoinGame(string playerName, int gameCode)
public bool JoinGame(Player playerName, int gameCode)
{
throw new NotImplementedException();
}
private int GenerateNonExistingGameCode()
{
return 0;
}
}