All checks were successful
Merging on main / Build & Test (push) Successful in 1m10s
Co-authored-by: mcmuzzle <vezuvan@hotmail.com> Reviewed-on: #40
27 lines
637 B
C#
27 lines
637 B
C#
using LittleTown.Core;
|
|
using LittleTown.Core.Ports;
|
|
|
|
namespace LittleTown.Blazor.Client.Services
|
|
{
|
|
public class MatchService : IMatchService
|
|
{
|
|
private readonly IStaticDataGetter _staticDataGetter;
|
|
private Match? _currentMatch;
|
|
|
|
public MatchService(IStaticDataGetter staticDataGetter)
|
|
{
|
|
_staticDataGetter = staticDataGetter;
|
|
}
|
|
|
|
/// <inheritdoc/>>
|
|
public Match GetMatch()
|
|
{
|
|
if (null == _currentMatch)
|
|
{
|
|
_currentMatch = new Match(_staticDataGetter);
|
|
}
|
|
return _currentMatch;
|
|
}
|
|
}
|
|
}
|