IMatchingBridge.RegisterPendingBattle now takes a MatchContext; PendingBattle carries it; BattleSession stores it. ArenaTwoPickBattleController builds ctx from IMatchContextBuilder. ScriptedLifecycle still uses ScriptedProfiles for the player half — Tasks 5/6 migrate the lifecycle. Existing tests updated: MatchingBridgeTests, BattleNodeFlowTests, InMemoryBattleSessionStoreTests, BattleSessionDispatchTests, BattleSession PumpTests, ArenaTwoPickBattleControllerTests (which now seeds a TK2 run + adds a no-active-run 400 case). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 lines
448 B
C#
11 lines
448 B
C#
using SVSim.BattleNode.Bridge;
|
|
|
|
namespace SVSim.BattleNode.Sessions;
|
|
|
|
/// <summary>
|
|
/// Sparse pre-connect record: viewer id + the per-battle MatchContext snapshot. Enough to
|
|
/// validate the incoming WS connect, resolve the viewer, and seed the BattleSession with the
|
|
/// player-half lifecycle data. Full BattleSession is created on connect.
|
|
/// </summary>
|
|
public sealed record PendingBattle(string BattleId, long ViewerId, MatchContext Context);
|