refactor(battlenode): name sender-only vs both-sides handshake checks (§D)
Behavior-preserving; 231 BattleNode tests green. FrameDispatchContext.BothAfterReady() -> BothSidesAfterReady() (7 call sites). The 4 inline `SenderPhase == AfterReady` checks in TurnEndHandler/TurnEndFinalHandler now read a new SenderIsAfterReady property. Both carry cross-referencing docs so the Bot-arm (sender-only) vs PvP-arm (both-sides) distinction is explicit at the type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ internal sealed class TurnStartHandler : IFrameHandler
|
||||
{
|
||||
// PvP: the active player's TurnStart{orderList} is dropped; the opponent receives {spin}
|
||||
// (spin=0 for the deterministic-turn slice) and self-generates its turn-open.
|
||||
if (ctx.Type == BattleType.Pvp && ctx.BothAfterReady())
|
||||
if (ctx.Type == BattleType.Pvp && ctx.BothSidesAfterReady())
|
||||
{
|
||||
var frame = ctx.Env with { Body = new OpponentTurnStartBody(Spin: BattleFrameDefaults.DeterministicTurnSpin) };
|
||||
return new[] { new DispatchRoute(ctx.Other, frame, Stock.Normal) };
|
||||
|
||||
Reference in New Issue
Block a user