public static int calcDef(int row, int col, boolean isPieceWhite){
        
        int total = 0;
        int topleft, topright, bottomleft, bottomright;
        
        
        if (row > 0 && col > 0){
            topleft = ds.getPiece(row-1, col-1);
            total += addDef(topleft, isPieceWhite);
        } else {
            total += 10;
        }
        if (row > 0 && col < 9){
            topright = ds.getPiece(row-1, col+1);
            total += addDef(topright, isPieceWhite);
        } else {
            total += 10;
        }
        if (row < 9 && col > 0){
            bottomleft = ds.getPiece(row+1, col-1);
            total += addDef(bottomleft, isPieceWhite);
        } else {
            total += 10;
        }
        if (row < 9 && col < 9){
            bottomright = ds.getPiece(row+1, col+1);
            total += addDef(bottomright, isPieceWhite);
        } else {
            total += 10;
        }
        
        return total;
  
    }