public static int calcDef(int row, int col, boolean white, DraughtsState ds){
        int total = 0;
               
        // Default def for corners and sides.
        int topleft = 10, topright = 10, bottomleft = 10, bottomright = 10;
        
        if (row > 0 && col > 0){
            topleft = ds.getPiece(row-1, col-1);
            total += addDef(topleft);
        }
        if (row > 0 && col < 9){
            topright = ds.getPiece(row-1, col+1);
            total += addDef(topright);
        }
        if (row < 9 && col > 0){
            bottomleft = ds.getPiece(row+1, col-1);
            total += addDef(bottomleft);
        }
        if (row < 9 && col < 9){
            bottomright = ds.getPiece(row+1, col+1);
            total += addDef(bottomright);
        }
        
        return total;
  
    }