Format code et ajout de l'interface repository
This commit was merged in pull request #3.
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
namespace Giants.Application;
|
||||
|
||||
using Giants.Core.Interfaces;
|
||||
using Giants.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Une application Giants permettant l'instanciations des services, utilisé pour une console
|
||||
/// ou autre archi sans injections de dependances
|
||||
/// /// </summary>
|
||||
/// </summary>
|
||||
public class GiantApplication
|
||||
{
|
||||
|
||||
/// <summary> Constructeur de base </summary>
|
||||
public GiantApplication()
|
||||
{
|
||||
IHexagonalGrid grid = new HexagonalGridImpl();
|
||||
}
|
||||
}
|
||||
31
Src/Giants.Application/Src/MatchRepositoryMock.cs
Normal file
31
Src/Giants.Application/Src/MatchRepositoryMock.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Giants.Core.Interfaces;
|
||||
using Giants.Core;
|
||||
using Giants.Infrastructure;
|
||||
|
||||
namespace Giants.Application;
|
||||
|
||||
/// <summary>
|
||||
/// Implementation temporaire du repository de match
|
||||
/// </summary>
|
||||
public class MatchRepositoryMock : IMatchRepository
|
||||
{
|
||||
private readonly IHexagonalGrid _gridLayout;
|
||||
|
||||
/// <summary>
|
||||
/// constructeur
|
||||
/// </summary>
|
||||
public MatchRepositoryMock()
|
||||
{
|
||||
_gridLayout = new HexagonalGridImpl();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public Match? GetMatch(int matchId)
|
||||
{
|
||||
Match result = new Match(_gridLayout);
|
||||
|
||||
// Ajout des données statiques
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user