Consider the following example by Ulrike Fischer:
\documentclass{article}
\usepackage{chessfss}
\makeatletter
\def\testchessfiglanguage{\cfss@textfiglanguage}
\newcommand*\bonde[1]{\ifx\cfss@figlanguage\testchessfiglanguage #1\else\figsymbol{p}\fi}
\makeatletter
\begin{document}
\bonde{e} \usetextfig \bonde{e}
\end{document}
This printes either the file in which the pawn is located or the pawn symbol.
Then I have another piece of code from Ulrike:
\documentclass{article}
\usepackage{xskak}
\usesymfig
\makeatletter
\newcommand*\cfss@king@@LSBblack {\raisebox{-0.31ex}{\setboardfontsize{\f@size}\BlackKingOnWhite}}
\newcommand*\cfss@queen@@LSBblack {\raisebox{-0.37ex}{\setboardfontsize{\f@size}\BlackQueenOnWhite}}
\newcommand*\cfss@rook@@LSBblack {\raisebox{-0.26ex}{\setboardfontsize{\f@size}\BlackRookOnWhite}}
\newcommand*\cfss@bishop@@LSBblack{\raisebox{-0.35ex}{\setboardfontsize{\f@size}\BlackBishopOnWhite}}
\newcommand*\cfss@knight@@LSBblack{\raisebox{-0.30ex}{\setboardfontsize{\f@size}\BlackKnightOnWhite}}
\newcommand*\cfss@pawn@@LSBblack {\raisebox{-0.31ex}{\setboardfontsize{\f@size}\BlackPawnOnWhite}}
\newcommand\usesymfigblack{%
\def\cfss@figlanguage{@LSBblack}}
\makeatother
\begin{document}
\usetextfig
\textsymfigsymbol{Q}
\usesymfig
\textsymfigsymbol{Q}
\usesymfigblack
\textsymfigsymbol{Q}
\footnotesize
\usetextfig
\textsymfigsymbol{Q}
\usesymfig
\textsymfigsymbol{Q}
\usesymfigblack
\textsymfigsymbol{Q}
\end{document}
How do I combine the two code snippets in a command \bonde so that it printes either the file in which the pawn is located or the pawn symbol in either black or white depending on whether I use \usesymfigblack or not? (Please let me know if the question doesn't make sense.)
