コード例 #1
0
        private void ShuffleColoda()
        {
            Random rand = new Random(Guid.NewGuid().GetHashCode());
            int    index,
                   timesToShuffle = 2;

            for (int j = 0; j < timesToShuffle; j++)
            {
                for (int i = 0; i < 36; i++)
                {
                    index = rand.Next(0, 36);
                    Karta tempKarta = Coloda[i];
                    Coloda[i]     = Coloda[index];
                    Coloda[index] = tempKarta;
                }
            }
        }
コード例 #2
0
 public void AddKart(Karta karta)
 {
     SetKarts.Enqueue(karta);
 }
コード例 #3
0
 public int Comparer(Karta karta)
 {
     return(type > karta.type ? 1 : ((type < karta.type) ? -1 : 0));
 }