feat(battle-node): BuildReady overload carrying the opponent's hand

Adds BuildReady(selfHand, oppoHand) for the mulligan barrier; the single-arg
overload keeps the InitialHand placeholder for non-interactive opponents.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-03 10:48:43 -04:00
parent ae11fe0957
commit 633c29b44f
2 changed files with 30 additions and 3 deletions

View File

@@ -145,6 +145,27 @@ public class ScriptedLifecycleTests
Assert.That(body.Self[1].Idx, Is.EqualTo(4));
}
[Test]
public void BuildReady_two_arg_sets_oppo_to_supplied_hand()
{
var env = ScriptedLifecycle.BuildReady(new long[] { 1, 4, 3 }, new long[] { 1, 2, 6 });
var body = (ReadyBody)env.Body;
Assert.That(body.Self.Select(p => p.Idx), Is.EqualTo(new[] { 1, 4, 3 }));
Assert.That(body.Oppo.Select(p => p.Idx), Is.EqualTo(new[] { 1, 2, 6 }),
"oppo must reflect the opponent's post-mulligan hand, not the placeholder InitialHand.");
}
[Test]
public void BuildReady_one_arg_defaults_oppo_to_InitialHand()
{
var env = ScriptedLifecycle.BuildReady(new long[] { 1, 4, 3 });
var body = (ReadyBody)env.Body;
Assert.That(body.Oppo.Select(p => p.Idx), Is.EqualTo(new[] { 1, 2, 3 }),
"single-arg overload (non-interactive opponent) keeps the placeholder hand.");
}
[Test]
public void BuildOpponentTurnStart_HasUriTurnStartAndSpin()
{