extern alias engine; using engine::SVSim.BattleEngine.Rng; using SVSim.BattleNode.Protocol; namespace SVSim.BattleNode.Sessions.Engine; /// One authoritative engine per BattleSession, seated as both players (design ND2). A faithful /// SHADOW: it mirrors each client's resolved play, never overrides/rejects/originates (ND1). Ingest is /// the engine's own NetworkBattleReceiver.ReceivedMessage (ND4); isPlayer selects the seat (F-N-2). internal sealed class SessionBattleEngine { private HeadlessNetworkBattleMgr? _mgr; /// True once Setup has built the two-seat battle. public bool IsReady => _mgr is not null; /// Construct the two-seat network battle from both decks + the master seed (design F-N-5). /// / are the per-side deck orders the node /// already computed (BattleSessionState.GetShuffledDeck) and handed each client. public void Setup(int masterSeed, IReadOnlyList seatADeck, IReadOnlyList seatBDeck) => throw new NotImplementedException("Filled by Task 3 (construction probe)."); /// Ingest one client frame into the engine for the given seat. /// maps the sender to the engine's player(true)/opponent(false) seat (F-N-2). public EngineIngestResult Receive(MsgEnvelope env, bool isPlayerSeat) => throw new NotImplementedException("Filled by Task 4 (ingest probe)."); }