Ejemplo n.º 1
0
        //This creates the action of firing at the player grid.
        public async Task <JsonResult> FireAtPlayerGrid()
        {
            // the AIShoot metod should also return the x and y coords
            string username = userManager.GetUserName(User);
            string result   = gameService.AIShoot(username);

            string[] temp = result.Split(" ");

            return(Json(new { success = true, resultText = temp[0], col = temp[1], row = temp[2] }));
        }