internal static void MixCards <TCard>(this ICards <TCard> board, int times) where TCard : class, ICard { Random rand = new Random(); do { int card1Index = rand.Next(0, board.NumOfCards); int card2Index = rand.Next(0, board.NumOfCards); board.ReplaceCardsPositions(card1Index, card2Index); } while (times-- > 0); }