Exemple #1
0
        // Initiation of the game parameters
        public void CreateNewGame()
        {
            done = 0;
            int length = cards.Length;

            for (int i = 0; i < length; i++)
            {
                cards[i] = i % (length / 2) + 1;
                opens[i] = false;
            }

            //randomazing the images positions
            for (int i = 0; i < 100; i++)
            {
                ShuffleCards();
            }

            //hiding cards behind the default images
            for (int j = 0; j < length; j++)
            {
                play.HideCard(j);
            }

            status = Status.INIT;
        }
 public void CreateNewGame()
 {
     for (int i = 0; i < cards.Length; i++)
     {
         cards[i] = i % (cards.Length / 2) + 1;
     }
     for (int i = 0; i < 100; i++)
     {
         ShuffleCards();
     }
     for (int i = 0; i < cards.Length; i++)
     {
         play.HideCard(i);
         opens[i] = false;
     }
     status = done = 0;
 }
Exemple #3
0
 public void CreateNewGame()
 {
     for (int j = 0; j < cards.Length; j++)
     {
         cards[j] = j % (cards.Length / 2) + 1;
     }
     for (int j = 0; j < 100; j++)
     {
         ShuffleCards();
     }
     for (int j = 0; j < cards.Length; j++)
     {
         play.HideCard(j);
     }
     for (int j = 0; j < cards.Length; j++)
     {
         opens[j] = false;
     }
     done    = 0;
     status  = 0;
     Counter = 0;
 }