feat(battle-node): in-memory IBattleSessionStore + PendingBattle

This commit is contained in:
gamer147
2026-05-31 22:00:40 -04:00
parent c0c2bb5772
commit 3ade8ff4f5
4 changed files with 80 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
namespace SVSim.BattleNode.Sessions;
public interface IBattleSessionStore
{
/// <summary>Register a battle minted by the matching bridge, awaiting a WS connect.</summary>
void RegisterPending(PendingBattle battle);
/// <summary>Look up the pending battle. Returns null if not present.</summary>
PendingBattle? TryGetPending(string battleId);
/// <summary>Mark a battle as no longer pending (e.g. on successful connect or explicit close).</summary>
bool RemovePending(string battleId);
}