Ejemplo n.º 1
0
        public JsonResult Delete(int gameId, int playerId)
        {
            LudoGame game = _games.GetOrCreateGame(gameId);

            //tar ut den spelaren som har just detta id
            Player player = game.GetPlayers().Single(m => m.PlayerId == playerId);

            game.DeletePlayer(player);

            return(new JsonResult(game.GetPlayers()));
        }