internal static void FillBoardAndMix <TCard>(this ICards <TCard> board, ICardBuilder <TCard> cardBuilder) where TCard : class, ICard { for (int cardNum = 0; cardNum < board.NumOfCards; cardNum++) { TCard[] cards = cardBuilder.GeneratePairCard(); board.InsertCard(cards[0], board.GetRow(cardNum), board.GetColumn(cardNum)); cardNum++; board.InsertCard(cards[1], board.GetRow(cardNum), board.GetColumn(cardNum)); } board.MixCards(board.RemainCards); }