Refactor and clean up codebase:
- Introduced `IGameRepository` interface and its implementation. - Transitioned namespaces to `file-scoped` for consistency. - Simplified class definitions, e.g., `Game` and `SixDigitInt`. - Restructured `GameField` logic for improved readability and functionality. - Fixed formatting issues in `API.csproj` and added a `using` directive in `Program.cs`.
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
namespace API.Services.GameManager
|
||||
namespace API.Services.GameManager;
|
||||
|
||||
public class GameManager : IGameManager
|
||||
{
|
||||
public class GameManager : IGameManager
|
||||
public int CreateGame(string playerName)
|
||||
{
|
||||
public int CreateGame(string playerName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool JoinGame(string playerName, int gameCode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private int GenerateNonExistingGameCode()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool JoinGame(string playerName, int gameCode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private int GenerateNonExistingGameCode()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace API.Services.GameManager
|
||||
namespace API.Services.GameManager;
|
||||
|
||||
public interface IGameManager
|
||||
{
|
||||
public interface IGameManager
|
||||
{
|
||||
public int CreateGame(string playerName);
|
||||
public bool JoinGame(string playerName, int gameCode);
|
||||
}
|
||||
}
|
||||
public int CreateGame(string playerName);
|
||||
public bool JoinGame(string playerName, int gameCode);
|
||||
}
|
||||
Reference in New Issue
Block a user