public static int addDef(int piece, boolean isPieceWhite){
        // Check if piece is the same.
        if (isPieceWhite && piece == DraughtsState.WHITEPIECE 
                || piece == DraughtsState.WHITEKING){
            return 5;
        }
        if (!isPieceWhite && piece == DraughtsState.BLACKPIECE ||
                piece == DraughtsState.BLACKKING){
            return 5;
        }
        
        return 0;
    }