Ejemplo n.º 1
0
        public JsonResult Shoot(double latitude, double longitude)
        {
            Guid? gameId = this.Session[MagicStrings.SessionGameId] as Guid?;
            string email = this.Session[MagicStrings.SessionPlayerEmail].ToString();

            var shot = MvcApplication.GameHost.TakeShot(gameId.Value, email, new GeoCoordinate(latitude, longitude));

            var model = new ShootVModel()
                            {
                                InTheTarget = (shot == ShotResult.Hit)
                            };
            return this.Json(shot.ToString(), JsonRequestBehavior.AllowGet);
        }