PivotalPoker.Controllers.StoryController.EnsurePlayerExists C# (CSharp) Method

EnsurePlayerExists() private static method

private static EnsurePlayerExists ( Game game, string playerName ) : void
game PivotalPoker.Models.Game
playerName string
return void
        private static void EnsurePlayerExists(Game game, string playerName)
        {
            if (!game.Players.Any(p => p.Name == playerName))
                game.AddPlayer(new Player { Name = playerName });
        }