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

            //Shuffle
            for (int i = 0; i < 64; i++)
            {
                MemorySlides.Reverse();
                MemorySlides.Move(rnd.Next(0, MemorySlides.Count), rnd.Next(0, MemorySlides.Count));
            }
        }
Exemple #2
0
        //Randomize the location of the slides in collection
        private void ShuffleSlides()
        {
            //Randomizing slide indexes
            var randomSlideIndex = new Random();

            //Shuffle memory slides
            for (int i = 0; i < 64; i++)
            {
                MemorySlides.Reverse();
                MemorySlides.Move(randomSlideIndex.Next(0, MemorySlides.Count), randomSlideIndex.Next(0, MemorySlides.Count));
            }
        }
        private void ShuffleSlides()
        {
            var rnd = new Random();

            for (int i = 0; i < 64; i++)
            {
                MemorySlides.Reverse();
                int aa = rnd.Next(0, MemorySlides.Count);
                int bb = rnd.Next(0, MemorySlides.Count);
                MemorySlides.Move(aa, bb);
            }
        }
        private void ShuffleSlides()
        {
            if (numero == 5)

            {
                for (int i = 0; i < 64; i++)
                {
                    MemorySlides.Reverse();
                    MemorySlides.Move(5, 1);
                    MemorySlides.Move(2, 3);
                    MemorySlides.Move(0, 4);
                }
            }
            else if (numero == 4)
            {
                MemorySlides.Reverse();
                MemorySlides.Move(3, 1);
                MemorySlides.Move(5, 3);
                MemorySlides.Move(2, 4);
            }
            else if (numero == 3)
            {
                MemorySlides.Reverse();
                MemorySlides.Move(2, 1);
                MemorySlides.Move(5, 4);
                MemorySlides.Move(3, 4);
            }
            else if (numero == 2)
            {
                MemorySlides.Reverse();
                MemorySlides.Move(2, 3);
                MemorySlides.Move(0, 5);
                MemorySlides.Move(3, 4);
            }
            else if (numero == 1)
            {
                MemorySlides.Reverse();
                MemorySlides.Move(0, 3);
                MemorySlides.Move(0, 5);
                MemorySlides.Move(2, 4);
                MemorySlides.Move(1, 4);
            }
        }