/// <inheritdoc/> public Task <IGameCard> GetCard(GameCardType type) { if (Pack == null || !Pack.Any(card => card.Type == type)) { throw new NullReferenceException($"Either no cards found or no cards of type not found"); } var card = Pack .FirstOrDefault(card => card.Type == type); Pack.Remove(card); return(Task.FromResult(card)); }