protected override void DoHandle([NotNull] GameHttpContext context, [NotNull] IDebugger debugger)
        {
            var gameStepResult = debugger.StepToEnd();
            var response       = new DebuggerStepResponse
            {
                StoppedOnBreakpoint = gameStepResult.StoppedInBreakpoint,
                GameState           = debugger.State.GameState
            };

            context.SendResponse(response);
        }
Esempio n. 2
0
        protected override void DoHandle([NotNull] GameHttpContext context, [NotNull] IDebugger debugger)
        {
            var stepCount      = context.GetOptionalIntParam("count") ?? 1;
            var currentStep    = context.GetOptionalIntParam("currentStep");
            var gameStepResult = debugger.Step(stepCount, currentStep);
            var response       = new DebuggerStepResponse {
                StoppedOnBreakpoint = gameStepResult.StoppedInBreakpoint
            };

            if (gameStepResult.Diff == null || DiffIsTooBig(gameStepResult.Diff))
            {
                response.GameState = debugger.State.GameState;
            }
            else
            {
                response.Diff = gameStepResult.Diff;
            }
            context.SendResponse(response);
        }