ajout du boardlayout et de la commande getmatch
This commit was merged in pull request #8.
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Giants.Application;
|
||||
/// </summary>
|
||||
public class MatchRepositoryMock : IMatchRepository
|
||||
{
|
||||
private readonly IHexagonalGrid _gridLayout;
|
||||
private readonly BoardLayout _boardLayout;
|
||||
private static int _lastId = 1;
|
||||
|
||||
private Dictionary<int, Match> _matchs = new Dictionary<int, Match>();
|
||||
@@ -17,9 +17,9 @@ public class MatchRepositoryMock : IMatchRepository
|
||||
/// <summary>
|
||||
/// constructeur
|
||||
/// </summary>
|
||||
public MatchRepositoryMock()
|
||||
public MatchRepositoryMock(BoardLayout boardLayout)
|
||||
{
|
||||
_gridLayout = new HexagonalGridImpl();
|
||||
_boardLayout = boardLayout;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
@@ -35,9 +35,10 @@ public class MatchRepositoryMock : IMatchRepository
|
||||
/// <inheritdoc/>
|
||||
public Match CreateMatch()
|
||||
{
|
||||
Match result = new Match(_gridLayout)
|
||||
Match result = new Match()
|
||||
{
|
||||
Id = _lastId++
|
||||
Id = _lastId++,
|
||||
Board = _boardLayout,
|
||||
};
|
||||
|
||||
AddStaticData(result);
|
||||
@@ -52,4 +53,8 @@ public class MatchRepositoryMock : IMatchRepository
|
||||
|
||||
}
|
||||
|
||||
public void SetMapData(IHexagonalGrid grid)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user