예제 #1
0
        public ActionResult Move(Guid user, string direction)
        {
            var map = state.GetGame(user);

            if (map == null)
            {
                return(NotFound());
            }
            if (!map.GameEnd)
            {
                map.Move(direction);
            }
            return(Json(new { User = user, Map = map.ToString(), FullMap = map }));
        }