private void ShuffleSlides()
        {
            var rnd = new Random();

            for (int i = 0; i < 64; i++)
            {
                MemoryCards.Reverse();
                MemoryCards.Move(rnd.Next(0, MemoryCards.Count), rnd.Next(0, MemoryCards.Count));
            }
        }
Example #2
0
        private void GenerateCards()
        {
            CardsGuessed = 0;
            MemoryCards.Clear();
            List <MemoryCard> memoryCards = new List <MemoryCard>(16);

            for (int i = 1; i <= 8; i++)
            {
                CardImage cardImage = CardImages[i - 1];
                memoryCards.Add(new MemoryCard(i, cardImage));
                memoryCards.Add(new MemoryCard(i, cardImage));
            }

            memoryCards.Shuffle();
            foreach (MemoryCard card in memoryCards)
            {
                MemoryCards.Add(card);
            }
        }