feat(match-context): add IMatchContextBuilder TK2 implementation
Assembles MatchContext from ArenaTwoPickRun + viewer cosmetics + config. Per-mode interface — future modes (rank/free/open-room/...) add one method each. DI scoped registration. Four tests cover happy path, no-run, incomplete draft, default-loadout fallback. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
18
SVSim.EmulatedEntrypoint/Services/IMatchContextBuilder.cs
Normal file
18
SVSim.EmulatedEntrypoint/Services/IMatchContextBuilder.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using SVSim.BattleNode.Bridge;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Per-mode assembler for the battle-node <c>MatchContext</c>. Each multiplayer mode that
|
||||
/// fronts a <c>do_matching</c> endpoint adds one method here that reads its mode-specific
|
||||
/// state (TK2 run, current-deck pointer, open-room set_deck, ...) and produces a
|
||||
/// <c>MatchContext</c> for the bridge.
|
||||
/// </summary>
|
||||
public interface IMatchContextBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Build a context from the viewer's active TK2 run + viewer cosmetics + config.
|
||||
/// Throws <see cref="ArenaTwoPickException"/> on missing run / incomplete draft.
|
||||
/// </summary>
|
||||
Task<MatchContext> BuildForTwoPickAsync(long viewerId);
|
||||
}
|
||||
Reference in New Issue
Block a user