test(battlenode): unify DealBody helper + assert seat-B deck (M-HC-1 review)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -49,18 +49,8 @@ public class HeadlessConductorTests
|
||||
// the top 3 of the node-native shuffled deck. Both seats deal the same idx triple.
|
||||
private static Dictionary<string, object?> DealBody() => new()
|
||||
{
|
||||
["self"] = new List<object?>
|
||||
{
|
||||
new Dictionary<string, object?> { ["pos"] = 0, ["idx"] = 1 },
|
||||
new Dictionary<string, object?> { ["pos"] = 1, ["idx"] = 2 },
|
||||
new Dictionary<string, object?> { ["pos"] = 2, ["idx"] = 3 },
|
||||
},
|
||||
["oppo"] = new List<object?>
|
||||
{
|
||||
new Dictionary<string, object?> { ["pos"] = 0, ["idx"] = 1 },
|
||||
new Dictionary<string, object?> { ["pos"] = 1, ["idx"] = 2 },
|
||||
new Dictionary<string, object?> { ["pos"] = 2, ["idx"] = 3 },
|
||||
},
|
||||
["self"] = PosIdxList((0, 1), (1, 2), (2, 3)),
|
||||
["oppo"] = PosIdxList((0, 1), (1, 2), (2, 3)),
|
||||
};
|
||||
|
||||
// A minimal vanilla hand-card play: type 30 == PLAY_HAND; playIdx is the played card's index.
|
||||
@@ -93,7 +83,7 @@ public class HeadlessConductorTests
|
||||
// consumes to seal the mulligan and start turn 1. Mirrors battle_test_cl1's Ready receive.
|
||||
private static Dictionary<string, object?> ReadyBody() => new()
|
||||
{
|
||||
["self"] = PosIdxList((0, 1), (1, 2), (2, 4)),
|
||||
["self"] = PosIdxList((0, 1), (1, 2), (2, 4)), // same post-mulligan self hand as SwapBody — Ready re-echoes it
|
||||
["oppo"] = PosIdxList((0, 1), (1, 2), (2, 3)),
|
||||
["idxChangeSeed"] = 857671914,
|
||||
["spin"] = 0,
|
||||
@@ -176,6 +166,9 @@ public class HeadlessConductorTests
|
||||
Assert.That(harness.Turn(playerSeat: false), Is.EqualTo(1), "seat B turn counter");
|
||||
Assert.That(harness.Pp(playerSeat: false), Is.EqualTo(1), "turn 2 ramps seat B max PP to 1");
|
||||
Assert.That(harness.HandCount(playerSeat: false), Is.EqualTo(1), "seat B turn-1 draw");
|
||||
// Seat B's opening hand was dealt into hidden zones (not HandCardList), so its deck started at 30;
|
||||
// the single turn-1 draw brings it to 29.
|
||||
Assert.That(harness.DeckCount(playerSeat: false), Is.EqualTo(29), "seat B deck after turn-1 draw");
|
||||
|
||||
// Both leaders untouched (no damage dealt across the two opening turns) — state tracks
|
||||
// cleanly on BOTH seats at the turn boundary.
|
||||
|
||||
Reference in New Issue
Block a user