Files
SVSimServer/SVSim.BattleNode/Sessions/Dispatch/Handlers/JudgeHandler.cs
gamer147 db2f711894 refactor(battle-node): extract JudgeHandler
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 14:30:40 -04:00

15 lines
493 B
C#

using SVSim.BattleNode.Protocol;
namespace SVSim.BattleNode.Sessions.Dispatch.Handlers;
internal sealed class JudgeHandler : IFrameHandler
{
public IReadOnlyList<DispatchRoute> Handle(FrameDispatchContext ctx)
{
// Only a scripted-bot Judge is forwarded. A real player's Judge has no routing rule (drops).
if (ctx.IsScriptedBot(ctx.From))
return new[] { new DispatchRoute(ctx.Other, ctx.Env, false) };
return Array.Empty<DispatchRoute>();
}
}