ArmedCards.BusinessLogic.DomainServices.GamePlayerCard.Play.CheckHand C# (CSharp) Метод

CheckHand() приватный Метод

Check to see if the player has cardIDs in their hand
private CheckHand ( List cards, List cardIDs ) : List
cards List
cardIDs List List of card IDs to check if present in player's hand
Результат List
        private List<Int32> CheckHand(List<Entities.GamePlayerCard> cards, List<Int32> cardIDs)
        {
            List<Int32> missingIds = new List<int>();

            Int32 indexOf = -1;

            foreach (Int32 cardID in cardIDs)
            {
                indexOf = cards.FindIndex(x => x.CardID == cardID);

                if (indexOf < 0)
                {
                    missingIds.Add(cardID);
                }
            }

            return missingIds;
        }