fenChar property

String get fenChar

Gets the FEN character of this piece.

For example, a white pawn is P, a black knight is n.

Implementation

String get fenChar {
  String r = role.letter;
  if (color == Side.white) r = r.toUpperCase();
  if (promoted) r += '~';
  return r;
}