gateSymbols property

List<List<String>> gateSymbols

Converts the internal representation of the gates to a list of piece symbols (e.g. 'P', 'q'). You probably need this for interopability with other applications (such as the Squares package).

Implementation

List<List<String>> get gateSymbols {
  if (!variant.gating) return [[], []];
  List<String> whiteGate = state.gates![Bishop.white]
      .map((p) => variant.pieces[p].symbol.toUpperCase())
      .toList();
  List<String> blackGate = state.gates![Bishop.black]
      .map((p) => variant.pieces[p].symbol.toLowerCase())
      .toList();
  return [whiteGate, blackGate];
}