private void setPiece(int row, int col, Piece p) {
        if (p == EMP && get(col, row) != EMP) {
            Piece n = get(col, row);
            numPiecesRow[row - 1] -= 1;
            numPiecesCol[col - 1] -= 1;
            numPiecesDownDiag[row + col - 2] -= 1;
            numPiecesUpDiag[col - row + 7] -= 1;
            _contents[row - 1][col - 1] = p;
            changeSetMap(n.side(), cellNumber(col, row), false);
        } else {
            if (get(col, row) != EMP) {
                setPiece(row, col, EMP);
            }
            numPiecesRow[row - 1] += 1;
            numPiecesCol[col - 1] += 1;
            numPiecesDownDiag[row + col - 2] += 1;
            numPiecesUpDiag[col - row + 7] += 1;
            _contents[row - 1][col - 1] = p;
            changeSetMap(p.side(), cellNumber(col, row), true);
        }


    }