public IActionResult GetCards(string gameId, string playerId) { IGame game = GetGame(gameId); var player = game.Players.OfType <IHumanPlayer>().Single(p => p.Id == Guid.Parse(playerId)); return(Json(player.Cards.Select(c => new { filename = CardUtil.GetPictureFilename(c), cardAbbr = CardUtil.GetAbbreviation(c) }))); }