feat(battle-node): JudgeHandler emits {spin:0} to opponent in PvP

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-03 18:09:44 -04:00
parent 3c8a00c928
commit 58994a53c9
2 changed files with 27 additions and 1 deletions

View File

@@ -399,6 +399,22 @@ public class BattleSessionDispatchTests
Assert.That(body.Spin, Is.EqualTo(0));
}
[Test]
public void Pvp_Judge_from_A_emits_spin0_to_B()
{
var (s, a, b) = NewPvpSession();
DriveToAfterReady(s, a);
DriveToAfterReady(s, b);
var routes = s.ComputeFrames(a, NewEnvelope(NetworkBattleUri.Judge));
Assert.That(routes.Count, Is.EqualTo(1));
Assert.That(routes[0].Target, Is.SameAs(b));
Assert.That(routes[0].Frame.Uri, Is.EqualTo(NetworkBattleUri.Judge));
var body = (SVSim.BattleNode.Protocol.Bodies.JudgeBody)routes[0].Frame.Body;
Assert.That(body.Spin, Is.EqualTo(0));
}
[Test]
public void Pvp_PlayActions_synthesizes_knownList_from_sender_deck()
{