Example #1
0
        public void DealCardValuesToPlayer(Player player, int numberOfCards)
        {
            List <byte> poolOfCards = protectedData.GetPoolOfCards();

            int numberOfCardsInThePool = poolOfCards.Count;
            int start = numberOfCardsInThePool - 1 - numberOfCards;

            List <byte> cardValues = poolOfCards.GetRange(start, numberOfCards);

            poolOfCards.RemoveRange(start, numberOfCards);

            protectedData.AddCardValuesToPlayer(player, cardValues);
        }
Example #2
0
        public void DealCardValuesToPlayer(Player player, int numberOfCards)
        {
            List <byte> poolOfCards = protectedData.GetPoolOfCards();

            int numberOfCardsInThePool = poolOfCards.Count;
            int start = numberOfCardsInThePool - 1 - numberOfCards;

            List <byte> cardValues = poolOfCards.GetRange(start, numberOfCards);

            poolOfCards.RemoveRange(start, numberOfCards);

            protectedData.AddCardValuesToPlayer(player, cardValues);
            protectedData.SetPoolOfCards(poolOfCards);                  //zbog enkripcije, provjerit i ostale metode ako je nesto sjebano
        }