public async Task <IActionResult> TapAndCapture(string game, [FromBody] TapRequest request)
        {
            AdbDroid.Tap(game, request.X, request.Y);

            await Task.Delay(TimeSpan.FromSeconds(0.5));

            var screenshotName = CaptureByAction(game, $"{request.X};{request.Y}");

            //var screenshotName = CaptureByAction(game, "wait");

            return(Json(new { visionShot = screenshotName }));
        }
        public string CaptureByAction(string game, string action)
        {
            var screenshotName = AdbDroid.CaptureScreenshot(game);
            var step           = new Step {
                Game = game, Action = action, Source = previousStep?.Target, Target = screenshotName
            };

            if (action != null && previousStep?.Game == game && step.Time < previousStep.Time.AddMinutes(1))
            {
                DataContext.Insert(step);
            }

            previousStep = step;

            return(screenshotName);
        }
 public IActionResult Tap(string game, [FromBody] TapRequest request)
 {
     AdbDroid.Tap(game, request.X, request.Y);
     return(Json(new {}));
 }