using LittleTown.Blazor.Client.Services;
using Microsoft.AspNetCore.Components;

namespace LittleTown.Blazor.Client.Pages;

public partial class Match(IMatchService matchServices)
{
    Core.Match match;

    public async override Task SetParametersAsync(ParameterView parameters)
    {
        match = matchServices.GetMatch();
        match.AddPlayer("Andre");
        match.AddPlayer("Maelie");
        match.AddPlayer("Liam");

        await match.Init();

        await base.SetParametersAsync(parameters);
    }
}
