Example #1
0
        private static void ReplaceCardsPositions <TCard>(this ICards <TCard> board, int card1Index, int card2Index)
            where TCard : class, ICard
        {
            //Card1
            int row1    = board.GetRow(card1Index);
            int column1 = board.GetColumn(card1Index);

            //card2
            int row2    = board.GetRow(card2Index);
            int column2 = board.GetColumn(card2Index);

            board.Replace(new Point(row1, column1), new Point(row2, column2));
        }