feat(battlenode): host-owned engine global init (Phase 2 N2 carried-risk A)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-06 16:19:21 -04:00
parent e982300c6d
commit 5e0723c182
4 changed files with 326 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using NUnit.Framework;
using SVSim.BattleNode.Sessions.Engine;
using System.Linq;
namespace SVSim.BattleEngine.Tests.SessionEngine;
[TestFixture]
public class SessionEngineSpellboostTests
{
[Test]
public void EngineGlobalInit_makes_a_fresh_engine_ready()
{
EngineGlobalInit.EnsureInitialized();
var cl1 = CaptureReplay.Load("battle_test_cl1.ndjson");
var cl2 = CaptureReplay.Load("battle_test_cl2.ndjson");
var deckA = CaptureReplay.SelfDeckFrom(cl1);
var deckB = CaptureReplay.SelfDeckFrom(cl2);
var engine = new SessionBattleEngine();
Assert.DoesNotThrow(() => engine.Setup(masterSeed: 12345, seatADeck: deckA, seatBDeck: deckB));
Assert.That(engine.IsReady, Is.True, "engine must be ready after EngineGlobalInit (carried-risk fix)");
}
}