public void Swap(Cell cell1, Cell cell2) { int cardTypeOfCell1 = matrix[cell1.row, cell1.col]; int cardTypeOfCell2 = matrix[cell2.row, cell2.col]; matrix[cell1.row, cell1.col] = cardTypeOfCell2; matrix[cell2.row, cell2.col] = cardTypeOfCell1; Log.Verbose("swap: " + cell1 + "-" + cell2); Log.Verbose("value after: " + matrix[cell1.row, cell1.col] + "-" + matrix[cell2.row, cell2.col]); mapUI.SwapCard(cell1, cell2); }