toUnicode method

String toUnicode()

Render to two-character text with unicode suit symbols

Implementation

String toUnicode() {
  assert(isCard);
  if (Card.WhiteJoker.index == index) return "Jw";
  if (Card.BlackJoker.index == index) return "Jb";
  if (Card.Joker.index == index) return "Jk";
  return "${rank!.toChar()}${suit!.toUnicode()}";
}